Skip to content

Commit

Permalink
feat: port pyclient build config to pyproject.toml (#1470)
Browse files Browse the repository at this point in the history
* feat: port pyclient build config to pyproject.toml

* Update src/client/packaging/pypi/pyproject.toml

Co-authored-by: george <george.haff@gmail.com>

* Update src/client/packaging/pypi/pyproject.toml

Co-authored-by: george <george.haff@gmail.com>

* Update src/client/packaging/pypi/pyproject.toml

Co-authored-by: george <george.haff@gmail.com>

* Update src/client/packaging/pypi/pyproject.toml

Co-authored-by: george <george.haff@gmail.com>

* Update src/client/packaging/pypi/pyproject.toml

Co-authored-by: george <george.haff@gmail.com>

* Update src/client/packaging/pypi/pyproject.toml

Co-authored-by: george <george.haff@gmail.com>

* fix: remove setuptools version pin and python >= 3.8 req

* fix: omit dev version classifier metadata for pyclient

* fix: small formats to pyclient build config

* fix: add python 2 support to our classification

* fix(client)+doc: update ci and changelog

---------

Co-authored-by: george <george.haff@gmail.com>
  • Loading branch information
dshemetov and melange396 authored Jun 7, 2024
1 parent 69835d1 commit e423cb4
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
8 changes: 4 additions & 4 deletions .github/workflows/release-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions src/client/packaging/pypi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
44 changes: 44 additions & 0 deletions src/client/packaging/pypi/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
28 changes: 0 additions & 28 deletions src/client/packaging/pypi/setup.py

This file was deleted.

0 comments on commit e423cb4

Please sign in to comment.