Skip to content

Commit 3a3d62f

Browse files
authored
Convert to pyproject (#17)
* Add changelog * Add pyproject.toml * Modify action for tags only
1 parent fe953ba commit 3a3d62f

File tree

5 files changed

+84
-52
lines changed

5 files changed

+84
-52
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
url: https://pypi.org/p/tadasets
4343
permissions:
4444
id-token: write
45-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
45+
if: startsWith(github.ref, 'refs/tags/v')
4646
steps:
4747
- uses: actions/download-artifact@v4
4848
with:

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.2.1] - 2024-03-17
9+
10+
### Changed
11+
12+
- Updated doc build procedures. The `eyeglasses` dataset is now present in the docs.
13+
- Updated CI/CD procedures and automation to PyPI.
14+
15+
### Added
16+
17+
- This changelog!

pyproject.toml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[build-system]
2+
requires = ["setuptools >= 61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "tadasets"
7+
dynamic = ["version"]
8+
description = "Great data sets for Topological Data Analysis."
9+
readme = "README.md"
10+
authors = [
11+
{ name = "Nathaniel Saul", email = "nat@riverasaul.com" },
12+
{ name = "Chris Tralie", email = "chris.tralie@gmail.com" },
13+
{ name = "Filip Cornell", email = "c.filip.cornell@gmail.com" },
14+
{ name = "Michael Catanzaro", email = "catanzaromj@pm.me" },
15+
]
16+
maintainers = [
17+
{ name = "Nathaniel Saul", email = "nat@riverasaul.com" },
18+
{ name = "Chris Tralie", email = "chris.tralie@gmail.com" },
19+
{ name = "Michael Catanzaro", email = "catanzaromj@pm.me" },
20+
]
21+
22+
dependencies = ["matplotlib", "numpy"]
23+
24+
classifiers = [
25+
"Development Status :: 3 - Alpha",
26+
"Intended Audience :: Science/Research",
27+
"Intended Audience :: Education",
28+
"Intended Audience :: Financial and Insurance Industry",
29+
"Intended Audience :: Healthcare Industry",
30+
"Topic :: Scientific/Engineering :: Information Analysis",
31+
"Topic :: Scientific/Engineering :: Mathematics",
32+
"License :: OSI Approved :: MIT License",
33+
"Programming Language :: Python",
34+
]
35+
36+
37+
keywords = [
38+
"topological data analysis",
39+
"data sets",
40+
"test data",
41+
"algebraic topology",
42+
]
43+
44+
[project.optional-dependencies]
45+
testing = ["pytest", "pytest-cov", "scipy"]
46+
47+
docs = ["sktda_docs_config"]
48+
49+
[project.urls]
50+
Homepage = "https://tadasets.scikit-tda.org"
51+
Documentation = "https://tadasets.scikit-tda.org"
52+
Repository = "https://github.com/scikit-tda/tadasets"
53+
Issues = "https://github.com/scikit-tda/tadasets/issues"
54+
Changelog = "https://github.com/scikit-tda/persim/blob/master/RELEASE.txt"

setup.py

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,16 @@
1-
#!/usr/bin/env python
2-
3-
from setuptools import setup
4-
5-
1+
import setuptools
62
import re
73

8-
VERSIONFILE = "tadasets/_version.py"
9-
verstrline = open(VERSIONFILE, "rt").read()
10-
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
11-
mo = re.search(VSRE, verstrline, re.M)
12-
if mo:
13-
verstr = mo.group(1)
14-
else:
15-
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
164

5+
def get_version():
6+
VERSIONFILE = "tadasets/_version.py"
7+
verstrline = open(VERSIONFILE, "rt").read()
8+
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
9+
mo = re.search(VSRE, verstrline, re.M)
10+
if mo:
11+
return mo.group(1)
12+
else:
13+
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
1714

18-
with open("README.md") as f:
19-
long_description = f.read()
2015

21-
setup(
22-
name="tadasets",
23-
version=verstr,
24-
description="Great data sets for Topological Data Analysis.",
25-
long_description=long_description,
26-
long_description_content_type="text/markdown",
27-
author="Nathaniel Saul",
28-
author_email="nathaniel.saul@wsu.edu",
29-
url="https://tadasets.scikit-tda.org",
30-
license="MIT",
31-
packages=["tadasets"],
32-
include_package_data=True,
33-
extras_require={ # use `pip install -e ".[testing]"``
34-
"testing": ["pytest", "scipy"],
35-
"docs": ["sktda_docs_config"], # `pip install -e ".[docs]"``
36-
},
37-
install_requires=["numpy", "matplotlib"],
38-
python_requires=">=2.7,!=3.1,!=3.2,!=3.3",
39-
classifiers=[
40-
"Development Status :: 3 - Alpha",
41-
"Intended Audience :: Science/Research",
42-
"Intended Audience :: Education",
43-
"Intended Audience :: Financial and Insurance Industry",
44-
"Intended Audience :: Healthcare Industry",
45-
"Topic :: Scientific/Engineering :: Information Analysis",
46-
"Topic :: Scientific/Engineering :: Mathematics",
47-
"License :: OSI Approved :: MIT License",
48-
"Programming Language :: Python :: 2.7",
49-
"Programming Language :: Python :: 3",
50-
"Programming Language :: Python :: 3.4",
51-
"Programming Language :: Python :: 3.5",
52-
"Programming Language :: Python :: 3.6",
53-
],
54-
keywords="topological data analysis, data sets, test data",
55-
)
16+
setuptools.setup(version=get_version())

tadasets/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.0"
1+
__version__ = "0.2.1"

0 commit comments

Comments
 (0)