From 406cbc3f1d6469848afde63c99cf92407712457e Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Tue, 9 Apr 2024 10:58:18 +0200 Subject: [PATCH 01/10] Pinning the jsonshema dependency to see why the tests for pythong > 3.8 are failing. Dropping python 3.8 support. --- .github/workflows/cd.yml | 11 ++++------- .github/workflows/ci.yml | 8 +++----- pyproject.toml | 28 ++++++++++++++-------------- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d2a48571..489d30a6 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4.5.0 with: - python-version: "3.8" + python-version: "3.9" - name: Make sure virtualevn>20 is installed, which will yield newer pip and possibility to pin pip version. run: pip install "virtualenv>20" - name: Install Tox @@ -29,10 +29,7 @@ jobs: fail-fast: false matrix: include: - - python-version: "3.8" - lammps-version: "2020.12.24" - backend: django - - python-version: "3.8" + - python-version: "3.9" lammps-version: "2020.12.24" backend: sqlalchemy - python-version: "3.9" @@ -86,7 +83,7 @@ jobs: tox -e ${{ matrix.python-version }}-aiida_lammps -- tests/ --cov=./aiida_lammps --cov-append --cov-report=xml --cov-report=term-missing - name: Upload to Codecov - if: matrix.python-version == 3.8 + if: matrix.python-version == 3.9 uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -105,7 +102,7 @@ jobs: - name: Set up Python 3.8 uses: actions/setup-python@v4.5.0 with: - python-version: "3.8" + python-version: "3.9" - name: install flit run: | pip install flit~=3.4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82050e2a..857e64c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4.5.0 with: - python-version: "3.8" + python-version: "3.9" - name: Make sure virtualevn>20 is installed, which will yield newer pip and possibility to pin pip version. run: pip install "virtualenv>20" - name: Install Tox @@ -28,10 +28,8 @@ jobs: fail-fast: false matrix: include: - - python-version: "3.8" + - python-version: "3.9" lammps-version: "2020.03.03" - - python-version: "3.8" - lammps-version: "2020.12.24" - python-version: "3.9" lammps-version: "2020.12.24" - python-version: "3.9" @@ -87,7 +85,7 @@ jobs: tox -e ${{ matrix.python-version }}-aiida_lammps -- tests/ --cov=./aiida_lammps --cov-append --cov-report=xml --cov-report=term-missing - name: Upload to Codecov - if: matrix.python-version == 3.8 + if: matrix.python-version == 3.9 uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 0a7c3353..da221394 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,30 +5,33 @@ build-backend = "flit_core.buildapi" [project] name = "aiida-lammps" dynamic = ["version", "description"] -authors = [{name = "Chris Sewell", email = "chrisj_sewell@hotmail.com"}, {name = "Jonathan Chico", email = "jonathan.chico@sandvik.com"}] +authors = [ + { name = "Chris Sewell", email = "chrisj_sewell@hotmail.com" }, + { name = "Jonathan Chico", email = "jonathan.chico@sandvik.com" }, +] readme = "README.md" -license = {file = "LICENSE"} +license = { file = "LICENSE" } classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Scientific/Engineering :: Chemistry", "Topic :: Scientific/Engineering :: Physics", - "Framework :: AiiDA" + "Framework :: AiiDA", ] keywords = ["aiida", "workflows", "lammps"] requires-python = ">=3.8" dependencies = [ "aiida-core[atomic_tools]>=2.0.0,<3.0.0", "importlib_resources", - "jsonschema", + "jsonschema~=3.2.0", "numpy", "packaging", - "python-dateutil" + "python-dateutil", ] [project.urls] @@ -43,7 +46,7 @@ tests = [ "pytest-cov", "coverage", "pytest-timeout", - "pytest-regressions" + "pytest-regressions", ] pre-commit = [ @@ -62,7 +65,7 @@ docs = [ 'sphinxcontrib-details-directive~=0.1.0', 'sphinx-autoapi~=3.0', 'myst_parser~=1.0.0', - "furo" + "furo", ] [project.entry-points."aiida.calculations"] @@ -86,15 +89,12 @@ docs = [ name = "aiida_lammps" [tool.flit.sdist] -exclude = [ - "docs/", - "tests/", -] +exclude = ["docs/", "tests/"] [tool.coverage.run] # Configuration of [coverage.py](https://coverage.readthedocs.io) # reporting which lines of your plugin are covered by tests -source=["aiida_lammps"] +source = ["aiida_lammps"] [tool.isort] skip = ["venv"] @@ -112,7 +112,7 @@ profile = "black" [tool.tox] legacy_tox_ini = """ [tox] -envlist = pre-commit,{3.8,3.9,3.10}-aiida_lammps +envlist = pre-commit,{3.9,3.10,3.11}-aiida_lammps requires = virtualenv >= 20 isolated_build = True From 6f1458efe31ae79a7b5a8c47aa2e05ea66a373a5 Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Tue, 9 Apr 2024 11:04:58 +0200 Subject: [PATCH 02/10] Removing references to python 3.8 in the documentation. --- .github/workflows/cd.yml | 2 +- docs/source/developers/index.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 489d30a6..746de14a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -99,7 +99,7 @@ jobs: steps: - name: Checkout source uses: actions/checkout@v3.3.0 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v4.5.0 with: python-version: "3.9" diff --git a/docs/source/developers/index.md b/docs/source/developers/index.md index cf625086..9f05edd1 100644 --- a/docs/source/developers/index.md +++ b/docs/source/developers/index.md @@ -32,7 +32,7 @@ The test suite can be run in an isolated, virtual environment using `tox` (see ` ```console pip install tox -tox -e 3.8-aiida_lammps +tox -e 3.9-aiida_lammps ``` or directly: @@ -57,7 +57,7 @@ conda install lammps==2019.06.05 You can specify a different executable name for LAMMPS with: ```console -tox -e 3.8-aiida_lammps -- --lammps-exec lmp_exec +tox -e 3.9-aiida_lammps -- --lammps-exec lmp_exec ``` To output the results of calcjob executions to a specific directory: From ef8c95ea53c9658275e1f3ef877ad2c28074f3af Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Tue, 9 Apr 2024 13:56:48 +0200 Subject: [PATCH 03/10] Updating the dependencies to stop the docs from breaking. This is due to a change in aiida-core where the load_documentation_profile does not exist anymore. --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 2 +- docs/source/conf.py | 6 +++--- pyproject.toml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 746de14a..fc3f82c1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -83,7 +83,7 @@ jobs: tox -e ${{ matrix.python-version }}-aiida_lammps -- tests/ --cov=./aiida_lammps --cov-append --cov-report=xml --cov-report=term-missing - name: Upload to Codecov - if: matrix.python-version == 3.9 + if: matrix.python-version == 3.10 uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 857e64c9..9c490409 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: tox -e ${{ matrix.python-version }}-aiida_lammps -- tests/ --cov=./aiida_lammps --cov-append --cov-report=xml --cov-report=term-missing - name: Upload to Codecov - if: matrix.python-version == 3.9 + if: matrix.python-version == 3.10 uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/docs/source/conf.py b/docs/source/conf.py index 1e21a00e..da256616 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -4,11 +4,11 @@ `tox -e docs-clean` and `tox -e docs-update`, or directly: `sphinx-build -n -W --keep-going docs/source docs/_build` """ + import pathlib import time -from aiida.manage.configuration import load_documentation_profile - +from aiida.manage.configuration import Profile, load_profile from aiida_lammps import __version__ # -- AiiDA-related setup -------------------------------------------------- @@ -16,7 +16,7 @@ # Load the dummy profile even if we are running locally, this way the # documentation will succeed even if the current # default profile of the AiiDA installation does not use a Django backend. -load_documentation_profile() +load_profile(Profile("docs", {"process_control": {}, "storage": {}})) project = "AiiDA LAMMPS" copyright = f"2021-{time.localtime().tm_year}, AiiDA Team. All rights reserved" diff --git a/pyproject.toml b/pyproject.toml index da221394..76e26fa6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ keywords = ["aiida", "workflows", "lammps"] requires-python = ">=3.8" dependencies = [ - "aiida-core[atomic_tools]>=2.0.0,<3.0.0", + "aiida-core[atomic_tools]~=2.3", "importlib_resources", "jsonschema~=3.2.0", "numpy", From bcf111d31fce28562ea9c6c41e06276a1fdebf4e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 11:57:01 +0000 Subject: [PATCH 04/10] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/source/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index da256616..c229ba39 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -9,6 +9,7 @@ import time from aiida.manage.configuration import Profile, load_profile + from aiida_lammps import __version__ # -- AiiDA-related setup -------------------------------------------------- From 87279ffbb81b492866b24efd4f920f31e37c7c68 Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Tue, 9 Apr 2024 16:44:06 +0200 Subject: [PATCH 05/10] Adding tests for python 3.12 and removing references to the backend in the tests. --- .github/workflows/cd.yml | 11 +++++------ .github/workflows/ci.yml | 8 ++++---- pyproject.toml | 3 ++- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index fc3f82c1..b3a6aed8 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -31,13 +31,12 @@ jobs: include: - python-version: "3.9" lammps-version: "2020.12.24" - backend: sqlalchemy - - python-version: "3.9" - lammps-version: "2020.12.24" - backend: django - python-version: "3.10" lammps-version: "2021.09.29" - backend: django + - python-version: "3.11" + lammps-version: "2021.09.29" + - python-version: "3.12" + lammps-version: "2021.09.29" runs-on: ubuntu-latest @@ -45,7 +44,7 @@ jobs: postgres: image: postgres:12 env: - POSTGRES_DB: test_${{ matrix.backend }} + POSTGRES_DB: test POSTGRES_PASSWORD: "" POSTGRES_HOST_AUTH_METHOD: trust options: >- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c490409..d6b28764 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,14 +28,14 @@ jobs: fail-fast: false matrix: include: - - python-version: "3.9" - lammps-version: "2020.03.03" - python-version: "3.9" lammps-version: "2020.12.24" - - python-version: "3.9" - lammps-version: "2020.03.03" - python-version: "3.10" lammps-version: "2021.09.29" + - python-version: "3.11" + lammps-version: "2021.09.29" + - python-version: "3.12" + lammps-version: "2021.09.29" runs-on: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml index 76e26fa6..44b3201e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,12 +19,13 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Chemistry", "Topic :: Scientific/Engineering :: Physics", "Framework :: AiiDA", ] keywords = ["aiida", "workflows", "lammps"] -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [ "aiida-core[atomic_tools]~=2.3", "importlib_resources", From d897b8f487ec8bb99487260aac14542658e09d41 Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Tue, 9 Apr 2024 17:13:22 +0200 Subject: [PATCH 06/10] Fixing the lammps versions so that they are compatible with the python versions. --- .github/workflows/cd.yml | 10 +++++++--- .github/workflows/ci.yml | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b3a6aed8..5a52a663 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -31,12 +31,16 @@ jobs: include: - python-version: "3.9" lammps-version: "2020.12.24" + - python-version: "3.9" + lammps-version: "2023.08.02" + - python-version: "3.10" + lammps-version: "2022.06.23" - python-version: "3.10" - lammps-version: "2021.09.29" + lammps-version: "2023.08.02" - python-version: "3.11" - lammps-version: "2021.09.29" + lammps-version: "2022.06.23" - python-version: "3.12" - lammps-version: "2021.09.29" + lammps-version: "2024.02.07" runs-on: ubuntu-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6b28764..54157130 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,12 +30,16 @@ jobs: include: - python-version: "3.9" lammps-version: "2020.12.24" + - python-version: "3.9" + lammps-version: "2023.08.02" + - python-version: "3.10" + lammps-version: "2022.06.23" - python-version: "3.10" - lammps-version: "2021.09.29" + lammps-version: "2023.08.02" - python-version: "3.11" - lammps-version: "2021.09.29" + lammps-version: "2022.06.23" - python-version: "3.12" - lammps-version: "2021.09.29" + lammps-version: "2024.02.07" runs-on: ubuntu-latest From 79456e3454951a866013ef64e22e5d2b5e8d4256 Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Wed, 10 Apr 2024 11:01:17 +0200 Subject: [PATCH 07/10] Removing tests for python3.12 as lammps does not have release candidate for it --- .github/workflows/cd.yml | 2 -- .github/workflows/ci.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 5a52a663..eff458a0 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -39,8 +39,6 @@ jobs: lammps-version: "2023.08.02" - python-version: "3.11" lammps-version: "2022.06.23" - - python-version: "3.12" - lammps-version: "2024.02.07" runs-on: ubuntu-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54157130..041f0902 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,8 +38,6 @@ jobs: lammps-version: "2023.08.02" - python-version: "3.11" lammps-version: "2022.06.23" - - python-version: "3.12" - lammps-version: "2024.02.07" runs-on: ubuntu-latest From 35fbe98238c62e1cf7b7885d2ec43080ff50d789 Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Wed, 10 Apr 2024 11:15:21 +0200 Subject: [PATCH 08/10] Changing the lammps versions available for installation --- .github/workflows/cd.yml | 4 +--- .github/workflows/ci.yml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index eff458a0..ee530b9d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -32,11 +32,9 @@ jobs: - python-version: "3.9" lammps-version: "2020.12.24" - python-version: "3.9" - lammps-version: "2023.08.02" - - python-version: "3.10" lammps-version: "2022.06.23" - python-version: "3.10" - lammps-version: "2023.08.02" + lammps-version: "2022.06.23" - python-version: "3.11" lammps-version: "2022.06.23" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 041f0902..42afac46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,11 +31,9 @@ jobs: - python-version: "3.9" lammps-version: "2020.12.24" - python-version: "3.9" - lammps-version: "2023.08.02" - - python-version: "3.10" lammps-version: "2022.06.23" - python-version: "3.10" - lammps-version: "2023.08.02" + lammps-version: "2022.06.23" - python-version: "3.11" lammps-version: "2022.06.23" From dc8477faeb0d059680b84eee5bd187923335debe Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Wed, 10 Apr 2024 12:43:31 +0200 Subject: [PATCH 09/10] Changing codecov action to v2 to see if it solves the issue with the tokens --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42afac46..ea6e4e38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: - name: Upload to Codecov if: matrix.python-version == 3.10 - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} name: pytests-lammps From 1e84f30ab83c0fb1f40062dd2d97b2dd857412d3 Mon Sep 17 00:00:00 2001 From: Jonathan Chico Date: Wed, 10 Apr 2024 13:57:24 +0200 Subject: [PATCH 10/10] Bumping the version of the codecov action as this is not solving the problem with the uploading to codecov --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea6e4e38..42afac46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: - name: Upload to Codecov if: matrix.python-version == 3.10 - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} name: pytests-lammps