Skip to content

Commit 9f2875d

Browse files
committed
update metadata / workflow for publishing
1 parent e51e382 commit 9f2875d

File tree

2 files changed

+80
-4
lines changed

2 files changed

+80
-4
lines changed

.github/workflows/publish.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
environment:
9+
description: 'Environment to publish to'
10+
required: true
11+
default: 'testpypi'
12+
type: choice
13+
options:
14+
- testpypi
15+
- pypi
16+
17+
jobs:
18+
publish:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: ${{ github.event_name == 'release' && 'pypi' || github.event.inputs.environment }}
22+
url: ${{ github.event_name == 'release' && 'https://pypi.org/p/wav2aug' || 'https://test.pypi.org/p/wav2aug' }}
23+
permissions:
24+
id-token: write
25+
contents: read
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.10'
34+
35+
- name: Install uv
36+
uses: astral-sh/setup-uv@v4
37+
38+
- name: Build package
39+
run: uv build
40+
41+
- name: Publish to Test PyPI
42+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'testpypi'
43+
uses: pypa/gh-action-pypi-publish@release/v1
44+
with:
45+
repository-url: https://test.pypi.org/legacy/
46+
verbose: true
47+
48+
- name: Publish to PyPI
49+
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'pypi')
50+
uses: pypa/gh-action-pypi-publish@release/v1
51+
with:
52+
verbose: true

pyproject.toml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,48 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "wav2aug"
77
version = "0.1.0"
8-
description = "A general speech augmentation policy."
8+
description = "A general speech augmentation policy"
99
readme = "readme.md"
1010
requires-python = ">=3.10"
11+
license = {text = "Apache-2.0"}
12+
authors = [
13+
{name = "gfdb"}
14+
]
15+
keywords = ["audio", "speech", "augmentation", "pytorch", "machine-learning", "deep-learning"]
16+
classifiers = [
17+
"Development Status :: 3 - Alpha",
18+
"Intended Audience :: Developers",
19+
"Intended Audience :: Science/Research",
20+
"License :: OSI Approved :: Apache Software License",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
26+
"Topic :: Multimedia :: Sound/Audio :: Analysis",
27+
"Topic :: Software Development :: Libraries :: Python Modules",
28+
]
1129
dependencies = [
1230
"torch>=2.8.0",
1331
"torchcodec>=0.7.0",
1432
]
1533

1634
[project.optional-dependencies]
1735
test = [
18-
"pytest>=8",
19-
"pytest-cov",
36+
"pytest>=8",
37+
"pytest-cov",
2038
]
2139

40+
[project.urls]
41+
Homepage = "https://github.com/gfdb/wav2aug"
42+
Repository = "https://github.com/gfdb/wav2aug"
43+
Issues = "https://github.com/gfdb/wav2aug/issues"
44+
Documentation = "https://github.com/gfdb/wav2aug#readme"
45+
2246

2347
[tool.setuptools]
2448
include-package-data = true
2549
packages = { find = { where = ["."], include = ["wav2aug*"], exclude = ["tests*"], namespaces = true } }
2650

2751
[tool.setuptools.package-data]
28-
wav2aug = ["py.typed", "**/*.yaml", "assets/**"]
52+
wav2aug = ["py.typed", "**/*.yaml", "assets/**"]

0 commit comments

Comments
 (0)