Skip to content

Commit

Permalink
Use micromamba in CI (#202)
Browse files Browse the repository at this point in the history
* Use micromamba in CI

* Avoind installing new `importlib-metadata`

* Fix environment

* Unify test environments

* Debug

* Debug

* Prevent old `importlib_metadata` from being brought in

* Simplify diff

* Not yet updated for geomeTRIC 1.0.0

* Re-run CI

* Update Miniconda action

* Avoid installing old `importlib_metadata`

* Debug

* Pin Starlette

* Update devtools/conda-envs/no_openeye.yaml

* Clean up debug code

Co-authored-by: Jeff Wagner <[email protected]>
  • Loading branch information
mattwthompson and j-wags authored Nov 16, 2022
1 parent 5663b52 commit 3abdcca
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 35 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,20 @@ jobs:
- uses: actions/checkout@v3

- name: Install with OpenEye Toolkits
uses: conda-incubator/[email protected]
if: ${{ matrix.openeye == true }}
uses: mamba-org/provision-with-micromamba@main
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
environment-file: devtools/conda-envs/test-env.yaml

channels: openeye,conda-forge,nodefaults

activate-environment: test
auto-update-conda: true
auto-activate-base: false
show-channel-urls: true
extra-specs: |
python=${{ matrix.python-version }}
- name: Install with AmberTools
uses: conda-incubator/[email protected]
if: ${{ matrix.openeye == false }}
uses: mamba-org/provision-with-micromamba@main
with:
python-version: ${{ matrix.python-version }}
environment-file: devtools/conda-envs/no_openeye.yaml

channels: conda-forge,nodefaults

activate-environment: test
auto-update-conda: true
auto-activate-base: false
show-channel-urls: true
extra-specs: |
python=${{ matrix.python-version }}
- name: License OpenEye
shell: bash -l {0}
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: conda-incubator/[email protected]
- name: Install conda environment
uses: mamba-org/provision-with-micromamba@main
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
activate-environment: constructor
environment-file: devtools/conda-envs/installer.yaml
auto-activate-base: false
extra-specs: |
python=${{ matrix.python-version }}
- name: Prepare and run the constructor
shell: bash -l {0}
Expand Down Expand Up @@ -82,7 +81,7 @@ jobs:
exit 1
fi
conda install pytest pytest-cov pytest-asyncio pytest-celery codecov requests-mock -c conda-forge -yq
micromamba install pytest pytest-cov pytest-asyncio pytest-celery codecov requests-mock -c conda-forge -yq
echo "Done installing, here's the conda env:"
conda info
Expand Down
4 changes: 2 additions & 2 deletions devtools/conda-envs/docs-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- click-option-group
- rdkit
- openff-utilities
- openff-toolkit-base >=0.10.0
- openff-toolkit-base =0.10.6
- openff-forcefields
- openff-qcsubmit
- openmm >=7.6.0
Expand All @@ -35,7 +35,7 @@ dependencies:
- qcelemental >=0.24.0
- qcengine >=0.21.0
- chemper
- geometric
- geometric <1
- torsiondrive
- pymbar <4

Expand Down
18 changes: 13 additions & 5 deletions devtools/conda-envs/no_openeye.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:

### Core dependencies.

- numpy >=1.18
- numpy
- pydantic
- pyyaml
- tqdm
Expand All @@ -22,11 +22,15 @@ dependencies:
- rdkit >=22
- ambertools >=22
- openff-utilities
- openff-toolkit-base =0.10.6
- openff-forcefields >=2.0.0
- openff-qcsubmit >=0.3.0
- openff-toolkit-base >=0.10.6,<0.11
- openff-forcefields
- openff-qcsubmit
- openmm >=7.6.0

# Shim
- importlib-metadata >=4
- importlib_metadata >=4

# Optional
- forcebalance >=1.9.2
- openff-fragmenter-base >=0.1.2
Expand All @@ -37,13 +41,14 @@ dependencies:
- qcelemental >=0.24.0
- qcengine >=0.23.0
- chemper
- geometric
- geometric <1
- torsiondrive
- pymbar <4

# Executor
- uvicorn
- fastapi
- starlette =0.20 # https://github.com/openforcefield/openff-bespokefit/pull/203#issuecomment-1315936000
- celery
- httpx
- redis-server
Expand All @@ -57,3 +62,6 @@ dependencies:
- pytest-celery
- codecov
- requests-mock

- importlib-metadata >=4
- importlib_metadata >=4
14 changes: 11 additions & 3 deletions devtools/conda-envs/test-env.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: bespokefit-test

channels:
- openeye
Expand All @@ -22,11 +22,15 @@ dependencies:
- click-option-group
- rdkit
- openff-utilities
- openff-toolkit-base >=0.10.0,!=0.10.3,<0.11
- openff-toolkit-base >=0.10.6,<0.11
- openff-forcefields
- openff-qcsubmit
- openmm >=7.6.0

# Shim
- importlib-metadata >=4
- importlib_metadata >=4

# Optional
- forcebalance >=1.9.2
- openff-fragmenter-base >=0.1.2
Expand All @@ -39,13 +43,14 @@ dependencies:
- qcelemental >=0.24.0
- qcengine >=0.23.0
- chemper
- geometric
- geometric <1
- torsiondrive
- pymbar <4

# Executor
- uvicorn
- fastapi
- starlette =0.20 # https://github.com/openforcefield/openff-bespokefit/pull/203#issuecomment-1315936000
- celery
- httpx
- redis-server
Expand All @@ -59,3 +64,6 @@ dependencies:
- pytest-celery
- codecov
- requests-mock

- importlib-metadata >=4
- importlib_metadata >=4

0 comments on commit 3abdcca

Please sign in to comment.