Skip to content

Commit cceaa03

Browse files
author
AudD
committed
audd-python: v1.5.7 — fix ruff I001 import ordering in test_longpoll_one_step.py
CI on v1.5.6 failed ruff check on tests/unit/test_longpoll_one_step.py — a stray blank line between 'from audd._callbacks import derive_longpoll_category' and the next constant. ruff --fix removes it. No source change beyond the test file; bumping the patch version because PyPI rejects re-uploads at the same version.
0 parents  commit cceaa03

61 files changed

Lines changed: 6703 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: tests + mypy + ruff
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python: ['3.10', '3.11', '3.12', '3.13']
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python }}
22+
cache: pip
23+
- name: Install
24+
run: |
25+
pip install --upgrade pip
26+
pip install -e '.[dev]'
27+
- name: Ruff
28+
run: python -m ruff check src/audd/ tests/
29+
- name: Mypy
30+
run: python -m mypy src/audd/
31+
- name: Unit tests
32+
run: python -m pytest tests/unit/ -v --tb=short

.github/workflows/contract.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Contract tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: '0 6 * * *' # daily at 06:00 UTC
10+
repository_dispatch:
11+
types: [openapi-updated]
12+
13+
jobs:
14+
contract:
15+
name: validate parser against latest audd-openapi fixtures
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
path: audd-python
21+
- name: Check out audd-openapi
22+
uses: actions/checkout@v4
23+
with:
24+
repository: AudDMusic/audd-openapi
25+
path: audd-openapi
26+
ref: main
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.12'
30+
cache: pip
31+
cache-dependency-path: audd-python/pyproject.toml
32+
- name: Install
33+
working-directory: audd-python
34+
run: pip install -e '.[dev]'
35+
- name: Run contract tests
36+
working-directory: audd-python
37+
env:
38+
AUDD_OPENAPI_FIXTURES: ${{ github.workspace }}/audd-openapi/fixtures
39+
run: python -m pytest tests/contract/ -v --tb=short
40+
- name: Open issue on failure (dispatched runs only)
41+
if: failure() && github.event_name == 'repository_dispatch'
42+
env:
43+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
TRIGGER_SHA: ${{ github.event.client_payload.trigger_sha }}
45+
run: |
46+
gh issue create \
47+
--title "Contract drift: audd-openapi spec change broke parser" \
48+
--body "An openapi-updated dispatch (trigger SHA: $TRIGGER_SHA) caused contract tests to fail. Investigate and update parsers." \
49+
--label "contract-drift" || true

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'audd-python/v*'
7+
- 'v*'
8+
9+
permissions:
10+
contents: read
11+
id-token: write
12+
attestations: write
13+
14+
jobs:
15+
build-and-publish:
16+
name: Build and publish to PyPI
17+
runs-on: ubuntu-latest
18+
environment: pypi
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.12'
24+
- name: Install build tools
25+
run: |
26+
pip install --upgrade pip build
27+
- name: Build sdist + wheel
28+
run: python -m build
29+
- name: Generate Sigstore attestations
30+
uses: actions/attest-build-provenance@v1
31+
with:
32+
subject-path: 'dist/*'
33+
- name: Publish to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1
35+
with:
36+
attestations: true

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
__pycache__/
2+
*.py[cod]
3+
.venv/
4+
venv/
5+
build/
6+
dist/
7+
*.egg-info/
8+
.pytest_cache/
9+
.mypy_cache/
10+
.ruff_cache/
11+
.coverage
12+
htmlcov/
13+
.env
14+
.DS_Store

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 AudD, LLC (https://audd.io)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)