Skip to content

Commit

Permalink
Convert to pyproject (#17)
Browse files Browse the repository at this point in the history
* Add changelog

* Add pyproject.toml

* Modify action for tags only
  • Loading branch information
catanzaromj authored Mar 17, 2024
1 parent fe953ba commit 3a3d62f
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
url: https://pypi.org/p/tadasets
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.1] - 2024-03-17

### Changed

- Updated doc build procedures. The `eyeglasses` dataset is now present in the docs.
- Updated CI/CD procedures and automation to PyPI.

### Added

- This changelog!
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "tadasets"
dynamic = ["version"]
description = "Great data sets for Topological Data Analysis."
readme = "README.md"
authors = [
{ name = "Nathaniel Saul", email = "[email protected]" },
{ name = "Chris Tralie", email = "[email protected]" },
{ name = "Filip Cornell", email = "[email protected]" },
{ name = "Michael Catanzaro", email = "[email protected]" },
]
maintainers = [
{ name = "Nathaniel Saul", email = "[email protected]" },
{ name = "Chris Tralie", email = "[email protected]" },
{ name = "Michael Catanzaro", email = "[email protected]" },
]

dependencies = ["matplotlib", "numpy"]

classifiers = [
"Development Status :: 3 - Alpha",
"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",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
]


keywords = [
"topological data analysis",
"data sets",
"test data",
"algebraic topology",
]

[project.optional-dependencies]
testing = ["pytest", "pytest-cov", "scipy"]

docs = ["sktda_docs_config"]

[project.urls]
Homepage = "https://tadasets.scikit-tda.org"
Documentation = "https://tadasets.scikit-tda.org"
Repository = "https://github.com/scikit-tda/tadasets"
Issues = "https://github.com/scikit-tda/tadasets/issues"
Changelog = "https://github.com/scikit-tda/persim/blob/master/RELEASE.txt"
61 changes: 11 additions & 50 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,55 +1,16 @@
#!/usr/bin/env python

from setuptools import setup


import setuptools
import re

VERSIONFILE = "tadasets/_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,))

def get_version():
VERSIONFILE = "tadasets/_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,))

with open("README.md") as f:
long_description = f.read()

setup(
name="tadasets",
version=verstr,
description="Great data sets for Topological Data Analysis.",
long_description=long_description,
long_description_content_type="text/markdown",
author="Nathaniel Saul",
author_email="[email protected]",
url="https://tadasets.scikit-tda.org",
license="MIT",
packages=["tadasets"],
include_package_data=True,
extras_require={ # use `pip install -e ".[testing]"``
"testing": ["pytest", "scipy"],
"docs": ["sktda_docs_config"], # `pip install -e ".[docs]"``
},
install_requires=["numpy", "matplotlib"],
python_requires=">=2.7,!=3.1,!=3.2,!=3.3",
classifiers=[
"Development Status :: 3 - Alpha",
"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",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
],
keywords="topological data analysis, data sets, test data",
)
setuptools.setup(version=get_version())
2 changes: 1 addition & 1 deletion tadasets/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.0"
__version__ = "0.2.1"

0 comments on commit 3a3d62f

Please sign in to comment.