Skip to content

Commit

Permalink
Merge pull request #250 from ianmkenney/clean_up_pyproject
Browse files Browse the repository at this point in the history
Cleaning up pyproject.toml
  • Loading branch information
chrisiacovella authored Sep 6, 2024
2 parents f360c19 + a7be95c commit bc1eb13
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 39 deletions.
27 changes: 27 additions & 0 deletions devtools/conda-envs/env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: modelforge_env
channels:
- conda-forge
- pytorch
dependencies:
# Base depends
- python
- pip
- h5py
- tqdm
- toml
- qcportal>=0.50
- qcelemental
- pytorch>=2.1
- loguru
- lightning>=2.0.8
- tensorboard
- torchvision
- openff-units
- torchmetrics>=1.4
- pint=0.23
- rdkit
- retry
- sqlitedict
- pydantic>=2
- ray-all
- jax
57 changes: 18 additions & 39 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[build-system]
requires = ["setuptools>=61.0", "versioningit~=2.0"]
requires = ["setuptools>=61.0", "versioningit~=3.0"]
build-backend = "setuptools.build_meta"

# Self-descriptive entries which should always be present
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
[project]
name = "modelforge"
description = "Infrastructure to implement and train NNPs"
Expand All @@ -17,45 +15,27 @@ license = { text = "MIT" }
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Operating System :: POSIX :: Linux",
"Environment :: GPU",
"Environment :: GPU :: NVIDIA CUDA",
]
requires-python = ">=3.8"
# Declare any run-time dependencies that should be installed with the package.
#dependencies = [
# "importlib-resources;python_version<'3.10'",
#]
requires-python = ">=3.10"

# Update the urls once the hosting is set up.
#[project.urls]
#"Source" = "https://github.com/<username>/modelforge/"
#"Documentation" = "https://modelforge.readthedocs.io/"

[project.optional-dependencies]
test = [
"pytest>=6.1.2",
"pytest-runner"
]
[project.urls]
Source = "https://github.com/choderalab/modelforge"
Documentation = "https://modelforge.readthedocs.io/"
Wiki = "https://github.com/choderalab/modelforge/wiki"

[tool.setuptools]
# This subkey is a beta stage development and keys may change in the future, see https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html for more details
#
# As of version 0.971, mypy does not support type checking of installed zipped
# packages (because it does not actually import the Python packages).
# We declare the package not-zip-safe so that our type hints are also available
# when checking client code that uses our (installed) package.
# Ref:
# Disable zipping because mypy cannot read zip imports and this may affect downstream development.
# https://mypy.readthedocs.io/en/stable/installed_packages.html?highlight=zip#using-installed-packages-with-mypy-pep-561
# NOTE: We might consider removing this once we can test the code in a
# production environment since zipping the package may increase performance.
zip-safe = false
# Let setuptools discover the package in the current directory,
# but be explicit about non-Python files.
# See also:
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#setuptools-specific-configuration
# Note that behavior is currently evolving with respect to how to interpret the
# "data" and "tests" subdirectories. As of setuptools 63, both are automatically
# included if namespaces is true (default), even if the package is named explicitly
# (instead of using 'find'). With 'find', the 'tests' subpackage is discovered
# recursively because of its __init__.py file, but the data subdirectory is excluded
# with include-package-data = false and namespaces = false.
include-package-data = true

[tool.setuptools.packages.find]
namespaces = false
where = ["."]
Expand All @@ -66,6 +46,7 @@ modelforge = [
"py.typed"
]

# https://versioningit.readthedocs.io/en/stable/configuration.html#
[tool.versioningit]
default-version = "1+unknown"

Expand All @@ -75,9 +56,7 @@ dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"

[tool.versioningit.vcs]
# The method key:
method = "git" # <- The method name
# Parameters to pass to the method:
method = "git"
match = ["*"]
default-tag = "1.0.0"

Expand All @@ -90,7 +69,7 @@ file = "modelforge/_version.py"
omit = [
# Omit the tests
"*/tests/*",
# Omit generated versioneer
# Omit generated versioningit
"modelforge/_version.py"
]

Expand Down

0 comments on commit bc1eb13

Please sign in to comment.