Skip to content

Commit

Permalink
MAINT: Consolidate Python config in pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwthompson committed Jan 16, 2025
1 parent b623003 commit ab32ee7
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 129 deletions.
14 changes: 0 additions & 14 deletions .codecov.yml

This file was deleted.

7 changes: 2 additions & 5 deletions .github/workflows/beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:

env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
COV: --cov=openff/interchange --cov-report=xml --cov-config=setup.cfg --cov-append

steps:
- uses: actions/checkout@v4
Expand All @@ -52,9 +51,7 @@ jobs:
python=${{ matrix.python-version }}
- name: Install package
run: |
micromamba remove --force openff-interchange openff-interchange-base
python -m pip install . plugins/
run: python -m pip install . plugins/

- name: Install and license OpenEye Toolkits
if: ${{ matrix.openeye == true }}
Expand All @@ -71,7 +68,7 @@ jobs:

- name: Run all tests
if: always()
run: python -m pytest -v $COV openff/interchange/
run: python -m pytest -v openff/interchange/

- name: Codecov
uses: codecov/codecov-action@v5
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:

env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
COV: --cov=openff/interchange --cov-report=xml --cov-config=setup.cfg --cov-append

steps:
- uses: actions/checkout@v4
Expand All @@ -52,11 +51,7 @@ jobs:
python=${{ matrix.python-version }}
- name: Install package
run: |
# These packages are brought in by conda (via the toolkit) and must be removed manually
# since pip doesn't know about the -base split and does not uninstall the -base package
micromamba remove --force openff-interchange openff-interchange-base
python -m pip install . plugins/
run: python -m pip install . plugins/

- name: Install and license OpenEye Toolkits
if: ${{ matrix.openeye == true }}
Expand Down Expand Up @@ -85,9 +80,6 @@ jobs:
# and also uninstalls RDKit
run: micromamba install rdkit "ambertools =23" "lammps >=2023.08.02" "jax >=0.3" "jaxlib >=0.3" -c conda-forge

- name: Install Foyer
run: micromamba install "foyer >=0.12.1" -c conda-forge -yq

- name: Run tests
run: python -m pytest $COV openff/interchange/ -r fExs -n logical --durations=10

Expand Down
1 change: 1 addition & 0 deletions devtools/conda-envs/examples_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies:
- mdtraj
- pytest
- pytest-xdist
- pytest-cov
- nbval
# Examples
- openmmforcefields
Expand Down
1 change: 0 additions & 1 deletion devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ dependencies:
- openff-nagl-models ~=0.3
- mbuild =1
- foyer =1
- gmso ~=0.12
- nglview
# Drivers
- gromacs
Expand Down
2 changes: 1 addition & 1 deletion docs/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Style is enforced with automated linters that run in CI. See `.github/workflows/

### Type-checking

Type hints are **optional** but encouraged. Many optional flags are passed to `mypy`; check the action for a recommended invocation. Check `setup.cfg` for some configuration, mostly ignoring libraries that do not have support for type-checking.
Type hints are **optional** but encouraged. Many optional flags are passed to `mypy`; check the action for a recommended invocation. Check `pyproject.toml` for some configuration, mostly ignoring libraries that do not have support for type-checking.

### Pre-commit

Expand Down
59 changes: 59 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,54 @@ authors = [{name = "Open Force Field Initiative", email = "[email protected]
license = {text = "MIT"}
dynamic = ["version"]

[tool.setuptools.packages.find]
where = ["openff/interchange"]

[tool.versioningit]

[tool.mypy]
mypy_path = "stubs/"
python_version = "3.11"
plugins = "numpy.typing.mypy_plugin,pydantic.mypy"
warn_unused_configs = true
warn_unused_ignores = true
warn_incomplete_stub = true
show_error_codes = true

[[tool.mypy.overrides]]
module = [
"pandas",
"networkx",
"openmm",
"openmm.app",
"openmm.app.element",
"openmm.unit",
"intermol.*",
"rdkit",
"openff.toolkit.*",
"openff.units.*",
"openff.utilities.*",
"openff.recharge.*",
"parmed",
"parmed.amber",
"pmdtest.utils",
"pytest",
"pint",
"unyt",
"openeye",
"jax",
"scipy.spatial",
"nonbonded_plugins.*",
"lammps",
]
ignore_missing_imports = true

[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
addopts = "--cov=openff/interchange --cov-report=xml"

[tool.interrogate]
ignore-init-method = true
ignore-init-module = true
Expand Down Expand Up @@ -60,3 +106,16 @@ known-first-party = ["openff.interchange"]

[tool.ruff.lint.pydocstyle]
property-decorators=["validator"]

[tool.coverage.run]
omit = [
"*/*/_tests/*",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@overload",
]
3 changes: 0 additions & 3 deletions pytest.ini

This file was deleted.

90 changes: 0 additions & 90 deletions setup.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions setup.py

This file was deleted.

0 comments on commit ab32ee7

Please sign in to comment.