From bb99811809af61209569fde5e42d5222174c5cfc Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Sun, 19 Jan 2025 11:59:20 -0700 Subject: [PATCH 01/13] Replace setup.py with pyproject.toml, update action versions --- .github/workflows/CI.yaml | 8 +++--- pyproject.toml | 54 +++++++++++++++++++++++++++++++++++++++ setup.cfg | 2 -- setup.py | 40 ----------------------------- 4 files changed, 58 insertions(+), 46 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 58829221..f169f403 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -30,7 +30,7 @@ jobs: name: Checkout Branch / Pull Request - name: Install Mamba - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: environment-dev.yml create-args: >- @@ -43,7 +43,7 @@ jobs: run: python -m pytest -v --cov=gmso --cov-report=xml --cov-append --cov-config=setup.cfg --color yes --pyargs gmso - name: Upload Coverage Report - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: name: GMSO-Coverage verbose: true @@ -67,7 +67,7 @@ jobs: name: Checkout Branch / Pull Request - name: Install Mamba - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: environment-dev.yml create-args: >- @@ -92,7 +92,7 @@ jobs: name: Checkout Branch / Pull Request - name: Install Mamba - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: environment-dev.yml create-args: python=3.12 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..5edab714 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,54 @@ +[build-system] +requires = ["setuptools>=61.2", "versioningit"] +build-backend = "setuptools.build_meta" + +[project] +name = "gmso" +description = "A flexible storage of chemical topology for molecular simulation." +readme = "README.md" +authors = [ + {name = "Matthew W Thompson", email = "matt.thompson@vanderbilt.edu"}, + {name = "Justin Gilmer", email = "justin.b.gilmer@vanderbilt.edu"}, +] +maintainers = [ + {name = "Nicholas Craven", email = "nicholas.c.craven@vanderbilt.edu"}, + {name = "Chris Jones", email = "chrisjones4@u.boisestate.edu"}, +] +license= {text = "MIT"} +classifiers=[ + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering :: Chemistry", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Operating System :: Unix", + "Operating System :: MacOS", +] +urls = {Homepage = "https://github.com/mosdef-hub/gmso"} +requires-python = ">=3.9" +dynamic = ["version"] + +[tool.setuptools] +zip-safe = false +include-package-data = true +license-files = ["LICENSE"] + +[tool.setuptools.packages] +find = {namespaces = false} + +[tool.versioningit] +default-version = "1+unknown" + +[tool.versioningit.format] +distance = "{base_version}+{distance}.{vcs}{rev}" +dirty = "{base_version}+{distance}.{vcs}{rev}.dirty" +distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty" + +[tool.versioningit.vcs] +method = "git" +match = ["*"] +default-tag = "0.0.0" diff --git a/setup.cfg b/setup.cfg index 181c0d05..82bf670e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,6 +22,4 @@ omit = [bumpversion:file:gmso/__init__.py] -[bumpversion:file:setup.py] - [bumpversion:file:docs/conf.py] diff --git a/setup.py b/setup.py deleted file mode 100644 index 65776d8c..00000000 --- a/setup.py +++ /dev/null @@ -1,40 +0,0 @@ -from setuptools import find_packages, setup - -##################################### -VERSION = "0.12.4" -ISRELEASED = False -if ISRELEASED: - __version__ = VERSION -else: - __version__ = VERSION + ".dev0" -##################################### - - -setup( - name="gmso", - version=__version__, - packages=find_packages(), - include_package_data=True, - zip_safe=True, - author="Matthew W Thompson, Justin Gilmer", - author_email="matt.thompson@vanderbilt.edu, justin.b.gilmer@vanderbilt.edu", - url="https://github.com/mosdef-hub/gmso", - download_url="https://github.com/mosdef-hub/gmso/tarball/{}".format(__version__), - license="MIT", - keywords="gmso", - classifiers=[ - "Development Status :: 1 - Planning", - "Intended Audience :: Science/Research", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Topic :: Scientific/Engineering :: Chemistry", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Operating System :: Unix", - "Operating System :: MacOS", - ], - python_requires=">=3.6, <4", -) From 1fe38a9dbb88b9cc232cf4a422482a038d90ba04 Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Tue, 21 Jan 2025 11:44:15 -0700 Subject: [PATCH 02/13] Pin hoomd to <5.0 --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index ce16a213..74d947d5 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -28,5 +28,5 @@ dependencies: - pandas - symengine - python-symengine - - hoomd + - hoomd>=4.0,<5.0 - importlib_resources From 296fe5f50fd3eed604d0776bb9094a90ce033d58 Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 10:06:38 -0700 Subject: [PATCH 03/13] add command to run mamba list after updating environment --- .github/workflows/CI.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index f169f403..ad4a2805 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -116,6 +116,10 @@ jobs: pip install -e forcefield-utilities pip install -e . + - name: Check environment + run: | + micromamba list + - name: Run Bleeding Edge Tests run: | python -m pytest -v --color yes --pyargs gmso From 3d00ea92ef08556e991f2cc311a921e1470733dd Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 11:57:34 -0700 Subject: [PATCH 04/13] add latest env, install all mosdef from source, update bleeding edge CI --- .github/workflows/CI.yaml | 18 +----------------- environment-latest.yml | 40 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 17 deletions(-) create mode 100644 environment-latest.yml diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index ad4a2805..4aa98bb2 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -94,26 +94,10 @@ jobs: - name: Install Mamba uses: mamba-org/setup-micromamba@v2 with: - environment-file: environment-dev.yml - create-args: python=3.12 - - - name: Clone mBuild and Foyer and forcefield-utilities - run: | - git clone https://github.com/mosdef-hub/mbuild.git - git clone https://github.com/mosdef-hub/foyer.git - git clone https://github.com/mosdef-hub/forcefield-utilities.git - - - name: Update Environment with mbuild/foyer/ffutils Dependencies - run: | - micromamba update --name gmso-dev --file mbuild/environment.yml - micromamba update --name gmso-dev --file foyer/environment.yml - micromamba update --name gmso-dev --file forcefield-utilities/environment-dev.yml + environment-file: environment-latest.yml - name: Install Packages from Source run: | - pip install -e mbuild - pip install -e foyer - pip install -e forcefield-utilities pip install -e . - name: Check environment diff --git a/environment-latest.yml b/environment-latest.yml new file mode 100644 index 00000000..7dde75b2 --- /dev/null +++ b/environment-latest.yml @@ -0,0 +1,40 @@ +name: gmso-latest +channels: + - conda-forge +dependencies: + - python=3.12 + - boltons + - numpy=1.26.4 + - sympy + - unyt>=2.9.5 + - boltons + - lark>=1.2 + - lxml + - pydantic>=2 + - networkx + - pytest + - openbabel>=3.0.0 + - openmm + - gsd>=2.9 + - parmed>=3.4.3 + - packmol>=18 + - pytest-cov + - rdkit>=2021 + - requests + - scipy + - treelib + - codecov + - bump2version + - matplotlib + - ipywidgets + - ele>=0.2.0 + - pre-commit + - pandas + - symengine + - python-symengine + - hoomd>=4.0,<5.0 + - importlib_resources + - pip: + - git+https://github.com/mosdef-hub/mbuild.git@main + - git+https://github.com/mosdef-hub/foyer.git@main + - git+https://github.com/mosdef-hub/forcefield-utilities.git@main From 9e2c67855e642aaf9bc0a16ccacf2978fcfbc5a7 Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 12:32:12 -0700 Subject: [PATCH 05/13] add dynamic version to project.toml --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5edab714..faaae13d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "gmso" +version = 0.12.4 description = "A flexible storage of chemical topology for molecular simulation." readme = "README.md" authors = [ @@ -30,7 +31,9 @@ classifiers=[ ] urls = {Homepage = "https://github.com/mosdef-hub/gmso"} requires-python = ">=3.9" -dynamic = ["version"] + +[tool.setuptools.dynamic] +version = { attr = "gmso.__version__" } [tool.setuptools] zip-safe = false From 21fb23e854702165f5396d4a9686e087fdd701cd Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 12:39:15 -0700 Subject: [PATCH 06/13] remove dynamic versioning w/setuptools --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index faaae13d..39350686 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,6 @@ build-backend = "setuptools.build_meta" [project] name = "gmso" -version = 0.12.4 description = "A flexible storage of chemical topology for molecular simulation." readme = "README.md" authors = [ @@ -32,9 +31,6 @@ classifiers=[ urls = {Homepage = "https://github.com/mosdef-hub/gmso"} requires-python = ">=3.9" -[tool.setuptools.dynamic] -version = { attr = "gmso.__version__" } - [tool.setuptools] zip-safe = false include-package-data = true From 1defff3a4cdc83dc2b514a5fe122778e3f3fbb33 Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 12:39:58 -0700 Subject: [PATCH 07/13] fix dynamic version --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 39350686..5edab714 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,7 @@ classifiers=[ ] urls = {Homepage = "https://github.com/mosdef-hub/gmso"} requires-python = ">=3.9" +dynamic = ["version"] [tool.setuptools] zip-safe = false From ac385818fd92ab93d802baafb5bcb403c88a1e2c Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 12:51:51 -0700 Subject: [PATCH 08/13] use setup tools for dynamic versioning instead of versioningit --- pyproject.toml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5edab714..0fe0dd43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=61.2", "versioningit"] +requires = ["setuptools>=61.2"] build-backend = "setuptools.build_meta" [project] @@ -40,15 +40,5 @@ license-files = ["LICENSE"] [tool.setuptools.packages] find = {namespaces = false} -[tool.versioningit] -default-version = "1+unknown" - -[tool.versioningit.format] -distance = "{base_version}+{distance}.{vcs}{rev}" -dirty = "{base_version}+{distance}.{vcs}{rev}.dirty" -distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty" - -[tool.versioningit.vcs] -method = "git" -match = ["*"] -default-tag = "0.0.0" +[tool.setuptools.dynamic] +version = {attr = "gmso.__version__"} From bb41aeb33c0a6ba0b35545bd4bcf90fe87c8d3f1 Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 12:56:37 -0700 Subject: [PATCH 09/13] just use environment-dev.yml with new env changes --- .github/workflows/CI.yaml | 2 +- environment-dev.yml | 16 ++++++++++++---- environment-latest.yml | 40 --------------------------------------- 3 files changed, 13 insertions(+), 45 deletions(-) delete mode 100644 environment-latest.yml diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 4aa98bb2..cc3163a9 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -94,7 +94,7 @@ jobs: - name: Install Mamba uses: mamba-org/setup-micromamba@v2 with: - environment-file: environment-latest.yml + environment-file: environment-dev.yml - name: Install Packages from Source run: | diff --git a/environment-dev.yml b/environment-dev.yml index 74d947d5..3ea7a698 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -2,23 +2,27 @@ name: gmso-dev channels: - conda-forge dependencies: - - python>=3.9,<=3.12 + - python=3.12 - boltons - numpy=1.26.4 - sympy - unyt>=2.9.5 - boltons + - lark>=1.2 - lxml - pydantic>=2 - networkx - pytest - - mbuild>=1.1 - openbabel>=3.0.0 - - foyer>=0.11.3 - - forcefield-utilities>=0.2.1 + - openmm - gsd>=2.9 - parmed>=3.4.3 + - packmol>=18 - pytest-cov + - rdkit>=2021 + - requests + - scipy + - treelib - codecov - bump2version - matplotlib @@ -30,3 +34,7 @@ dependencies: - python-symengine - hoomd>=4.0,<5.0 - importlib_resources + - pip: + - git+https://github.com/mosdef-hub/mbuild.git@main + - git+https://github.com/mosdef-hub/foyer.git@main + - git+https://github.com/mosdef-hub/forcefield-utilities.git@main diff --git a/environment-latest.yml b/environment-latest.yml deleted file mode 100644 index 7dde75b2..00000000 --- a/environment-latest.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: gmso-latest -channels: - - conda-forge -dependencies: - - python=3.12 - - boltons - - numpy=1.26.4 - - sympy - - unyt>=2.9.5 - - boltons - - lark>=1.2 - - lxml - - pydantic>=2 - - networkx - - pytest - - openbabel>=3.0.0 - - openmm - - gsd>=2.9 - - parmed>=3.4.3 - - packmol>=18 - - pytest-cov - - rdkit>=2021 - - requests - - scipy - - treelib - - codecov - - bump2version - - matplotlib - - ipywidgets - - ele>=0.2.0 - - pre-commit - - pandas - - symengine - - python-symengine - - hoomd>=4.0,<5.0 - - importlib_resources - - pip: - - git+https://github.com/mosdef-hub/mbuild.git@main - - git+https://github.com/mosdef-hub/foyer.git@main - - git+https://github.com/mosdef-hub/forcefield-utilities.git@main From 2ff45bbd6c18cfca0f3c04353648c835f04e4997 Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 13:05:43 -0700 Subject: [PATCH 10/13] fix python versions in env --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index 3ea7a698..0a0eed73 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -2,7 +2,7 @@ name: gmso-dev channels: - conda-forge dependencies: - - python=3.12 + - python>=3.9,<=3.12 - boltons - numpy=1.26.4 - sympy From a7422220c5c41d5ee4e44cf25081036b9b70bd7e Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 13:07:43 -0700 Subject: [PATCH 11/13] add back create-args to bleeding edge test --- .github/workflows/CI.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index cc3163a9..ac6c4ea6 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -95,6 +95,7 @@ jobs: uses: mamba-org/setup-micromamba@v2 with: environment-file: environment-dev.yml + create-args: python=3.12 - name: Install Packages from Source run: | From e4445bb33b73eb90fb82d29e101dec32af3623ad Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 13:50:25 -0700 Subject: [PATCH 12/13] update env file --- environment-dev.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index 0a0eed73..1525c5bb 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -10,17 +10,24 @@ dependencies: - boltons - lark>=1.2 - lxml + - intermol + - mdtraj - pydantic>=2 - networkx + - nglview>=3 - pytest + - garnett>=0.7.1 - openbabel>=3.0.0 + - openff-toolkit-base >=0.11 - openmm - gsd>=2.9 - parmed>=3.4.3 - - packmol>=18 + - packmol>=20 - pytest-cov + - pycifrw - rdkit>=2021 - requests + - requests-mock - scipy - treelib - codecov From 6459585bf91c0368826c49839570392f369cf397 Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Wed, 22 Jan 2025 18:32:13 -0700 Subject: [PATCH 13/13] remove bump2version --- environment-dev.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index 1525c5bb..b5d017d4 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -31,7 +31,6 @@ dependencies: - scipy - treelib - codecov - - bump2version - matplotlib - ipywidgets - ele>=0.2.0