-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to pyproject.toml spec (#18)
* Convert setup.py spec to pyproject.toml spec * Remove requirements.txt * Update workflows to use optional installs * Add pytestcov to optional testing deps * Fix two dep typos and add build dep, * Optional dep is called 'testing' not 'tests' * Fix windows tests * Add doc requirements * Remove changelog from pyproject.toml
- Loading branch information
1 parent
ca37386
commit 17cd2b1
Showing
6 changed files
with
79 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sphinx | ||
sphinx_rtd_theme | ||
numpydoc | ||
ipython | ||
nbsphinx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[build-system] | ||
requires = ["setuptools >= 61.0", "build", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "dreimac" | ||
dynamic = ["version"] | ||
description = "DREiMac: Dimensionality reduction with Eilenberg-MacLane coordinates" | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "Jose A. Perea", email = "[email protected]" }, | ||
{ name = "Luis Scoccola", email = "[email protected]" }, | ||
{ name = "Chris Tralie", email = "[email protected]" }, | ||
] | ||
maintainers = [ | ||
{ name = "Jose A. Perea", email = "[email protected]" }, | ||
{ name = "Luis Scoccola", email = "[email protected]" }, | ||
{ name = "Chris Tralie", email = "[email protected]" }, | ||
] | ||
|
||
requires-python = ">=3.8, <3.12" | ||
|
||
dependencies = [ | ||
"matplotlib >= 3.6", | ||
"numba >= 0.56", | ||
"numpy >= 1.23", | ||
"persim >=0.3", | ||
"ripser >= 0.6", | ||
"scipy >=1.10", | ||
] | ||
|
||
classifiers = [ | ||
"Intended Audience :: Science/Research", | ||
"Intended Audience :: Education", | ||
"Intended Audience :: Financial and Insurance Industry", | ||
"Intended Audience :: Healthcare Industry", | ||
"Topic :: Scientific/Engineering :: Information Analysis", | ||
"Topic :: Scientific/Engineering :: Mathematics", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: Apache Software License", | ||
] | ||
|
||
keywords = ["dimensionality reduction", "topological data analysis"] | ||
|
||
[project.optional-dependencies] | ||
testing = ["pytest", "pytest-cov"] | ||
|
||
docs = ["sphinx", "sphinx_rtd_theme", "numpydoc", "ipykernel", "nbsphinx"] | ||
|
||
[project.urls] | ||
Homepage = "https://dreimac.scikit-tda.org" | ||
Documentation = "https://dreimac.scikit-tda.org" | ||
Repository = "https://github.com/scikit-tda/DREiMac" | ||
Issues = "https://github.com/scikit-tda/DREiMac/issues" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,18 @@ | ||
from setuptools import setup | ||
|
||
## Get version information from _version.py | ||
import re | ||
|
||
VERSIONFILE = "dreimac/_version.py" | ||
verstrline = open(VERSIONFILE, "rt").read() | ||
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" | ||
mo = re.search(VSRE, verstrline, re.M) | ||
if mo: | ||
verstr = mo.group(1) | ||
else: | ||
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) | ||
|
||
# Use README.md as the package long description | ||
with open("README.md") as f: | ||
long_description = f.read() | ||
|
||
|
||
# get requirements | ||
def requirements(): | ||
with open("requirements.txt") as f: | ||
return [line.strip() for line in f if line.strip()] | ||
def get_version(): | ||
VERSIONFILE = "dreimac/_version.py" | ||
verstrline = open(VERSIONFILE, "rt").read() | ||
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" | ||
mo = re.search(VSRE, verstrline, re.M) | ||
if mo: | ||
return mo.group(1) | ||
else: | ||
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) | ||
|
||
|
||
setup( | ||
name="dreimac", | ||
version=verstr, | ||
description="DREiMac: Dimensionality reduction with Eilenberg-MacLane coordinates", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
author="Jose A. Perea, Luis Scoccola, Chris Tralie", | ||
author_email="[email protected]", | ||
license="Apache2", | ||
packages=["dreimac"], | ||
install_requires=requirements(), | ||
extras_require={ | ||
"testing": ["pytest"], | ||
"docs": ["sphinx", "sphinx_rtd_theme", "numpydoc", "ipykernel", "nbsphinx"], | ||
}, | ||
python_requires=">=3.8,<3.12", | ||
classifiers=[ | ||
"Intended Audience :: Science/Research", | ||
"Intended Audience :: Education", | ||
"Intended Audience :: Financial and Insurance Industry", | ||
"Intended Audience :: Healthcare Industry", | ||
"Topic :: Scientific/Engineering :: Information Analysis", | ||
"Topic :: Scientific/Engineering :: Mathematics", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
], | ||
keywords="topological data analysis, dimensionality reduction", | ||
version=get_version(), | ||
) |