diff --git a/.bumpversion.cfg b/.bumpversion.cfg index b9f9c3763..d6a12c902 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -13,6 +13,6 @@ tag = False [bumpversion:file:src/client/packaging/npm/package.json] -[bumpversion:file:src/client/packaging/pypi/setup.py] +[bumpversion:file:src/client/packaging/pypi/pyproject.toml] [bumpversion:file:dev/local/setup.cfg] diff --git a/.github/workflows/release-helper.yml b/.github/workflows/release-helper.yml index f6a57a6b3..d4c24dfcc 100644 --- a/.github/workflows/release-helper.yml +++ b/.github/workflows/release-helper.yml @@ -57,14 +57,14 @@ jobs: - name: Install build dependencies run: | python -m pip install --upgrade pip - pip install wheel twine + pip install build wheel twine - name: Prepare package run: | cp src/client/*.py src/client/packaging/pypi/delphi_epidata/ - name: Create release working-directory: src/client/packaging/pypi run: | - python setup.py sdist bdist_wheel + python -m build --sdist --wheel - uses: actions/upload-artifact@v2 with: name: delphi_epidata_py @@ -80,8 +80,8 @@ jobs: with: user: __token__ password: ${{ secrets.DELPHI_PYPI_PROD_TOKEN }} - packages_dir: src/client/packaging/pypi/dist/ - skip_existing: true + packages-dir: src/client/packaging/pypi/dist/ + skip-existing: true # repository_url: https://test.pypi.org/legacy/ release_js_client: diff --git a/src/client/packaging/pypi/CHANGELOG.md b/src/client/packaging/pypi/CHANGELOG.md index ec6534f1a..05316a9bf 100644 --- a/src/client/packaging/pypi/CHANGELOG.md +++ b/src/client/packaging/pypi/CHANGELOG.md @@ -3,6 +3,14 @@ All notable future changes to the `delphi_epidata` python client will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/). +## [4.1.24] - 2024-06-06 + +### Includes +- https://github.com/cmu-delphi/delphi-epidata/pull/1470 + +### Changed +- Replaced `setup.py` with `pyproject.toml` for package metadata and build configuration. + ## [4.1.23] - 2024-05-31 ### Includes diff --git a/src/client/packaging/pypi/pyproject.toml b/src/client/packaging/pypi/pyproject.toml new file mode 100644 index 000000000..2aadda4e9 --- /dev/null +++ b/src/client/packaging/pypi/pyproject.toml @@ -0,0 +1,44 @@ +# This file was derived from the PyPA Sample Project +# https://github.com/pypa/sampleproject + +# Guide (user-friendly): +# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ + +# Specification (technical, formal): +# https://packaging.python.org/en/latest/specifications/pyproject-toml/ + + +# Choosing a build backend: +# https://packaging.python.org/en/latest/tutorials/packaging-projects/#choosing-a-build-backend +[build-system] +# A list of packages that are needed to build your package: +requires = ["setuptools"] # REQUIRED if [build-system] table is used +# The name of the Python object that frontends will use to perform the build: +build-backend = "setuptools.build_meta" # If not defined, then legacy behavior can happen. + +[project] +name = "delphi_epidata" # REQUIRED, is the only field that cannot be marked as dynamic. +version = "4.1.23" +description = "A programmatic interface to Delphi's Epidata API." +readme = "README.md" +license = { file = "LICENSE" } +authors = [{ name = "David Farrow", email = "dfarrow0@gmail.com" }] +maintainers = [ + { name = "Delphi Support", email = "delphi-support+pypi@andrew.cmu.edu" }, +] +# For a list of valid classifiers, see https://pypi.org/classifiers/ +classifiers = [ + "License :: OSI Approved :: MIT License", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "Intended Audience :: Science/Research", + "Natural Language :: English", + "Topic :: Scientific/Engineering :: Bio-Informatics", +] +dependencies = ["aiohttp", "delphi-utils", "requests>=2.7.0", "tenacity"] + +[project.urls] +"Homepage" = "https://github.com/cmu-delphi/delphi-epidata" +"Changelog" = "https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/packaging/pypi/CHANGELOG.md" diff --git a/src/client/packaging/pypi/setup.py b/src/client/packaging/pypi/setup.py deleted file mode 100644 index d71ce3db9..000000000 --- a/src/client/packaging/pypi/setup.py +++ /dev/null @@ -1,28 +0,0 @@ -import setuptools - -with open("README.md", "r") as f: - long_description = f.read() - -setuptools.setup( - name="delphi_epidata", - version="4.1.23", - author="David Farrow", - author_email="dfarrow0@gmail.com", - description="A programmatic interface to Delphi's Epidata API.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/cmu-delphi/delphi-epidata", - project_urls={ - "Changelog": "https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/packaging/pypi/CHANGELOG.md", - }, - packages=setuptools.find_packages(), - install_requires=["aiohttp", "delphi-utils", "requests>=2.7.0", "tenacity"], - classifiers=[ - "Programming Language :: Python", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Intended Audience :: Science/Research", - "Natural Language :: English", - "Topic :: Scientific/Engineering :: Bio-Informatics", - ], -)