Skip to content

Commit

Permalink
Update workflows to 3.12 and 2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinfriede committed Sep 19, 2024
1 parent 552adc3 commit 6a12fac
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 50 deletions.
104 changes: 104 additions & 0 deletions .github/workflows/macos-arm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# This file is part of tad-multicharge.
#
# SPDX-Identifier: Apache-2.0
# Copyright (C) 2024 Grimme Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Tests (macOS arm)

on:
push:
branches:
- main
- master
paths-ignore:
- "doc*/**"
- "./*.ya?ml"
- "**/*.md"
- "**/*.rst"

pull_request:
paths-ignore:
- "doc*/**"
- "./*.ya?ml"
- "**/*.md"
- "**/*.rst"

workflow_dispatch:

jobs:
main:
strategy:
fail-fast: false
matrix:
os: [macos-14]
# Python 3.8/3.9 is not on macos-latest (macos-14-arm64)
# https://github.com/actions/setup-python/issues/696
python-version: ["3.10", "3.11"]
# only test oldest and newest version of torch
torch-version: ["1.11.0", "2.4.1"]
exclude:
# Check latest versions here: https://download.pytorch.org/whl/torch/
#
# PyTorch issues:
# 3.11: https://github.com/pytorch/pytorch/issues/86566
# 3.12: https://github.com/pytorch/pytorch/issues/110436
# 3.13: https://github.com/pytorch/pytorch/issues/1302496
#
# PyTorch<2.2 does only support Python<3.12 (all platforms)
- 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<2.0 does only support Python<3.11 (macOS and Windows)
- python-version: "3.11"
torch-version: "1.11.0"
- python-version: "3.11"
torch-version: "1.12.1"
- python-version: "3.11"
torch-version: "1.13.1"

runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash {0}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install tox
- name: Determine TOXENV
run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-torch$(echo ${{ matrix.torch-version }} | tr -d '.')" >> $GITHUB_ENV

- name: Print TOXENV
run: echo "TOXENV is set to '${{ env.TOXENV }}'."

- name: Unittests with tox
run: tox -e ${{ env.TOXENV }}
34 changes: 19 additions & 15 deletions .github/workflows/macos.yaml → .github/workflows/macos-x86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Tests (macOS)
name: Tests (macOS x86)

on:
push:
Expand All @@ -41,34 +41,38 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, macos-13, macos-14]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [macos-12, macos-13]
python-version: ["3.8", "3.9", "3.10", "3.11"]
# 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 issues:
# 3.11: https://github.com/pytorch/pytorch/issues/86566
# 3.12: https://github.com/pytorch/pytorch/issues/110436
# 3.13: https://github.com/pytorch/pytorch/issues/130249
#
# PyTorch does now support Python 3.12 (macOS only 2.2)
# see: https://github.com/pytorch/pytorch/issues/110436
# Wheels for macOS x86_64 are deprecated since 2.3.0
#
# PyTorch<2.2 does only support Python<3.12 (all platforms)
- 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.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<2.0 does only support Python<3.11 (macOS and Windows)
- python-version: "3.11"
torch-version: "1.11.0"
- python-version: "3.11"
torch-version: "1.12.1"
- python-version: "3.11"
torch-version: "1.13.1"
# Python 3.8/3.9 is not on macos-latest (macos-14-arm64)
# https://github.com/actions/setup-python/issues/696
- os: macos-14
python-version: "3.8"
- os: macos-14
python-version: "3.9"

runs-on: ${{ matrix.os }}

Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@ 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", "2.3.1"]
torch-version: ["1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2", "2.3.1", "2.4.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 issues:
# 3.11: https://github.com/pytorch/pytorch/issues/86566
# 3.12: https://github.com/pytorch/pytorch/issues/110436
# 3.13: https://github.com/pytorch/pytorch/issues/130249
#
# PyTorch does now support Python 3.12 (Linux) for 2.2.0 and newer
# see: https://github.com/pytorch/pytorch/issues/110436
# PyTorch<2.2.0 does only support Python<3.12 (all platforms)
- python-version: "3.12"
torch-version: "1.11.0"
- python-version: "3.12"
Expand All @@ -62,7 +63,7 @@ jobs:
torch-version: "2.0.1"
- python-version: "3.12"
torch-version: "2.1.2"
# PyTorch<1.13.0 does only support Python=<3.10
# PyTorch<1.13.0 does only support Python<3.11 (Linux)
- python-version: "3.11"
torch-version: "1.11.0"
- python-version: "3.11"
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,34 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
# only test oldest and newest version of torch
torch-version: ["1.11.0", "2.2.2"]
torch-version: ["1.11.0", "2.4.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 issues:
# 3.11: https://github.com/pytorch/pytorch/issues/86566
# 3.12: https://github.com/pytorch/pytorch/issues/110436
# 3.13: https://github.com/pytorch/pytorch/issues/130249
#
# PyTorch does not support Python 3.12 (all platforms)
# see: https://github.com/pytorch/pytorch/issues/110436
# PyTorch<2.2.0 does only support Python<3.12 (all platforms)
- python-version: "3.12"
torch-version: "1.11.0"
# PyTorch<1.13.0 does only support Python=<3.10
- 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<2.0.0 does only support Python<3.11 (macOS and Windows)
- python-version: "3.11"
torch-version: "1.11.0"
- python-version: "3.11"
torch-version: "1.12.1"
# On macOS and Windows, 1.13.x is also not supported for Python>=3.10
- os: windows-latest
python-version: "3.11"
- python-version: "3.11"
torch-version: "1.13.1"

runs-on: ${{ matrix.os }}
Expand Down
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<tr>
<td>Compatibility:</td>
<td>
<img src="https://img.shields.io/badge/Python-3.8%20|%203.9%20|%203.10%20|%203.11-blue.svg" alt="Python Versions"/>
<img src="https://img.shields.io/badge/Python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12-blue.svg" alt="Python Versions"/>
<img src="https://img.shields.io/badge/PyTorch-%3E=1.11.0-blue.svg" alt="PyTorch Versions"/>
</td>
</tr>
Expand All @@ -31,8 +31,11 @@
<a href="https://github.com/tad-mctc/tad-multicharge/actions/workflows/ubuntu.yaml">
<img src="https://github.com/tad-mctc/tad-multicharge/actions/workflows/ubuntu.yaml/badge.svg" alt="Test Status Ubuntu"/>
</a>
<a href="https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos.yaml">
<img src="https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos.yaml/badge.svg" alt="Test Status macOS"/>
<a href="https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos-x86.yaml">
<img src="https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos-x86.yaml/badge.svg" alt="Test Status macOS (x86)"/>
</a>
<a href="https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos-arm.yaml">
<img src="https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos-arm.yaml/badge.svg" alt="Test Status macOS (ARM)"/>
</a>
<a href="https://github.com/tad-mctc/tad-multicharge/actions/workflows/windows.yaml">
<img src="https://github.com/tad-mctc/tad-multicharge/actions/workflows/windows.yaml/badge.svg" alt="Test Status Windows"/>
Expand Down Expand Up @@ -120,6 +123,26 @@ The following dependencies are required
- [pytest](https://docs.pytest.org/) (tests only)
- [torch](https://pytorch.org/)


## Compatibility

| PyTorch \ Python | 3.8 | 3.9 | 3.10 | 3.11 | 3.12 |
|------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
| 1.11.0 | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
| 1.12.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| 1.13.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
| 2.0.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
| 2.1.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
| 2.2.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2.3.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| 2.4.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |

Note that only the latest bug fix version is listed, but all preceding bug fix minor versions are supported.
For example, although only version 2.2.2 is listed, version 2.2.0 and 2.2.1 are also supported.

On macOS and Windows, PyTorch<2.0.0 does only support Python<3.11.


## Development

For development, additionally install the following tools in your environment.
Expand Down
12 changes: 8 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Torch Autodiff Multicharge
==========================

.. image:: https://img.shields.io/badge/python-%3E=3.8-blue.svg
:target: https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10%20|%203.11-blue.svg
:target: https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12-blue.svg
:alt: Python Versions

.. image:: https://img.shields.io/github/v/release/tad-mctc/tad-multicharge
Expand All @@ -25,9 +25,13 @@ Torch Autodiff Multicharge
:target: https://github.com/tad-mctc/tad-multicharge/actions/workflows/ubuntu.yaml
:alt: Test Status Ubuntu

.. image:: https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos.yaml/badge.svg
:target: https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos.yaml
:alt: Test Status macOS
.. image:: https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos-x86.yaml/badge.svg
:target: https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos-x86.yaml
:alt: Test Status macOS (x86)

.. image:: https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos-arm.yaml/badge.svg
:target: https://github.com/tad-mctc/tad-multicharge/actions/workflows/macos-arm.yaml
:alt: Test Status macOS (ARM)

.. image:: https://github.com/tad-mctc/tad-multicharge/actions/workflows/windows.yaml/badge.svg
:target: https://github.com/tad-mctc/tad-multicharge/actions/workflows/windows.yaml
Expand Down
8 changes: 4 additions & 4 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ channels:
- conda-forge
- pytorch
dependencies:
- python>=3.8
- pytorch>=1.11.0
- pip:
- tad-mctc>=0.0.2
- numpy<2
- python>=3.8,<3.13
- pytorch>=1.11.0,<2.5
- tad-mctc>=0.0.2
15 changes: 12 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ author = "Marvin Friede"
license = Apache-2.0
license_files = LICENSE
classifiers =
Framework :: Pytest
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: Apache Software License
Natural Language :: English
Operating System :: MacOS
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Operating System :: POSIX :: Linux
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Expand All @@ -19,15 +24,19 @@ classifiers =
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Chemistry
Typing :: Typed
project_urls =
Documentation = https://tad-multicharge.readthedocs.io/en/latest/
Source Code = https://github.com/tad-mctc/tad-multicharge
Tracker = https://github.com/tad-mctc/tad-multicharge/issues

[options]
packages = find:
install_requires =
numpy<2
tad-mctc
torch>=1.11,<2.4
torch>=1.11,<2.5
python_requires = >=3.8, <3.13
package_dir =
=src
Expand Down
Loading

0 comments on commit 6a12fac

Please sign in to comment.