diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 1e799443c..5aaaec8e2 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -30,7 +30,7 @@ jobs: name: Checkout Branch / Pull Request - name: Install Mamba (Linux) - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: environment-dev.yml create-args: >- @@ -38,7 +38,7 @@ jobs: if: runner.os != 'Windows' - name: Install Mamba (Windows) - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: environment-dev-win.yml create-args: >- @@ -52,7 +52,7 @@ jobs: run: python -m pytest -v --cov=mbuild --cov-report=xml --cov-append --cov-config=setup.cfg --color yes --pyargs mbuild - name: Upload Coverage Report - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: name: mBuild-Coverage verbose: true @@ -76,7 +76,7 @@ jobs: name: Checkout Branch / Pull Request - name: Install Mamba (Linux) - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: environment-dev.yml create-args: >- @@ -84,7 +84,7 @@ jobs: if: runner.os != 'Windows' - name: Install Mamba (Windows) - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: environment-dev-win.yml create-args: >- @@ -110,25 +110,13 @@ 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 - - name: Clone Foyer and GMSO - run: | - git clone https://github.com/mosdef-hub/foyer.git - git clone https://github.com/mosdef-hub/gmso.git - - - name: Update Environment with foyer/gmso Dependencies - run: | - micromamba update --name mbuild-dev --file foyer/environment.yml - micromamba update --name mbuild-dev --file gmso/environment.yml - - name: Install Packages from Source run: | - pip install -e foyer - pip install -e gmso pip install -e . - name: Run Bleeding Edge Tests diff --git a/environment-dev.yml b/environment-dev.yml index 42591309f..10d4aa408 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -2,32 +2,45 @@ name: mbuild-dev channels: - conda-forge dependencies: - - bump2version - - codecov - - ele - - gmso>=0.9.0 - - foyer>=0.11.0 - - freud>=2.0.0 - - garnett>=0.7.1 - - gsd>=2.9 - - hoomd>=3 + - python>=3.9,<=3.12 + - boltons + - numpy=1.26.4 + - sympy + - unyt>=2.9.5 + - boltons + - lark>=1.2 + - lxml - intermol - mdtraj + - pydantic>=2 - networkx - nglview>=3 - - numpy=1.26.4 - - openbabel>=3 - - packmol>=20 - - parmed>=3.4.3 - - pip - - pre-commit - - py3Dmol - - pycifrw - pytest - - pytest-azurepipelines + - garnett>=0.7.1 + - openbabel>=3.0.0 + - openff-toolkit-base >=0.11 + - openmm + - gsd>=2.9 + - parmed>=3.4.3 + - packmol>=20 - pytest-cov - - python>=3.8 + - pycifrw - rdkit>=2021 + - requests + - requests-mock - scipy - treelib + - codecov + - 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/gmso.git@main + - git+https://github.com/mosdef-hub/foyer.git@main + - git+https://github.com/mosdef-hub/forcefield-utilities.git@main diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..9d51a1c21 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,54 @@ +[build-system] +requires = ["setuptools>=61.2"] +build-backend = "setuptools.build_meta" + +[project] +name = "mbuild" +description = "A hierarchical, component based molecule builder." +readme = "README.md" +authors = [ + {name = "Janos Sallai", email = "janos.sallai@vanderbilt.edu"}, + {name = "Christopher Klein", email = "christoph.klein@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/mbuild"} +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.setuptools.package-data] +mbuild = ['"utils/**"', '"lib/**"'] + +[tool.setuptools.dynamic] +version = {attr = "mbuild.__version__"} + +[project.entry-points."mbuild.plugins"] +Alkane = "mbuild.lib.recipes.alkane:Alkane" +Monolayer = "mbuild.lib.recipes.monolayer:Monolayer" +Polymer = "mbuild.lib.recipes.polymer:Polymer" +SilicaInterface = "mbuild.lib.recipes.silica_interface:SilicaInterface" +TiledCompound = "mbuild.lib.recipes.tiled_compound:TiledCompound" diff --git a/setup.cfg b/setup.cfg index fe4db44eb..f130f17cd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,6 +24,4 @@ omit = [bumpversion:file:mbuild/__init__.py] -[bumpversion:file:setup.py] - [bumpversion:file:docs/conf.py] diff --git a/setup.py b/setup.py deleted file mode 100644 index 12defd00b..000000000 --- a/setup.py +++ /dev/null @@ -1,106 +0,0 @@ -"""mBuild: A hierarchical, component based molecule builder. - -With just a few lines of mBuild code, you can assemble reusable components into -complex molecular systems for molecular dynamics simulations. mBuild is -designed to minimize or even eliminate the need to explicitly translate and -orient components when building systems: you simply tell it to connect two -pieces! mBuild also keeps track of the system's topology so you don't have to -worry about manually defining bonds when constructing chemically bonded -structures from smaller components. -""" - -import os -import subprocess -from distutils.spawn import find_executable - -from setuptools import find_packages, setup - -##################################### -NAME = "mbuild" -VERSION = "1.0.0" -ISRELEASED = True -if ISRELEASED: - __version__ = VERSION -else: - __version__ = VERSION + ".dev0" -##################################### - - -def proto_procedure(): - # Find the Protocol Compiler and compile protocol buffers - # Taken from https://github.com/protocolbuffers/protobuf/blob/fcfc47d405113b59bd43c2e54daf5d9fe5c44593/python/setup.py - # Only compile if a protocompiler is found, otherwise don't do anything - if "PROTOC" in os.environ and os.path.exists(os.environ["PROTOC"]): - protoc = os.environ["PROTOC"] - elif os.path.exists("../src/protoc"): - protoc = "../src/protoc" - elif os.path.exists("../src/protoc.exe"): - protoc = "../src/protoc.exe" - elif os.path.exists("../vsprojects/Debug/protoc.exe"): - protoc = "../vsprojects/Debug/protoc.exe" - elif os.path.exists("../vsprojects/Release/protoc.exe"): - protoc = "../vsprojects/Release/protoc.exe" - else: - protoc = find_executable("protoc") - if protoc is None: - protoc = find_executable("protoc.exe") - - if protoc is not None: - compile_proto(protoc) - - -def compile_proto(protoc): - protoc_command = [ - protoc, - "-I=mbuild/formats/", - "--python_out=mbuild/formats/", - "compound.proto", - ] - subprocess.call(protoc_command) - - -if __name__ == "__main__": - proto_procedure() - - setup( - name=NAME, - version=__version__, - description=__doc__.split("\n"), - long_description=__doc__, - author="Janos Sallai, Christoph Klein", - author_email="janos.sallai@vanderbilt.edu, christoph.klein@vanderbilt.edu", - url="https://github.com/mosdef-hub/mbuild", - download_url="https://github.com/mosdef-hub/mbuild/tarball/{}".format( - __version__ - ), - packages=find_packages(), - package_data={"mbuild": ["utils/reference/*.{pdb,mol2}", "lib/*.{pdb,mol2}"]}, - entry_points={ - "mbuild.plugins": [ - "Alkane = mbuild.lib.recipes.alkane:Alkane", - "Monolayer = mbuild.lib.recipes.monolayer:Monolayer", - "Polymer = mbuild.lib.recipes.polymer:Polymer", - "SilicaInterface = mbuild.lib.recipes.silica_interface:SilicaInterface", - "TiledCompound = mbuild.lib.recipes.tiled_compound:TiledCompound", - ] - }, - package_dir={"mbuild": "mbuild"}, - include_package_data=True, - license="MIT", - zip_safe=False, - keywords="mbuild", - classifiers=[ - "Development Status :: 4 - Beta", - "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", - ], - )