Skip to content

Commit 5e57199

Browse files
Migrate project to pixi (#1093)
* MAINT: Add `pixi` configuration * Invest more * Syntax * Add Linux platform * Add openeye channel * Fix * Always install OpenEye? * Try `pixi install` * Try running through pixi shell? * Update * Remove examples workflow * Empty commit * Bump * Fix * Expose openeye channel everywhere * Move dependencies around * Hack * Update * Syntax * Simplify * Add pip haha * Set up test-only dependencies * Run tests in environment * Add engines * Also install test plugins * Ensure other features are not grabbed from PyPI * Run commands under `pixi` * Run in environment * Add InterMol * lol toml doesn't support multi-line tables * Run commands in environment * Fix typo * Always install regression test dependencies * More cleanly use tasks * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add examples environments/workflow * Lint * Slim CI matrix * Fix * Bump toolkit * Fix * Update * Other updates * Fixes * Debug * Also run examples * Fix `run_examples` * Revert OE change * Fix? * Add `jax` to examples environment * Use `contains` * Try building out matrix again * Fix * A PEP 695 fix? * Add MoSDeF stack * Add beta workflow, debug * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Lint * Fix license setup * Track lock file * Fix silly typo * Revert other changes * Remove environment files * Update environments * Update environments * Revamp * Update development docs * Fix link * Also run on macOS * Add back JAX, update release history * Add lockfile * Turn on Foyer + GROMACS combination * Add 'etc' environment * Fix test, run more tests * Fix type-checking * Fixes * One more fix * Another fix * Debug * Skip Amber example * Debug * Foyer + GROMACS --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c30e7eb commit 5e57199

File tree

24 files changed

+21990
-443
lines changed

24 files changed

+21990
-443
lines changed

.github/workflows/beta.yaml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 33 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,34 @@ on:
88
branches:
99
- main
1010
schedule:
11-
- cron: "0 5 * * *"
11+
- cron: "0 6 * * *"
1212
workflow_dispatch:
1313

1414
defaults:
1515
run:
16-
shell: bash -e -l {0}
16+
shell: pixi run bash -e {0}
1717

1818
jobs:
1919
test:
20-
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, OpenMM ${{ matrix.openmm }}, OpenEye ${{ matrix.openeye }}, RDKit ${{ matrix.rdkit }}, AmberTools ${{ matrix.ambertools }}, NAGL ${{ matrix.nagl }}
20+
name: Test on ${{ matrix.os }}, ${{ matrix.environment }}
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
matrix:
2424
os:
25-
- macos-latest
2625
- ubuntu-latest
27-
python-version:
28-
- "3.11"
29-
- "3.12"
30-
- "3.13"
31-
openeye:
32-
- true
33-
- false
34-
rdkit:
35-
- true
36-
ambertools:
37-
- true
38-
- false
39-
nagl:
40-
- true
41-
- false
42-
openmm:
43-
- true
44-
exclude:
45-
- python-version: "3.13"
46-
openeye: true
47-
- ambertools: false
48-
openeye: false
26+
- macos-latest
27+
environment:
28+
- py311amber
29+
- py311openeye
30+
- py311examples
31+
- py311etc
32+
- py311amber
33+
- py312openeye
34+
- py312examples
35+
- py312etc
36+
- py313openeye
37+
- py313examples
38+
- betas
4939

5040
env:
5141
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
@@ -54,87 +44,35 @@ jobs:
5444
steps:
5545
- uses: actions/checkout@v6
5646

57-
- name: Install conda environment
58-
uses: mamba-org/setup-micromamba@v2
47+
- name: Set up virtual environment
48+
uses: prefix-dev/setup-pixi@v0.8.4
5949
with:
60-
environment-file: devtools/conda-envs/test_env.yaml
61-
create-args: >-
62-
python=${{ matrix.python-version }}
50+
pixi-version: v0.41.4
51+
environments: ${{ matrix.environment }}
6352

6453
- name: Install and license OpenEye Toolkits
65-
if: ${{ matrix.openeye == true }}
54+
if: ${{ !contains(matrix.environment, 'amber') }}
6655
run: |
67-
micromamba install "openeye-toolkits =2025" -c openeye
6856
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE}
69-
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()"
57+
pixi run -e ${{ matrix.environment }} python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()"
7058
env:
7159
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }}
7260

73-
- name: Install OpenMM
74-
if: ${{ matrix.openmm == true }}
75-
run: |
76-
micromamba install openmm -c conda-forge
77-
78-
- name: Install RDKit
79-
if: ${{ matrix.rdkit == true }}
80-
run: |
81-
micromamba install rdkit "ambertools =24" intermol -c conda-forge
82-
83-
- name: Remove AmberTools
84-
if: ${{ matrix.ambertools == false }}
85-
run: |
86-
micromamba remove ambertools parmed
87-
micromamba install "packmol >=20.15.0" "lammps>=2024" "numpy>=2.4"
88-
89-
- name: Install OpenFF NAGL
90-
if: ${{ matrix.nagl == true }}
91-
run: |
92-
micromamba install openff-nagl -c conda-forge
93-
94-
- name: Install Python <3.13 dependencies
95-
if: ${{ matrix.python-version != '3.13' && matrix.ambertools == true }}
96-
run: micromamba install --file devtools/conda-envs/test_not_py313.yaml python=${{ matrix.python-version }}
97-
98-
- name: Install package
99-
run: python -m pip install . plugins/
61+
- name: Run mypy
62+
if: ${{ !contains(matrix.environment, 'examples') }}
63+
run: pixi run -e ${{ matrix.environment }} run_mypy
10064

10165
- name: Run tests
102-
run: python -m pytest $COV openff/interchange/ -r fExs -n logical --durations=10
103-
104-
- name: Run small molecule regression tests
105-
if: ${{ matrix.openeye == true && matrix.openmm == true }}
106-
run: |
107-
micromamba install "openmm=8.4.0" "deepdiff <=8" rich click -c conda-forge
108-
python -m pip install git+https://github.com/openforcefield/interchange-regression-testing.git@443480732f5caf3fc63f5442fdd763176c63e72f
109-
110-
create_openmm_systems \
111-
--input "regression_tests/small-molecule/input-topologies.json" \
112-
--output "regression_tests/small-molecule/" \
113-
--using-interchange \
114-
--force-field "openff-2.0.0.offxml" \
115-
--n-procs 4
66+
if: ${{ !contains(matrix.environment, 'examples') }}
67+
run: pixi run -e ${{ matrix.environment }} run_tests
11668

117-
# Don't trust the interchange version here, for some reason, just put it in a new directory
118-
mkdir regression_tests/small-molecule/omm-systems-interchange-latest/
119-
mv regression_tests/small-molecule/omm-systems-interchange-*/*xml regression_tests/small-molecule/omm-systems-interchange-latest/
69+
- name: Run examples
70+
if: ${{ contains(matrix.environment, 'examples') }}
71+
run: pixi run -e ${{ matrix.environment }} run_examples
12072

121-
compare_openmm_systems \
122-
--input-dir-a "regression_tests/small-molecule/omm-systems-toolkit-0.10.6" \
123-
--input-dir-b "regression_tests/small-molecule/omm-systems-interchange-latest" \
124-
--output "regression_tests/differences.json" \
125-
--settings "regression_tests/default-comparison-settings.json" \
126-
--expected-changes "regression_tests/toolkit-to-interchange.json" \
127-
--n-procs 4
128-
129-
python devtools/scripts/molecule-regressions.py
130-
131-
- name: Run mypy
132-
run: |
133-
# As of 01/23, JAX with mypy is too slow to use without a pre-built cache
134-
# https://github.com/openforcefield/openff-interchange/pull/578#issuecomment-1369979875
135-
micromamba remove jax
136-
python -m mypy -p "openff.interchange" --exclude "openff/interchange/_tests/"
137-
python -m mypy plugins/nonbonded_plugins/
73+
- name: Run small molecule regression tests
74+
if: ${{ contains(matrix.environment, 'openeye') }}
75+
run: pixi run -e ${{ matrix.environment }} run_regression_tests
13876

13977
- name: Codecov
14078
uses: codecov/codecov-action@v5

.github/workflows/examples.yaml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,7 @@ tmp.in
135135
.Trashes
136136
ehthumbs.db
137137
Thumbs.db
138+
139+
# pixi environments
140+
.pixi
141+
*.egg-info

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ For more information, please consult the [full documentation](https://openff-int
6767

6868
For more examples specific to Interchange, navigate to the `examples/` directory.
6969

70+
## Developing
71+
72+
See the [Development guide](docs/developing.md).
73+
7074
## Copyright
7175

7276
Copyright (c) 2020, Open Force Field Initiative

devtools/conda-envs/dev_env.yaml

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)