From b1de82f5093820828b3e2a5176182ed3be3b0317 Mon Sep 17 00:00:00 2001 From: Sebastian Blauth Date: Wed, 13 Nov 2024 08:57:35 +0100 Subject: [PATCH 1/3] Update python versions, drop support for python 3.8 --- .github/docker/Dockerfile | 2 +- .github/workflows/tests_macos.yml | 2 +- .github/workflows/tests_parallel.yml | 5 +---- .github/workflows/tests_serial.yml | 2 +- pyproject.toml | 3 +-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/docker/Dockerfile b/.github/docker/Dockerfile index a4916382..6cd7a52a 100755 --- a/.github/docker/Dockerfile +++ b/.github/docker/Dockerfile @@ -18,7 +18,7 @@ RUN micromamba install -y -n base -c conda-forge \ mpich \ scipy \ scotch"<7" \ - python=3.11 && \ + python=3.12 && \ micromamba clean --all --yes ARG MAMBA_DOCKERFILE_ACTIVATE=1 diff --git a/.github/workflows/tests_macos.yml b/.github/workflows/tests_macos.yml index f8e13cac..154a9131 100644 --- a/.github/workflows/tests_macos.yml +++ b/.github/workflows/tests_macos.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout repository diff --git a/.github/workflows/tests_parallel.yml b/.github/workflows/tests_parallel.yml index 9afb6ff8..7ead2c6a 100644 --- a/.github/workflows/tests_parallel.yml +++ b/.github/workflows/tests_parallel.yml @@ -16,11 +16,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] mpi: [mpich, openmpi] - exclude: - - python-version: "3.8" - mpi: openmpi steps: - name: Checkout repository diff --git a/.github/workflows/tests_serial.yml b/.github/workflows/tests_serial.yml index 36b9a3bd..5f16dbbc 100644 --- a/.github/workflows/tests_serial.yml +++ b/.github/workflows/tests_serial.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout repository diff --git a/pyproject.toml b/pyproject.toml index b33ea1a3..120428e7 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ name = "cashocs" version = "2.3.0" description = "Computational Adjoint-Based Shape Optimization and Optimal Control Software" readme = "README.rst" -requires-python = ">=3.8" +requires-python = ">=3.9" license = {text = "GNU General Public License v3 or later (GPLv3+)"} authors = [ {name = "Sebastian Blauth"}, @@ -34,7 +34,6 @@ classifiers = [ "Intended Audience :: End Users/Desktop", "Intended Audience :: Science/Research", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", From 41039ab5cced87e4f8625bef81f5df51756c0c89 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:00:49 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- cashocs/geometry/mesh_handler.py | 7 ++++--- cashocs/io/mesh.py | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cashocs/geometry/mesh_handler.py b/cashocs/geometry/mesh_handler.py index a13ea2da..5b5dac68 100644 --- a/cashocs/geometry/mesh_handler.py +++ b/cashocs/geometry/mesh_handler.py @@ -57,9 +57,10 @@ def _remove_gmsh_parametrizations(mesh_file: str) -> None: """ temp_location = f"{mesh_file[:-4]}_temp.msh" if fenics.MPI.rank(fenics.MPI.comm_world) == 0: - with open(mesh_file, "r", encoding="utf-8") as in_file, open( - temp_location, "w", encoding="utf-8" - ) as temp_file: + with ( + open(mesh_file, "r", encoding="utf-8") as in_file, + open(temp_location, "w", encoding="utf-8") as temp_file, + ): parametrizations_section = False for line in in_file: diff --git a/cashocs/io/mesh.py b/cashocs/io/mesh.py index ca3b0523..aa5e32a4 100644 --- a/cashocs/io/mesh.py +++ b/cashocs/io/mesh.py @@ -410,9 +410,10 @@ def parse_file( dim: The dimensionality of the mesh """ - with open(original_msh_file, "r", encoding="utf-8") as old_file, open( - out_msh_file, "w", encoding="utf-8" - ) as new_file: + with ( + open(original_msh_file, "r", encoding="utf-8") as old_file, + open(out_msh_file, "w", encoding="utf-8") as new_file, + ): node_section = False info_section = False subnode_counter = 0 From 03461c810080b01baf42192dff16cb2af4ed074d Mon Sep 17 00:00:00 2001 From: Sebastian Blauth Date: Wed, 13 Nov 2024 09:02:54 +0100 Subject: [PATCH 3/3] version bump --- .zenodo.json | 4 ++-- cashocs/__init__.py | 2 +- docs/source/_static/version_switcher.json | 2 +- docs/source/conf.py | 2 +- pyproject.toml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 1b646763..742a9017 100755 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,8 +1,8 @@ { "description": "

cashocs is a computational, adjoint-based shape optimization and optimal control software.

", "license": "GPL-3.0+", - "title": "cashocs v2.3.0", - "version": "v2.3.0", + "title": "cashocs v2.3.1", + "version": "v2.3.1", "upload_type": "software", "creators": [ { diff --git a/cashocs/__init__.py b/cashocs/__init__.py index 27153f5e..3b52889a 100755 --- a/cashocs/__init__.py +++ b/cashocs/__init__.py @@ -61,7 +61,7 @@ from cashocs.nonlinear_solvers import picard_iteration from cashocs.nonlinear_solvers import snes_solve -__version__ = "2.3.0" +__version__ = "2.3.1" __citation__ = """ @Article{Blauth2021cashocs, diff --git a/docs/source/_static/version_switcher.json b/docs/source/_static/version_switcher.json index d9593c2a..aa2323ba 100755 --- a/docs/source/_static/version_switcher.json +++ b/docs/source/_static/version_switcher.json @@ -6,7 +6,7 @@ }, { "name": "2.3 (stable)", - "version": "2.3.0", + "version": "2.3.1", "url": "https://cashocs.readthedocs.io/en/stable/", "preferred": true }, diff --git a/docs/source/conf.py b/docs/source/conf.py index ebd300d0..a9baaef4 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -28,7 +28,7 @@ author = "Sebastian Blauth" # The full version, including alpha/beta/rc tags -release = "2.3.0" +release = "2.3.1" # -- General configuration --------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index 120428e7..c7fb9e05 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" [project] name = "cashocs" -version = "2.3.0" +version = "2.3.1" description = "Computational Adjoint-Based Shape Optimization and Optimal Control Software" readme = "README.rst" requires-python = ">=3.9"