Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into pydantic-2
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwthompson committed Feb 22, 2024
2 parents c92b063 + d8e1d7a commit 8b16da3
Show file tree
Hide file tree
Showing 85 changed files with 90,860 additions and 4,818 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:

- name: Run mypy
if: ${{ matrix.rdkit == true && matrix.openeye == true }}
run: mypy -p "openff.toolkit" --exclude "openff/toolkit/data"
run: mypy -p "openff.toolkit"

- name: Run unit tests
run: |
Expand All @@ -170,15 +170,19 @@ jobs:
- name: Run notebooks in docs
if: ${{ matrix.rdkit == true && matrix.openeye == true && matrix.pydantic-version == 1 }}
run: |
pytest -v --no-cov --nbval --ignore docs/_build/ docs/
pytest -v --no-cov --durations=5 --nbval --ignore docs/_build/ docs/
- name: Run examples in docstrings
if: ${{ matrix.rdkit == true && matrix.openeye == true && matrix.pydantic-version == 1 }}
run: |
pytest -v --no-cov --doctest-modules --ignore=openff/toolkit/_tests/ --ignore=openff/toolkit/data/ --ignore=openff/toolkit/utils/utils.py openff/
pytest openff \
-v -x -n logical --no-cov --doctest-modules \
--ignore-glob='openff/toolkit/_tests*' \
--ignore=openff/toolkit/data/ \
--ignore=openff/toolkit/utils/utils.py
- name: Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/beta_rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
pytest -v --doctest-glob="docs/*.rst" --doctest-glob="docs/*.md" docs/
- name: Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
PACKAGE: openff
PYTEST_ARGS: -r fE --tb=short
NB_ARGS: -v --nbval-lax --ignore=examples/deprecated --durations=20
PYTEST_ARGS: -r fE -v -x --tb=short -nauto
NB_ARGS: --nbval-lax --dist loadscope --ignore=examples/deprecated

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -140,9 +140,14 @@ jobs:
NB_ARGS+=" --ignore=examples/check_dataset_parameter_coverage"
NB_ARGS+=" --ignore=examples/conformer_energies"
NB_ARGS+=" --ignore=examples/using_smirnoff_in_amber_or_gromacs"
NB_ARGS+=" --ignore=examples/toolkit_showcase"
NB_ARGS+=" --ignore=examples/using_smirnoff_with_amber_protein_forcefield"
NB_ARGS+=" --ignore=examples/SMIRNOFF_simulation"
NB_ARGS+=" --ignore=examples/toolkit_showcase"
fi
# GROMACS builds are not stable on macOS + GHA
if [[ ${{ matrix.os }} == macos-latest ]]; then
NB_ARGS+=" --ignore=examples/using_smirnoff_in_amber_or_gromacs/"
fi
python -m pytest $PYTEST_ARGS $NB_ARGS examples
2 changes: 1 addition & 1 deletion .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
ls build
- name: Upload installer as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_py${{ matrix.python-version }}.sh
path: toolkit-installer-constructor/build/openff-toolkit*/openff-toolkit*.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
ci:
autoupdate_schedule: "quarterly"
files: ^openff|(^examples/((?!deprecated).)*$)
files: ^openff|(^examples/((?!deprecated).)*$)|^docs
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
exclude: '\.(json|pdb)$'
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.1.1
hooks:
- id: black
- id: black-jupyter
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
files: ^openff
Expand All @@ -27,11 +27,11 @@ repos:
'flake8-bugbear',
]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
rev: 1.7.1
hooks:
- id: nbqa-pyupgrade
args:
- --py37-plus
- --py39-plus
- id: nbqa-isort
- id: nbqa-flake8
args:
Expand Down
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
version: 2
sphinx:
configuration: docs/conf.py
fail_on_warning: true
build:
os: ubuntu-20.04
tools:
Expand Down
5 changes: 4 additions & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ This behavior is in line with OpenFF's general attitude of requiring users to ex

## I'm having troubles installing the OpenFF Toolkit on my Apple Silicon Mac.

As of August 2022, some upstreams (at least AmberTools, possibly more) are not built on `osx-arm64`, so installing the OpenFF stack is only possible with [Rosetta](https://support.apple.com/en-au/HT211861). See the [platform support](installation/m1) section of the installation documentation for more.
As of August 2022, some upstreams (at least AmberTools, possibly more) are not built on `osx-arm64`, so installing the OpenFF stack is only possible with [Rosetta]. See the [platform support] section of the installation documentation for more.

(Keywords `osx-arm64`, M1 Mac, M2 Mac)

[Rosetta]: https://support.apple.com/en-au/HT211861
[platform support]: inv:#install_arm

## My mamba/conda installation of the toolkit doesn't appear to work. What should I try next?

We recommend that you install the toolkit in a fresh environment, explicitly passing the channels to be used, in-order:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| **Status** | [![GH Actions Status](https://github.com/openforcefield/openff-toolkit/workflows/CI/badge.svg)](https://github.com/openforcefield/openff-toolkit/actions?query=branch%3Amain+workflow%3ACI) [![Codecov coverage](https://img.shields.io/codecov/c/github/openforcefield/openff-toolkit.svg?logo=Codecov&logoColor=white)](https://codecov.io/gh/openforcefield/openff-toolkit) |
| :------ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Latest Release** | [![Last release tag](https://img.shields.io/github/release-pre/openforcefield/openff-toolkit.svg)](https://github.com/openforcefield/openff-toolkit/releases) [![Commits since release](https://img.shields.io/github/commits-since/openforcefield/openff-toolkit/0.14.4.svg)](https://github.com/openforcefield/openff-toolkit/releases/tag/0.14.4) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8412072.svg)](https://doi.org/10.5281/zenodo.8412072)
| **Latest Release** | [![Last release tag](https://img.shields.io/github/release-pre/openforcefield/openff-toolkit.svg)](https://github.com/openforcefield/openff-toolkit/releases) [![Commits since release](https://img.shields.io/github/commits-since/openforcefield/openff-toolkit/0.15.2.svg)](https://github.com/openforcefield/openff-toolkit/releases/tag/0.15.2)[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10613658.svg)](https://doi.org/10.5281/zenodo.10613658)
| **Communication** | [![docs stable](https://img.shields.io/badge/docs-stable-5077AB.svg?logo=read%20the%20docs)](https://open-forcefield-toolkit.readthedocs.io/) [![user & dev discussions](https://img.shields.io/badge/user%20%26%20dev%20discussions-GitHub-red?logo=github)](https://github.com/openforcefield/discussions/discussions) |
| **Foundation** | [![license](https://img.shields.io/github/license/openforcefield/openff-toolkit.svg)](https://opensource.org/licenses/MIT) [![platforms](https://img.shields.io/badge/Platforms-Linux%2C%20MacOS-orange.svg)](https://open-forcefield-toolkit.readthedocs.io/en/stable/installation.html) [![python](https://img.shields.io/badge/python-3.9%2C%203.10%2C%203.11-blue.svg)](https://open-forcefield-toolkit.readthedocs.io/en/stable/installation.html) [![Funding](https://img.shields.io/badge/Funding-Open%20Force%20Field%20Consortium-brightgreen.svg)](http://openforcefield.org) |
| **Installation** | [![Releases](https://img.shields.io/badge/obtain-latest-green.svg)](https://github.com/openforcefield/openff-toolkit/releases) [![Conda](https://img.shields.io/conda/v/conda-forge/openff-toolkit.svg)](https://anaconda.org/conda-forge/openff-toolkit) [![Last updated](https://anaconda.org/conda-forge/openff-toolkit/badges/latest_release_relative_date.svg)](https://anaconda.org/conda-forge/openff-toolkit) [![Anaconda Cloud downloads](https://anaconda.org/conda-forge/openff-toolkit/badges/downloads.svg)](https://anaconda.org/conda-forge/openff-toolkit) |
Expand All @@ -21,7 +21,7 @@ The toolkit currently covers two main areas we have committed to stably maintain

## How to cite

Please cite the OpenFF Toolkit using the [Zenodo record](https://zenodo.org/record/7506404) of the [latest release](https://zenodo.org/record/7506404) or the version that was used. The BibTeX reference of the latest release can be found [here](https://zenodo.org/record/7506404/export/hx#.Y7cYbOzMKrM).
Please cite the OpenFF Toolkit using the [Zenodo record](https://zenodo.org/record/10103216) of the [latest release](https://zenodo.org/record/10103216) or the version that was used. The BibTeX reference of the latest release can be found [here](https://zenodo.org/record/10103216/export/hx#.Y7cYbOzMKrM).

## Installation

Expand Down
9 changes: 7 additions & 2 deletions devtools/conda-envs/beta_rc_env.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: openff-toolkit-beta-rc-test
channels:
- conda-forge/label/openmm_rc
- openeye/label/rc
Expand All @@ -18,8 +18,9 @@ dependencies:
- openff-forcefields >=2023.05.1
- smirnoff99Frosst
- openff-units =0.2.0
- openff-amber-ff-ports
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.10
- openff-interchange-base >=0.3.17
- openff-nagl-base ==0.3.0
- openff-nagl-models ==0.1.0
# Toolkit-specific
Expand All @@ -35,6 +36,10 @@ dependencies:
- toml
- bson
- msgpack-python
- qcelemental
- qcportal >=0.50
- qcengine
- nglview
- mdtraj
- nbval
- mypy
Expand Down
2 changes: 1 addition & 1 deletion devtools/conda-envs/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ dependencies:
# Base depends
- openff-toolkit-examples
# Tests
- pytest
- pytest=7.4
- pytest-rerunfailures
2 changes: 1 addition & 1 deletion devtools/conda-envs/conda_oe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ dependencies:
- openff-toolkit-examples
# Tests
- openeye-toolkits
- pytest
- pytest=7.4
- pytest-rerunfailures
10 changes: 5 additions & 5 deletions devtools/conda-envs/openeye-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@ dependencies:
- xmltodict
- python-constraint
- openmm >=7.6
- openff-forcefields >=2023.05.1
- openff-forcefields >=2023.11
- smirnoff99Frosst
- openff-amber-ff-ports >=0.0.3
- openff-units =0.2.0
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.10
- openff-interchange-base >=0.3.17
- openff-nagl-base ==0.3.0
- openff-nagl-models ==0.1.0
- typing_extensions
- nglview
# Toolkit-specific
- openeye-toolkits
# Test-only/optional/dev/typing/examples
- pytest
- pytest-cov
- pytest-xdist
- pytest-rerunfailures
- pyyaml
- toml
- bson
- msgpack-python
- qcelemental
- qcportal ==0.15.8
- qcportal >=0.50
- qcengine
- mdtraj
- parmed =3
- nbval
- pdbfixer
- openmmforcefields >=0.11.2
- gromacs >=2021=nompi*
- gromacs =2023.3=nompi_*_101
4 changes: 2 additions & 2 deletions devtools/conda-envs/openeye.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- openff-units =0.2.0
- openff-amber-ff-ports
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.10
- openff-interchange-base >=0.3.17
- openff-nagl-base ==0.3.0
- openff-nagl-models ==0.1.0
- typing_extensions
Expand All @@ -34,7 +34,7 @@ dependencies:
- bson
- msgpack-python
- qcelemental
- qcportal ==0.15.8
- qcportal >=0.50
- qcengine
- mdtraj
- nglview
Expand Down
9 changes: 5 additions & 4 deletions devtools/conda-envs/rdkit-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,34 @@ dependencies:
- xmltodict
- python-constraint
- openmm >=7.6
- openff-forcefields >=2023.05.1
- openff-forcefields >=2023.11
- smirnoff99Frosst
- openff-amber-ff-ports >=0.0.3
- openff-units =0.2.0
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.10
- openff-interchange-base >=0.3.17
- openff-nagl-base ==0.3.0
- openff-nagl-models ==0.1.0
- typing_extensions
- nglview
# Toolkit-specific
# AmberTools 23 brings in ParmEd 4, which doesn't yet work with examples
# https://github.com/openforcefield/openff-toolkit/issues/1532
- ambertools =22.4
- rdkit
# Test-only/optional/dev/typing/examples
- pytest
- pytest-cov
- pytest-xdist
- pytest-rerunfailures
- pyyaml
- toml
- bson
- msgpack-python
- qcelemental
- qcportal >=0.50
- qcengine
- nbval
- mdtraj
- pdbfixer
- openmmforcefields >=0.11.2
- gromacs >=2021=nompi*
- gromacs =2023.3=nompi_*_101
4 changes: 2 additions & 2 deletions devtools/conda-envs/rdkit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- openff-units =0.2.0
- openff-amber-ff-ports
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.10
- openff-interchange-base >=0.3.17
- openff-nagl-base ==0.3.0
- openff-nagl-models ==0.1.0
- typing_extensions
Expand All @@ -34,6 +34,6 @@ dependencies:
- bson
- msgpack-python
- qcelemental
- qcportal ==0.15.8
- qcportal >=0.50
- qcengine
- nglview
6 changes: 4 additions & 2 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
- openff-units =0.2.0
- openff-amber-ff-ports
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.10
- openff-interchange-base >=0.3.17
- openff-nagl-base ==0.3.0
- openff-nagl-models ==0.1.0
# Toolkit-specific
Expand All @@ -36,11 +36,13 @@ dependencies:
- bson
- msgpack-python
- qcelemental
- qcportal ==0.15.8
- qcportal >=0.50
- qcengine
- nglview
- mdtraj
- nbval
# No idea why this is necessary, see https://github.com/openforcefield/openff-toolkit/pull/1821
- nomkl
- mypy
- typing_extensions
- pip:
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/images/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/_templates/autosummary/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ but free functions do not.

.. currentmodule:: {{ module }}

.. auto{{ objtype }}:: {{ objname }}
.. auto{{ objtype }}:: {{ objname }}
Loading

0 comments on commit 8b16da3

Please sign in to comment.