Skip to content

Commit

Permalink
replace setup.py,cfg with pyproject.toml
Browse files Browse the repository at this point in the history
- fix alchemistry#385
- use pyproject.toml instead of setup.py (note: may need to change README for PyPi to exclude
  banners)
- remove versioneer and use versioningit (use alchemlyb.__version__ directly where
  the version is needed, e.g., for sphinx docs)
- updated CHANGES for 2.4.0
  • Loading branch information
orbeckst authored and jaclark5 committed Sep 19, 2024
1 parent b16f177 commit a3b2c08
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 3,049 deletions.
9 changes: 2 additions & 7 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,10 @@ Enhancements
Enhancements
- Addition of `block_average` function in both `convergence` and
`visualization` (Issue #380, PR #381)
- Add support for LAMMPS FEP files (Issue #349, PR #348)

09/??/2024 orbeckst

* 2.3.3

Enhancements:
- add CITATION.cff file with all authors from AUTHORS (issue #394, PR #395)

Changes
- modernize build system: replaced setup.py,cfg with pyproject.toml (#385)

08/24/2024 xiki-tempula

Expand Down
7 changes: 3 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,11 @@
# We always display the full release string; if something else is
# desired, see the commented out code

from alchemlyb._version import get_versions

release = get_versions()["version"]
del get_versions
import alchemlyb

release = alchemlyb.__version__
version = release

# version = release.split("+")[0] # only major.minor.patch
# version = "."join(release.split(".")[:2]) # only major.minor

Expand Down
84 changes: 84 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# alchemlyb

[build-system]
requires = ["setuptools", "wheel", "versioningit"]
build-backend = "setuptools.build_meta"

[project]
name = "alchemlyb"
description = "the simple alchemistry library"
authors = [
{ name = "Zhiyi Wu", email = "william@zhiyiwu.me" },
{ name = "David Dotson", email = "dotsdl@gmail.com" }
]
maintainers = [
{ name = "Zhiyi Wu", email = "william@zhiyiwu.me" },
{ name = "Oliver Beckstein", email = "orbeckst@gmail.com" }
]
dynamic = ["version"]

readme = { file = "README.md", content-type = "text/markdown" }
license = { text = "BSD" }
keywords = ["free energy", "MBAR", "thermodynamic integration",
"free energy perturbation", "FEP", "alchemistry", "analysis",
"GROMACS", "NAMD", "AMBER", "molecular dynamics"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Software Development :: Libraries :: Python Modules"
]
requires-python = ">=3.10"

dependencies = [
"numpy",
"pandas>=2.1",
"pymbar>=4",
"scipy",
"scikit-learn",
"matplotlib>=3.7",
"loguru",
"pyarrow",
]


[project.optional-dependencies]
tests = [
"pytest",
"alchemtest"
]

[project.urls]
Homepage = "https://github.com/alchemistry/alchemlyb"
Documentation = "https://alchemlyb.readthedocs.io/"
Repository = "https://github.com/alchemistry/alchemlyb"
Issues = "https://github.com/alchemistry/alchemlyb/issues"
Changelog = "https://github.com/alchemistry/alchemlyb/blob/master/CHANGES"
Discussions = "https://github.com/alchemistry/alchemlyb/discussions"


[tool.setuptools.packages.find]
where = ["src"]


[tool.versioningit]

[tool.versioningit.vcs]
default-tag = "0.0.0"
match = ["*"]

[tool.versioningit.write]
file = "src/alchemlyb/_version.py"


7 changes: 0 additions & 7 deletions setup.cfg

This file was deleted.

63 changes: 0 additions & 63 deletions setup.py

This file was deleted.

5 changes: 1 addition & 4 deletions src/alchemlyb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import pandas as pd

from ._version import get_versions

__version__ = get_versions()["version"]
del get_versions
from ._version import __version__


def pass_attrs(func):
Expand Down
Loading

0 comments on commit a3b2c08

Please sign in to comment.