-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scattered fixes to get CI running (#290)
* Scattered fixes * Pin AmberTools * Skip non-small molecule force fields at test time * Always run tests, even if OpenEye is not licensed * OPC * Update Python versions * Trim more force fields at test time * Parametrize tests * Revert "Parametrize tests" This reverts commit 5b37af5. * Debug, comments * Run all tests * Testing espaloma in different workflow * pinning dgl version * Change name of workflow * Testing espaloma only with latest openff toolkit * using pytest and fixtures * Marking espaloma tests and parametrizing * Running espaloma tests in workflow * Fixing call in test * Cache test should be inside context manager * Remove support for older openff toolkit (<0.11) * Specifying root path for tests * testing without the / * fixing CI yamls * Mark espaloma tests * need argument for tests * remove trailing newline --------- Co-authored-by: Iván Pulido <2949729+ijpulidos@users.noreply.github.com> Co-authored-by: Mike Henry <11765982+mikemhenry@users.noreply.github.com>
- Loading branch information
1 parent
87226a2
commit 8660a1a
Showing
7 changed files
with
384 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: EspalomaCI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, Latest openff-toolkit ${{ matrix.latest-openff-toolkit }} | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
OE_LICENSE: ${{ github.workspace }}/oe_license.txt | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: ["3.9", "3.10"] # Add 3.11 in with AmberTools 23 | ||
exclude: | ||
- python-version: "3.10" | ||
os: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Conda Environment | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: devtools/conda-envs/test_env.yaml | ||
create-args: >- | ||
python=${{ matrix.python-version }} | ||
- name: Install Package | ||
run: | | ||
pip list | ||
micromamba list | ||
micromamba remove --force openmmforcefields | ||
python -m pip install . | ||
- name: Conda Environment Information | ||
run: | | ||
micromamba info | ||
micromamba list | ||
python -c "from openmmforcefields import __version__, __file__; print(__version__, __file__)" | ||
- name: Test Installed Package | ||
run: | | ||
pytest -v --log-cli-level $LOGLEVEL $COV_ARGS --durations=20 \ | ||
-m "espaloma" openmmforcefields/tests --runespaloma | ||
env: | ||
COV_ARGS: --cov=openmmforcefields --cov-config=setup.cfg --cov-append --cov-report=xml | ||
LOGLEVEL: "INFO" | ||
KMP_DUPLICATE_LIB_OK: "True" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Default configuration and objects for tests""" | ||
|
||
import pytest | ||
|
||
def pytest_addoption(parser): | ||
parser.addoption( | ||
"--runespaloma", action="store_true", default=False, help="run espaloma tests" | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
config.addinivalue_line("markers", "espaloma: mark test as slow to run") | ||
|
||
|
||
def pytest_collection_modifyitems(config, items): | ||
skip_slow = pytest.mark.skip(reason="need --runespaloma option to run") | ||
|
||
if not config.getoption("--runespaloma"): | ||
for item in items: | ||
if "espaloma" in item.keywords: | ||
item.add_marker(skip_slow) |
Oops, something went wrong.