Skip to content

Commit

Permalink
Maintenance task (#1123)
Browse files Browse the repository at this point in the history
* attempt to fix flaky test

* replace deprecated call

* fix typo

* replace extra-specs with python-version

* mark test_use_residue_map as flaky

* fix bug in test (due to current default change in foyer)
  • Loading branch information
daico007 authored Jun 1, 2023
1 parent d83e341 commit 5e505ab
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,21 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Checkout Branch / Pull Request

- name: Install Mamba (Linux)
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
extra-specs: |
python=${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
if: runner.os != 'Windows'

- name: Install Mamba (Windows)
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev-win.yml
extra-specs: |
python=${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
if: runner.os == 'Windows'

- name: Install Package
Expand Down Expand Up @@ -76,15 +74,14 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Checkout Branch / Pull Request

- name: Install Mamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
extra-specs: |
python=3.8
python-version: "3.10"

- name: Clone Foyer and GMSO
run: |
Expand Down
15 changes: 11 additions & 4 deletions mbuild/tests/test_compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,17 +433,24 @@ def test_save_resnames_single(self, c3, n4):
assert struct.residues[0].number == 1
assert struct.residues[1].number == 2

def test_save_residue_map(self, methane):
filled = mb.fill_box(methane, n_compounds=20, box=[0, 0, 0, 4, 4, 4])
def test_save_residue_map(self, ethane):
filled = mb.fill_box(ethane, n_compounds=100, box=[0, 0, 0, 4, 4, 4])
t0 = time.time()
filled.save("filled.mol2", forcefield_name="oplsaa", residues="Methane")
foyer_kwargs = {"use_residue_map": True}
filled.save(
"filled.mol2",
forcefield_name="oplsaa",
residues="Ethane",
foyer_kwargs=foyer_kwargs,
)
t1 = time.time()

foyer_kwargs = {"use_residue_map": False}
filled.save(
"filled.mol2",
forcefield_name="oplsaa",
overwrite=True,
residues="Methane",
residues="Ethane",
foyer_kwargs=foyer_kwargs,
)
t2 = time.time()
Expand Down

0 comments on commit 5e505ab

Please sign in to comment.