Skip to content

Commit

Permalink
Merge branch 'main' into add_pack_seed
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjonesBSU authored Jan 30, 2025
2 parents a423fa0 + 9519806 commit fa0313a
Show file tree
Hide file tree
Showing 17 changed files with 211 additions and 228 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, macOS-13, ubuntu-latest]
python-version: ['3.10', '3.11']
os: [macos-14, ubuntu-24.04]
python-version: ['3.10', '3.11', '3.12']

runs-on: ${{ matrix.os }}

Expand All @@ -39,13 +39,11 @@ jobs:
uses: actions/checkout@v4

- name: Build environment
uses: conda-incubator/setup-miniconda@v3
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment-dev.yml
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
miniforge-version: 4.9.2-4
use-mamba: true
create-args: >-
python=${{ matrix.python-version }}
- name: Install package
shell: bash -l {0}
Expand All @@ -56,14 +54,14 @@ jobs:
run: python -m pytest -rs -v --cov=./ --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

test-tutorials:
if: ${{ github.event.issue.pull_request && github.event.comment.body== '/testtutorials'}}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Put a reaction to the comment
run: gh api graphql --silent --raw-field query="mutation AddReaction {addReaction(input:{subjectId:\"$NODE_ID\",content:EYES}){reaction{content}subject{id}}}"
Expand Down Expand Up @@ -96,15 +94,14 @@ jobs:
PR_NUMBER: ${{ github.event.issue.number }}

- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Build environment
uses: conda-incubator/setup-miniconda@v2
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment-dev.yml
miniforge-variant: Mambaforge
miniforge-version: 4.9.2-4
use-mamba: true
create-args: >-
python=3.12
- name: Install package
shell: bash -l {0}
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ ci:
submodules: false
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6 # Ruff version
rev: v0.9.3 # Ruff version
hooks:
- id: ruff
args: [--fix, --extend-ignore=E203]
- id: ruff-format
args: [ --line-length=80 ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand Down
4 changes: 2 additions & 2 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- gmso >=0.12.0
- gsd >=3.0
- grits >=0.5.0
- hoomd >=4.5
- hoomd >=4.5, <5.0
- mbuild >=0.17.0
- numpy <2.0
- openbabel >=3
Expand All @@ -18,6 +18,6 @@ dependencies:
- pytest
- pytest-cov
- nbmake
- python >=3.10, <3.12
- python >=3.10, <3.13
- fresnel >=0.13.5
- cmeutils >=1.3
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ dependencies:
- gmso >=0.12.0
- gsd >=3.0
- grits >=0.5.0
- hoomd >=4.5
- hoomd >=4.5, <5.0
- mbuild >=0.17.0
- numpy <2.0
- openbabel >=3
- pip
- py3Dmol
- python >=3.10, <3.12
- python >=3.10, <3.13
- fresnel >=0.13.5
- cmeutils >=1.3
2 changes: 2 additions & 0 deletions flowermd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
Simulation,
System,
)

__version__ = "1.3.1"
3 changes: 0 additions & 3 deletions flowermd/__version__.py

This file was deleted.

3 changes: 1 addition & 2 deletions flowermd/base/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,7 @@ def _build(self, length):
self.periodic_bond_axis, str
) or self.periodic_bond_axis.lower() not in ["x", "y", "z"]:
raise ValueError(
"Valid choices for a `periodic_bond_axis` are "
"'x', 'y', 'z'"
"Valid choices for a `periodic_bond_axis` are 'x', 'y', 'z'"
)
add_hydrogens = False
else:
Expand Down
3 changes: 1 addition & 2 deletions flowermd/base/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ def __init__(
):
if not isinstance(forcefield, Iterable) or isinstance(forcefield, str):
raise ValueError(
"forcefield must be a sequence of "
"hoomd.md.force.Force objects."
"forcefield must be a sequence of hoomd.md.force.Force objects."
)
else:
for obj in forcefield:
Expand Down
3 changes: 1 addition & 2 deletions flowermd/base/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,7 @@ def __init__(
if not isinstance(density, u.array.unyt_quantity):
self.density = density * u.Unit("g") / u.Unit("cm**3")
warnings.warn(
"Units for density were not given, assuming "
"units of g/cm**3."
"Units for density were not given, assuming units of g/cm**3."
)
else:
self.density = density
Expand Down
3 changes: 1 addition & 2 deletions flowermd/modules/surface_wetting/surface_wetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ def run_droplet(
shrink_density, u.array.unyt_quantity
) and not isinstance(final_density, u.array.unyt_quantity):
warnings.warn(
"Units for density were not given, assuming "
"units of g/cm**3."
"Units for density were not given, assuming units of g/cm**3."
)
target_box_shrink = get_target_box_mass_density(
density=shrink_density * (u.g / (u.cm**3)),
Expand Down
43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[build-system]
requires = ["setuptools>=61.2", "versioningit"]
build-backend = "setuptools.build_meta"

[project]
name = "flowermd"
description = "Framework for building and running coplex simulaiton workflows with MosDeF and HOOMD-Blue."
readme = "README.md"
authors = [
{name = "Chris Jones", email = "[email protected]"},
{name = "Marjan Albooyeh", email = "[email protected]"},
{name = "Eric Jankowski", email = "[email protected]"}
]
license= {text = "GPLv3"}
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
urls = {Homepage = "https://github.com/cmelab/flowermd"}
requires-python = ">=3.10"
dynamic = ["version"]

[tool.setuptools]
zip-safe = false
include-package-data = true
license-files = ["LICENSE"]

[tool.setuptools.packages]
find = {namespaces = false}

[tool.setuptools.package-data]
flowermd = [
'"modules/**"',
'"library/**"',
'"assets/forcefields/**"',
'"assets/molecule_files/**"',
'"utils/**"',
'"internal/**"',
]

[tool.setuptools.dynamic]
version = {attr = "flowermd.__version__"}
114 changes: 0 additions & 114 deletions setup.py

This file was deleted.

Loading

0 comments on commit fa0313a

Please sign in to comment.