Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build dev package distributions

on:
pull_request:
branches:
- main
types:
- closed

jobs:
build:
if: github.event.pull_request.merged == true
Comment thread
awilfox marked this conversation as resolved.
runs-on: ubuntu-latest
steps:

# we need to fetch the full repo history to use setuptools_scm
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.10.7"
python-version: "3.14"
enable-cache: true

- name: Sync dependencies
run: uv sync --all-extras --dev

- name: Build Python package
run: uv build

- name: Upload package distributions as artifact
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: |
dist/
!dist/.gitignore
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Push Release Tags

on:
push:
tags:
- '**'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
# we need to fetch the full repo history to use setuptools_scm
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.10.7"
python-version: "3.14"
enable-cache: true

- name: Sync dependencies
run: uv sync --all-extras --dev

- name: Build Python package
run: uv build

- name: Upload package distributions as artifact
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: |
dist/
!dist/.gitignore


pypi-publish:
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/python-tind-client
permissions:
id-token: write
steps:
- uses: actions/checkout@v6

- name: Download built package distributions
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/

- name: Public package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dist/
build/
*.egg-info/
*.egg
tind_client/_version.py

# Virtual environments
.venv/
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ 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.2]

### Changed
- build package and publish to pypi, using setuptools_scm for version management

## [0.2.1]

### Changed
Expand Down
14 changes: 11 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[build-system]
requires = ["setuptools>=80"]
requires = ["setuptools>=80", "setuptools-scm[simple]>=10.0.5"]
build-backend = "setuptools.build_meta"

[project]
name = "python-tind-client"
version = "0.2.1"
dynamic = ["version"]
Comment thread
anarchivist marked this conversation as resolved.
description = "Python library for interacting with the TIND DA API"
readme = "README.md"
license = { file = "LICENSE" }
license-files = ["LICENSE"]
authors = [
{ name = "Jason Raitz", email = "raitz@berkeley.edu" },
{ name = "maría a. matienzo", email = "matienzo@berkeley.edu" },
Expand Down Expand Up @@ -61,5 +61,13 @@ allow-init-docstring = true
skip-checking-raises = true
style = "sphinx"

[tool.pylint.master]
ignore = ["_version.py"]

[tool.pylint.format]
max-line-length = 100

# the following is unnecessary, but having anything in this config section
# suppresses a spurious build warning from setuptools_scm.
[tool.setuptools_scm]
Comment thread
anarchivist marked this conversation as resolved.
version_file = "tind_client/_version.py"