Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

116 dependabot tests failing for python38 #119

Merged
Merged
24 changes: 10 additions & 14 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,26 +29,22 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: "3.8"
lammps-version: "2020.12.24"
backend: django
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove all the other backend occurrences. The difference between django/sqlalchemy was removed in AiiDA v2, it no longer makes sense.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! thanks, I suspected it just was not sure why it was there in the latest release.

- python-version: "3.8"
lammps-version: "2020.12.24"
backend: sqlalchemy
- python-version: "3.9"
lammps-version: "2020.12.24"
backend: django
- python-version: "3.9"
lammps-version: "2022.06.23"
- python-version: "3.10"
lammps-version: "2021.09.29"
backend: django
lammps-version: "2022.06.23"
- python-version: "3.11"
lammps-version: "2022.06.23"

runs-on: ubuntu-latest

services:
postgres:
image: postgres:12
env:
POSTGRES_DB: test_${{ matrix.backend }}
POSTGRES_DB: test
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
Expand Down Expand Up @@ -86,7 +82,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.10
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -102,10 +98,10 @@ 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.8"
python-version: "3.9"
- name: install flit
run: |
pip install flit~=3.4
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,16 +28,14 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: "3.8"
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"
lammps-version: "2020.03.03"
lammps-version: "2022.06.23"
- python-version: "3.10"
lammps-version: "2021.09.29"
lammps-version: "2022.06.23"
- python-version: "3.11"
lammps-version: "2022.06.23"

runs-on: ubuntu-latest

Expand Down Expand Up @@ -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.10
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
5 changes: 3 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +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__

Expand All @@ -16,7 +17,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"
Expand Down
4 changes: 2 additions & 2 deletions docs/source/developers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
33 changes: 17 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,34 @@ 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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add this, maybe also add 3.11 to the test matrix of the CI? Also, please update requires-python to be >=3.9. Finally, do you also want to add 3.12 perhaps? aiida-core supports it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sphuber !
Thanks for the comments, I wonder if adding the 3.12 is okay since well the plugin supports it but I have not found a lammps release candidate that can be installed with conda for python 3.12 (in general it is a bit of a pain to see which version of lammps is compatible with which python version since the only way seems to look into the conda wheels)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does lammps depend on Python?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only on the sense on how we install it, we install lammps using conda in the action, and then we use the same python version for aiida. So if we install install python 3.12 there is no lammps conda release for it.
We could install it in some other way, it is possible to do it via apt, but the versioning is a bit unclear there

"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Physics",
"Framework :: AiiDA"
"Framework :: AiiDA",
]
keywords = ["aiida", "workflows", "lammps"]
requires-python = ">=3.8"
requires-python = ">=3.9"
dependencies = [
"aiida-core[atomic_tools]>=2.0.0,<3.0.0",
"aiida-core[atomic_tools]~=2.3",
"importlib_resources",
"jsonschema",
"jsonschema~=3.2.0",
"numpy",
"packaging",
"python-dateutil"
"python-dateutil",
]

[project.urls]
Expand All @@ -43,7 +47,7 @@ tests = [
"pytest-cov",
"coverage",
"pytest-timeout",
"pytest-regressions"
"pytest-regressions",
]

pre-commit = [
Expand All @@ -62,7 +66,7 @@ docs = [
'sphinxcontrib-details-directive~=0.1.0',
'sphinx-autoapi~=3.0',
'myst_parser~=1.0.0',
"furo"
"furo",
]

[project.entry-points."aiida.calculations"]
Expand All @@ -86,15 +90,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"]
Expand All @@ -112,7 +113,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

Expand Down
Loading