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

[pull] main from dftd3:main #11

Merged
merged 3 commits into from
Jun 29, 2024
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
5 changes: 4 additions & 1 deletion .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,15 @@ jobs:
# only test oldest and newest version of torch
torch-version: ["1.11.0", "2.2.2"]
exclude:
# Check latest versions here: https://download.pytorch.org/whl/torch/
#
# PyTorch now fully supports Python=<3.11
# see: https://github.com/pytorch/pytorch/issues/86566
#
# PyTorch does not support Python 3.12 (all platforms)
# PyTorch does now support Python 3.12 (macOS only 2.2)
# see: https://github.com/pytorch/pytorch/issues/110436
- python-version: "3.12"
torch-version: "1.11.0"
# PyTorch<1.13.0 does only support Python=<3.10
# On macOS and Windows, 1.13.x is also not supported for Python>=3.10
- python-version: "3.11"
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,25 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
torch-version: ["1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2"]
torch-version: ["1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2", "2.3.1"]
exclude:
# Check latest versions here: https://download.pytorch.org/whl/torch/
#
# PyTorch now fully supports Python=<3.11
# see: https://github.com/pytorch/pytorch/issues/86566
#
# PyTorch does not support Python 3.12 (all platforms)
# PyTorch does now support Python 3.12 (Linux) for 2.2.0 and newer
# see: https://github.com/pytorch/pytorch/issues/110436
- python-version: "3.12"
torch-version: "1.11.0"
- python-version: "3.12"
torch-version: "1.12.1"
- python-version: "3.12"
torch-version: "1.13.1"
- python-version: "3.12"
torch-version: "2.0.1"
- python-version: "3.12"
torch-version: "2.1.2"
# PyTorch<1.13.0 does only support Python=<3.10
- python-version: "3.11"
torch-version: "1.11.0"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ jobs:
# only test oldest and newest version of torch
torch-version: ["1.11.0", "2.2.2"]
exclude:
# Check latest versions here: https://download.pytorch.org/whl/torch/
#
# PyTorch now fully supports Python=<3.11
# see: https://github.com/pytorch/pytorch/issues/86566
#
# PyTorch does not support Python 3.12 (all platforms)
# see: https://github.com/pytorch/pytorch/issues/110436
- os: windows-latest
python-version: "3.12"
- python-version: "3.12"
torch-version: "1.11.0"
# PyTorch<1.13.0 does only support Python=<3.10
- python-version: "3.11"
torch-version: "1.11.0"
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repos:
]

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py37-plus, --keep-runtime-typing]
Expand Down
7 changes: 4 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: Implementation :: CPython
project_urls =
Documentation = https://tad-dftd3.readthedocs.io/en/latest/
Expand All @@ -23,10 +24,10 @@ project_urls =
[options]
packages = find:
install_requires =
numpy
numpy<2
tad-mctc
torch
python_requires = >=3.8
torch>=1.11,<2.4
python_requires = >=3.8, <3.13
include_package_data = True
package_dir =
=src
Expand Down
2 changes: 1 addition & 1 deletion src/tad_dftd3/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
"""
Version module for *tad-dftd3*.
"""
__version__ = "0.2.2"
__version__ = "0.3.0"
9 changes: 9 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
"""Name of Device."""


# A bug in PyTorch 2.3.0 and 2.3.1 somehow requires manual import of
# `torch._dynamo` to avoid errors with functorch in custom backward
# functions. See https://github.com/pytorch/pytorch/issues/128607.
from tad_mctc._version import __tversion__

if __tversion__ in ((2, 3, 0), (2, 3, 1)):
import torch._dynamo


def pytest_addoption(parser: pytest.Parser) -> None:
"""Set up additional command line options."""

Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ envlist =
py39-torch{1110,1121,1131,201,212,222},
py310-torch{1110,1121,1131,201,212,222},
py311-torch{1131,201,212,221}
py312-torch{222,231}

[testenv]
setenv =
Expand All @@ -39,6 +40,8 @@ deps =
torch220: torch==2.2.0
torch221: torch==2.2.1
torch222: torch==2.2.2
torch230: torch==2.3.0
torch231: torch==2.3.1
.[tox]
commands =
pytest -vv {posargs: \
Expand Down
Loading