Skip to content

Commit

Permalink
Allow pytest 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwthompson committed Feb 5, 2024
1 parent 344c83f commit dae7240
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 28 deletions.
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
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
PACKAGE: openff
PYTEST_ARGS: -r fE --tb=short -nauto
COV: --cov=openff/toolkit --cov-config=setup.cfg --cov-append --cov-report=xml

Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ jobs:
openeye: ["true", "false"]

env:
CI_OS: ${{ matrix.os }}
OPENEYE: ${{ matrix.openeye }}
PYVER: ${{ matrix.python-version }}
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
PACKAGE: openff-toolkit
PYTEST_ARGS: -r fE --tb=short -nauto

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -106,16 +104,14 @@ jobs:
- name: Test the package
run: |
python -m pip install utilities/test_plugins
pwd
ls
python -m pip install utilities/test_plugins/
if [[ "$OPENEYE" == true ]]; then
python -c "import openff.toolkit; print(openff.toolkit.__file__)"
python -c "import openeye; print(openeye.oechem.OEChemIsLicensed())"
fi
PYTEST_ARGS=" -r fE --tb=short --runslow openff/toolkit/_tests/conftest.py"
PYTEST_ARGS+=" --runslow"
PYTEST_ARGS+=" --ignore=openff/toolkit/_tests/test_links.py"
pytest $PYTEST_ARGS openff
python -m pytest $PYTEST_ARGS $COV
22 changes: 6 additions & 16 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,13 @@ jobs:
create-args: >-
python=${{ matrix.python-version }}
- name: Additional info about the build
run: |
uname -a
df -h
ulimit -a
- name: Make oe_license.txt file from GH org secret "OE_LICENSE"
env:
OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }}
run: |
echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}
run: echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}

- name: Install package
run: |
# Maybe remove the packaged openff-toolkit, installed as a dependency of openmmforcefields
# and/or Interchange
micromamba remove --force openff-toolkit-base
python -m pip install .
run: python -m pip install .

- name: Remove undesired toolkits
run: |
Expand All @@ -92,7 +81,7 @@ jobs:
# so don't remove it.
if [ ! -z "${{ env.PACKAGES_TO_REMOVE }}" ]; then
for cpkg in ${{ env.PACKAGES_TO_REMOVE }}; do
if [[ $(conda list | grep $cpkg) ]]; then micromamba remove --force $cpkg --yes ; fi
if [[ $(micromamba list | grep $cpkg) ]]; then micromamba remove --force $cpkg --yes ; fi
done
fi
Expand All @@ -119,10 +108,11 @@ jobs:
python -c "from openff.toolkit.utils.toolkits import ${TK}_AVAILABLE; assert not ${TK}_AVAILABLE, '${TK} available'"
done
fi
- name: Environment Information
run: |
conda info
conda list
micromamba info
micromamba list
- name: Run example scripts
run: |
Expand Down
4 changes: 3 additions & 1 deletion devtools/conda-envs/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ dependencies:
# Base depends
- openff-toolkit-examples
# Tests
- pytest=7.4
- pytest
- pytest-xdist
- pytest-randomly
- pytest-rerunfailures
4 changes: 3 additions & 1 deletion devtools/conda-envs/conda_oe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ dependencies:
- openff-toolkit-examples
# Tests
- openeye-toolkits
- pytest=7.4
- pytest
- pytest-xdist
- pytest-randomly
- pytest-rerunfailures

0 comments on commit dae7240

Please sign in to comment.