Skip to content

Commit

Permalink
add python 3.12 and macOS-13 to test matrix (#571)
Browse files Browse the repository at this point in the history
* add python 3.12 and macOS-13 to test matrix

* change minimum python version to 3.9 in yml files

* change overlap in packmol args

* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

* update py version in windows yml file

* bleeding edge tests was not installing hoomd, but needs it for GMSO tests

* pin mbuild to >0.17 so python 3.12 tests don't fail

* Fix bonding in custom ethane pdb file

* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

* remove hoomd install from bleeding test workflow, not needed

* only test py versions on ubuntu, test arch versions on py3.12

* try to fix formatting

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
chrisjonesBSU and pre-commit-ci[bot] authored Jun 26, 2024
1 parent 6939db1 commit fdd7dcf
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 23 deletions.
57 changes: 42 additions & 15 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ on:
jobs:
test:
if: github.event.pull_request.draft == false
name: Foyer Tests
name: Foyer Tests (python)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
exclude:
- os: windows-latest
python-version: "3.9"
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]

defaults:
run:
Expand All @@ -37,14 +34,6 @@ jobs:
with:
environment-file: environment-dev.yml
create-args: python=${{ matrix.python-version }}
if: runner.os != 'Windows'

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

- name: Install Package
run: python -m pip install -e .
Expand All @@ -59,6 +48,44 @@ jobs:
verbose: true
files: ./coverage.xml

arch-test:
if: github.event.pull_request.draft == false
name: Foyer Tests (arch)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, macOS-13, ubuntu-latest, windows-latest]
python-version: ["3.12"]

defaults:
run:
shell: bash -l {0}

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

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

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

- name: Install Package
run: python -m pip install -e .

- name: Test (OS -> ${{ matrix.os }} / Python -> ${{ matrix.python-version }})
run: python -m pytest -v -nauto --color yes --pyargs foyer

bleeding-edge-test:
if: github.event.pull_request.draft == false
name: Bleeding Edge mosdef Tests for Foyer
Expand All @@ -75,7 +102,7 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
create-args: python=3.10
create-args: python=3.12
- name: Clone mBuild and GMSO
run: |
git clone https://github.com/mosdef-hub/mbuild.git
Expand Down
4 changes: 2 additions & 2 deletions environment-dev-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- codecov
- lark-parser
- lxml
- mbuild
- mbuild>=0.17
- treelib
- gmso
- networkx>=2.5
Expand All @@ -19,6 +19,6 @@ dependencies:
- pytest-cov
- pytest-timeout
- pytest-xdist
- python>=3.8
- python>=3.9
- requests
- requests-mock
4 changes: 2 additions & 2 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- codecov
- lark-parser
- lxml
- mbuild
- mbuild>=0.17
- treelib
- gmso
- networkx>=2.5
Expand All @@ -22,6 +22,6 @@ dependencies:
- pytest-cov
- pytest-timeout
- pytest-xdist
- python>=3.8
- python>=3.9
- requests
- requests-mock
4 changes: 2 additions & 2 deletions environment-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- lark-parser
- lxml
- networkx>=2.5
- openmm>=7.6
- openmm
- parmed>=3.4.3
- ele
- requests
Expand All @@ -16,4 +16,4 @@ dependencies:
- pytest-cov
- pytest-timeout
- pytest-xdist
- python<=3.8
- python>=3.9
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ dependencies:
- parmed>=3.4.3
- ele
- requests
- python>=3.8
- python>=3.9
2 changes: 2 additions & 0 deletions foyer/tests/files/ethane_customtype.pdb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ATOM 5 _Hb ETH 1 2.956 1.278 -9.381 0.00 0.00 H
ATOM 6 _Hb ETH 1 4.748 0.049 -7.277 0.00 0.00 H
ATOM 7 _Hb ETH 1 5.187 0.312 -8.947 0.00 0.00 H
ATOM 8 _Hb ETH 1 4.890 1.676 -7.897 0.00 0.00 H
CONECT 1 2 3 4 5
CONECT 2 1 6 7 8
CONECT 1 2
CONECT 1 3
CONECT 1 4
Expand Down
4 changes: 3 additions & 1 deletion foyer/tests/test_forcefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,9 @@ def test_no_overlap_residue_atom_overlap(self):
mol1.name = "CCC"
mol2.name = "COC"

box = mb.fill_box([mol1, mol2], n_compounds=[2, 2], density=700)
box = mb.fill_box(
[mol1, mol2], n_compounds=[2, 2], overlap=0.01, density=700
)

all_substructures = []
structure = box.to_parmed(residues=["CCC", "COC"])
Expand Down

0 comments on commit fdd7dcf

Please sign in to comment.