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 Nov 13, 2024
1 parent 92f6b9d commit 1f4131c
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 132 deletions.
14 changes: 0 additions & 14 deletions .codecov.yml

This file was deleted.

10 changes: 2 additions & 8 deletions .github/workflows/beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,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 @@ -46,12 +45,7 @@ jobs:
pydantic=${{ matrix.pydantic-version }}
- name: Install package
run: |
micromamba remove --force openff-interchange openff-interchange-base
python -m pip install . plugins/
- name: Environment Information
run: conda info && conda list
run: python -m pip install . plugins/

- name: License OpenEye
if: ${{ matrix.openeye == true }}
Expand All @@ -67,7 +61,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@v4
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,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 @@ -58,11 +57,7 @@ jobs:
pydantic=${{ matrix.pydantic-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 @@ -97,7 +92,7 @@ jobs:
- name: Run tests
if: always()
run: |
python -m pytest $COV openff/interchange/ -r fExs -n logical --durations=10
python -m pytest openff/interchange/ -r fExs -n logical --durations=10
- name: Run small molecule regression tests
if: ${{ matrix.openeye == true && matrix.openmm == true }}
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ jobs:
run: |
python -m pip install .
- name: Environment Information
run: |
micromamba info
micromamba list
- name: License OpenEye
run: |
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE}
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.

88 changes: 0 additions & 88 deletions setup.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions setup.py

This file was deleted.

0 comments on commit 1f4131c

Please sign in to comment.