Skip to content

Commit

Permalink
Move pytest config back to setup.cfg (#2017)
Browse files Browse the repository at this point in the history
* Move `pytest` config back to `setup.cfg`

* Debug

* Downpin mypy
  • Loading branch information
mattwthompson authored Feb 11, 2025
1 parent 14d16ae commit 9934858
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, RDKit=${{ matrix.rdkit }}, OpenEye=${{ matrix.openeye }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
fail-fast: true # TODO: flip to false before merge
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12"]
Expand All @@ -37,7 +37,7 @@ jobs:
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
PYTEST_ARGS: -r fE --tb=short -nauto
COV: --cov=openff/toolkit --cov-append --cov-report=xml
COV: --cov=openff/toolkit/ --cov-append --cov-report=xml

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -142,11 +142,11 @@ jobs:
run: |
PYTEST_ARGS+=" --ignore=openff/toolkit/_tests/test_examples.py"
PYTEST_ARGS+=" --ignore=openff/toolkit/_tests/test_links.py"
if [[ "$GITHUB_EVENT_NAME" == "schedule" ]]; then
PYTEST_ARGS+=" -m 'slow or not slow'"
fi
python -m pytest --durations=20 $PYTEST_ARGS $COV
# TODO: Flip back to schedule condition before merge
PYTEST_ARGS+=" --runslow"
python -m pytest --durations=20 $PYTEST_ARGS $COV openff/toolkit/_tests
- name: Run code snippets in docs
if: ${{ matrix.rdkit == true && matrix.openeye == true }}
Expand Down
17 changes: 0 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,6 @@ select = ["I", "E", "F", "W", "NPY", "UP", "RUF"]
known-third-party = ["openff.interchange", "openff.utilities", "openff.units"]
known-first-party = ["openff.toolkit"]

[tool.pytest.ini_options]
testpaths = [
"openff/toolkit/_tests/",
]
markers = [
"slow: marks tests as slow"
]
addopts = '-m "not slow"'
filterwarnings = [
"ignore:Molecule.from_pdb_and_smiles.*deprecated in favor of .*from_pdb"
]
doctest_optionflags = [
"ELLIPSIS",
"DONT_ACCEPT_TRUE_FOR_1",
"NORMALIZE_WHITESPACE",
]

[tool.coverage.run]
omit = [
"*/*/_tests/*",
Expand Down
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[tool:pytest]
doctest_optionflags =
ELLIPSIS
DONT_ACCEPT_TRUE_FOR_1
NORMALIZE_WHITESPACE
testpaths = openff/toolkit/_tests/

0 comments on commit 9934858

Please sign in to comment.