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

Bump min Python version 3.7 #262

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
include:
- os: ubuntu-20.04
python-version: "3.7"
python-version: "3.8"
- os: ubuntu-20.04
python-version: "3.11"
- os: macos-11
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
name: Python ${{ matrix.python-version }} / check build
strategy:
matrix:
python-version: ['3.7', '3.11']
python-version: ['3.8', '3.11']
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/torch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
include:
- os: ubuntu-20.04
torch-version: 1.11.*
python-version: "3.7"
python-version: "3.8"
cargo-test-flags: --release

- os: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "rascaline"
dynamic = ["version", "authors", "optional-dependencies"]
requires-python = ">=3.7"
requires-python = ">=3.8"

readme = "README.rst"
license = {text = "BSD-3-Clause"}
Expand Down
2 changes: 1 addition & 1 deletion python/rascaline-torch/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "rascaline-torch"
dynamic = ["version", "authors", "dependencies"]
requires-python = ">=3.7"
requires-python = ">=3.8"

readme = "README.rst"
license = {text = "BSD-3-Clause"}
Expand Down
12 changes: 2 additions & 10 deletions python/rascaline-torch/rascaline/torch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import sys
import importlib.metadata


if (sys.version_info.major >= 3) and (sys.version_info.minor >= 8):
import importlib.metadata

__version__ = importlib.metadata.version("rascaline-torch")

else:
from pkg_resources import get_distribution

__version__ = get_distribution("rascaline-torch").version
__version__ = importlib.metadata.version("rascaline-torch")


from ._c_lib import _load_library
Expand Down
12 changes: 2 additions & 10 deletions python/rascaline/rascaline/version.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import sys
import importlib.metadata


if (sys.version_info.major >= 3) and (sys.version_info.minor >= 8):
import importlib.metadata

__version__ = importlib.metadata.version("rascaline")

else:
from pkg_resources import get_distribution

__version__ = get_distribution("rascaline").version
__version__ = importlib.metadata.version("rascaline")
30 changes: 15 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
min_version = 4.0
min_version = 4.9.0
# these are the default environments, i.e. the list of tests running when you
# execute `tox` in the command-line without anything else
envlist =
Expand Down Expand Up @@ -31,14 +31,11 @@ test_options =
--cov-report= \
--import-mode=append

commands =
# error if the user gives a wrong testenv name in `tox -e`
python -c "import sys; print('environement {env_name} does not exist'); sys.exit(1)"


[testenv:build-rascaline]
# This environment is only used to build the wheels which are then re-used by
# all other environments requiring rascaline to be installed
description =
This environment is only used to build the wheels which are then re-used by
all other environments requiring rascaline to be installed
passenv = *
deps =
setuptools
Expand All @@ -50,8 +47,9 @@ commands =


[testenv:all-deps]
# Run Python unit tests with all dependencies installed (ase & chemfiles are
# optional dependencies)
description =
Run Python unit tests with all dependencies installed (ase & chemfiles are optional
dependencies)
deps =
{[testenv]metatensor-core-requirement}
ase
Expand All @@ -70,7 +68,7 @@ commands =


[testenv:min-deps]
# Run Python unit tests with the minimal dependencies installed
description = Run Python unit tests with the minimal dependencies installed
deps =
{[testenv]metatensor-core-requirement}
pytest
Expand All @@ -81,6 +79,7 @@ commands =


[testenv:torch-tests]
description = Run Python unit tests using torch
deps =
{[testenv]metatensor-torch-requirement}

Expand All @@ -101,6 +100,7 @@ commands =
pytest {[testenv]test_options} --assert=plain {posargs}

[testenv:docs]
description = Build the package documentation.
deps =
-r docs/requirements.txt
cmake
Expand All @@ -118,7 +118,7 @@ commands =


[testenv:docs-tests]
# this environement runs the doctests defined in any metatensor package
description = Runs the doctests defined in any metatensor package
deps =
{[testenv]metatensor-core-requirement}
ase
Expand All @@ -129,8 +129,9 @@ commands =


[testenv:lint]
# lint the Python code with flake8 (code linter), black (code formatter), and
# isort (sorting of imports)
description =
lint the Python code with flake8 (code linter), black (code formatter), and isort
(sorting of imports)
package = skip
deps =
black
Expand All @@ -148,9 +149,8 @@ commands =


[testenv:format]
description = Abuse tox to do actual formatting on all files.
package = skip
# Abuse tox to do actual formatting. Users can call `tox -e format` to run
# formatting on all files
deps =
black
blackdoc
Expand Down