Skip to content

Commit 35496e5

Browse files
Fix toolkit tests (#227)
* Ensure 0.11.0 RC version of toolkit is installed * Possible fix to finish #191 * Try to ensure bash args thing is passed through * Naive unit refactor * Work through tests * Update CI matrix * Use mamba for development * Debug, add boilerplate .gitignore * Fix syntax * make sure the package didn't get installed before we install it * Do not install Espaloma * Fix some unit registries in tests * install espaloma, but remove openmmforcefields * add back in espaloma * switch to micromamba * Explicitly move ffxml sources into entry point * Remove symlinking * Add boilerplate `.gitignore` * Update package installation in CI * Fix finding Amber files in test * Soft import whatever units module is used by the toolkit * Switch to micromamba for setting up conda environment Add boilerplate `.gitignore` file Do not pull from non-standard labels Install instead of update Try to figure out why if: {{ false }} still triggers Syntax? Tinker Bring in (full) mamba Bash thing everywhere Bring down old toolkit Do not present un-loadable ff14SB port as available More pins * Fix YAML syntax * Use pip * More fixes * No particles * Fix unit serialization * Fix Atom.element calls * Update some tests * Clean up un-used imports * Fix more tests * Fix more tests * Exclude Python 3.10 on macOS * Skip ff14SB being treated as a small molecule * Fix test * Track duration of longest 20 tests * Update action versions * Try to fix exclusions in CI matrix * Fix pathing in Amber conversion * Run `pyupgrade --py38-plus` * Try directly uploading coverage report * Fix syntax * Add back some tests * Debug * Drop `pytest-xdist` arg * Fiddle with path * Just try to get stuff passing * Try uploading again * Switch back to codecov * Simply coverage reporting * Allow 0 coverage * Simplify coverage arguments * Add `__init__.py` in `/tests/` submodule https://stackoverflow.com/a/60579142 * Add `__init__.py` in `/tests/` submodule https://stackoverflow.com/a/60579142 * Simplify coverage arguments * Add back durations argument * Apply suggestions from code review * only upload report if it is not scheduled Co-authored-by: Matthew W. Thompson <[email protected]>
1 parent e7f2fe3 commit 35496e5

File tree

103 files changed

+47811
-47311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+47811
-47311
lines changed

.github/workflows/ci.yaml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
os: [ubuntu-latest, macOS-latest]
30+
os: [ubuntu-latest, macos-latest]
3131
python-version: ["3.8", "3.9", "3.10"]
3232
latest-openff-toolkit: [true, false]
33+
exclude:
34+
- python-version: "3.10"
35+
os: macos-latest
3336

3437
steps:
35-
- uses: actions/checkout@v3.0.2
38+
- uses: actions/checkout@v3
3639

3740
- name: Setup Conda Environment
3841
uses: mamba-org/provision-with-micromamba@main
@@ -52,25 +55,29 @@ jobs:
5255
- name: "Install latest openff-toolkit"
5356
if: ${{ matrix.latest-openff-toolkit == true }}
5457
run: |
55-
# Until #225 is complete, we should not assume compatibility with new API
56-
micromamba install "openff-toolkit =0.10.6" -c conda-forge -y
58+
micromamba update -y -c conda-forge "openff-toolkit >=0.11.0"
5759
5860
- name: Install Package
5961
run: |
60-
# Can't use 'develop' mode because we remove symlinks after install is complete
61-
python setup.py install
62+
pip list
63+
micromamba list
64+
micromamba remove --force openmmforcefields
65+
python -m pip install .
6266
6367
- name: Conda Environment Information
6468
run: |
65-
conda info
66-
conda list
69+
micromamba info
70+
micromamba list
71+
python -c "from openmmforcefields import __version__, __file__; print(__version__, __file__)"
6772
6873
- name: Test Installed Package
6974
run: |
70-
pytest -v -x -s --log-cli-level $LOGLEVEL --cov=openmmforcefields openmmforcefields/tests/test_amber_import.py
71-
pytest -v -x -s --log-cli-level $LOGLEVEL --cov=openmmforcefields openmmforcefields/tests/test_template_generators.py
72-
pytest -v -x -s --log-cli-level $LOGLEVEL --cov=openmmforcefields openmmforcefields/tests/test_system_generator.py
75+
pytest -v -x --log-cli-level $LOGLEVEL $COV_ARGS --durations=20 \
76+
openmmforcefields/tests/test_amber_import.py \
77+
openmmforcefields/tests/test_template_generators.py \
78+
openmmforcefields/tests/test_system_generator.py
7379
env:
80+
COV_ARGS: --cov=openmmforcefields --cov-config=setup.cfg --cov-append --cov-report=xml
7481
LOGLEVEL: "INFO"
7582
KMP_DUPLICATE_LIB_OK: "True"
7683

@@ -93,11 +100,11 @@ jobs:
93100
94101
working-directory: ./charmm
95102

96-
- name: CodeCov
103+
- name: Upload coverage report to CodeCov
104+
uses: codecov/[email protected]
97105
if: ${{ github.repository == 'openmm/openmmforcefields'
98106
&& github.event != 'schedule' }}
99-
uses: codecov/[email protected]
100107
with:
108+
token: ${{ secrets.CODECOV_TOKEN }}
101109
file: ./coverage.xml
102-
flags: unittests
103-
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
110+
fail_ci_if_error: true

.gitignore

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ coverage.xml
5353

5454
# Django stuff:
5555
*.log
56-
local_settings.py
56+
57+
# Sphinx documentation
58+
docs/_build/
59+
docs/api/generated
5760

5861
# Flask stuff:
5962
instance/
@@ -62,12 +65,13 @@ instance/
6265
# Scrapy stuff:
6366
.scrapy
6467

65-
# Sphinx documentation
66-
docs/_build/
67-
6868
# PyBuilder
6969
target/
7070

71+
# PyCharm
72+
*.idea/vcs.xml
73+
74+
# Jupyter
7175
# Jupyter Notebook
7276
.ipynb_checkpoints
7377

@@ -108,5 +112,11 @@ ENV/
108112
# In-tree generated files
109113
*/_version.py
110114

111-
# OS X extra files
115+
# macOS
112116
*.DS_Store
117+
118+
# Caches
119+
openmmforcefields/data/perses_jacs_systems/*/cache.json
120+
121+
# Test molecules
122+
testsystem-bace*

0 commit comments

Comments
 (0)