Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI #43

Merged
merged 7 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: "CI"
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# At 07:00 UTC
- cron: "0 7 * * *"

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
Expand Down Expand Up @@ -46,29 +50,33 @@ jobs:
cache-downloads-key: downloads-${{ steps.date.outputs.date }}
create-args: >-
python=${{ matrix.python-version }}

- name: "Install"
run: pip install --no-deps -e .

- name: "Test imports"
run: |
# if we add more to this, consider changing to for + env vars
python -Ic "import kartograf"

- name: "Environment Information"
run: |
micromamba info
micromamba list

- name: "Run tests"
run: |
pytest -n auto -v --cov=kartograf --cov-report=xml

- name: "Test Notebooks"
if: ${{ matrix.os != 'macos' }}
RiesBen marked this conversation as resolved.
Show resolved Hide resolved
run: |
# openfe is a dep for the notebooks example, but not the package
micromamba install openfe=0.15
RiesBen marked this conversation as resolved.
Show resolved Hide resolved
# install openfe for the notebook
micromamba install openfe
# another dep I don't want to include in the env
pip install --no-deps git+https://github.com/OpenFreeEnergy/openfe-benchmarks.git
# Only need to test the notebook(s) in examples/
pytest -v --nbval-lax examples/

- name: codecov
if: ${{ github.repository == 'OpenFreeEnergy/kartograf' && github.event != 'schedule'}}
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion examples/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ channels:
- conda-forge
dependencies:
- kartograf >=1
- openfe >=0.15
- openfe >=1.0
- pip
- pip:
- git+https://github.com/OpenFreeEnergy/openfe-benchmarks.git
8 changes: 4 additions & 4 deletions src/kartograf/tests/test_atom_mapping_comparer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ def test_mapping_comparison_jcs_diverse(benzene_benzene_mapping):
mappingA = LigandAtomMapping(componentA=mapping.componentA,
componentB=mapping.componentB,
componentA_to_componentB={v: v for v in
range(1, 12)})
range(0, 6)})
mappingB = LigandAtomMapping(componentA=mapping.componentA,
componentB=mapping.componentB,
componentA_to_componentB={v: v for v in
range(12, 20)})
range(6, 12)})

score = jaccard_score(mappingA=mappingA,
mappingB=mappingB)

assert score == 0

# Check index order change
r1 = list(range(1, 12))
r2 = list(range(12, 20))
r1 = list(range(0, 6))
r2 = list(range(6, 12))
index_mixing = list(zip(r1, r2))

mappingA = LigandAtomMapping(componentA=mapping.componentA,
Expand Down
Loading