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
Binary file removed .DS_Store
Binary file not shown.
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
UV_VERSION: "0.11.32"

jobs:
quality:
name: Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- run: uv python install 3.14
- run: uv sync --locked --all-groups --python 3.14
- run: uv run ruff format --check .
- run: uv run ruff check .
- run: uv run mypy

test:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- run: uv python install ${{ matrix.python-version }}
- run: uv sync --locked --all-groups --python ${{ matrix.python-version }}
- run: uv run --python ${{ matrix.python-version }} pytest

package:
name: Distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- run: uv python install 3.14
- run: uv build --no-sources --python 3.14
- run: uvx --from twine twine check dist/*
- name: Smoke test wheel
run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
- name: Smoke test source distribution
run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
- name: Upload distributions
uses: actions/upload-artifact@v7
with:
name: python-distributions
path: dist/
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish release to PyPI

on:
release:
types: [published]

permissions:
contents: read

env:
UV_VERSION: "0.11.32"

jobs:
build:
name: Build distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- run: uv python install 3.14
- name: Verify release tag
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: |
PROJECT_VERSION="$(uv version --short)"
test "${RELEASE_TAG#v}" = "${PROJECT_VERSION}"
- run: uv build --no-sources --python 3.14
- run: uvx --from twine twine check dist/*
- name: Smoke test wheel
run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
- name: Smoke test source distribution
run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
- name: Upload distributions
uses: actions/upload-artifact@v7
with:
name: python-distributions
path: dist/

publish:
name: Publish to PyPI
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/coverpy
permissions:
id-token: write
contents: read
steps:
- name: Download distributions
uses: actions/download-artifact@v8
with:
name: python-distributions
path: dist/
- name: Publish distributions
uses: pypa/gh-action-pypi-publish@release/v1
88 changes: 22 additions & 66 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,74 +1,30 @@
# Byte-compiled / optimized / DLL files
# macOS
.DS_Store

# Python
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so
*.egg-info/
.python-version.local

# Distribution / packaging
.Python
env/
# Environments and package output
.venv/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
# Test, type-check, and lint output
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

#Ipython Notebook
.ipynb_checkpoints

.Python
[Bb]in
[Ii]nclude
[Ll]ib
[Ll]ib64
[Ll]ocal
#[Ss]cripts
pyvenv.cfg
.venv
pip-selfcheck.json
share/python-wheels
htmlcov/
.mypy_cache/
.pytest_cache/
.ruff_cache/

# Editors
.idea/
.vscode/
*.swp

# Codex workspace scratch directories
/outputs/
/work/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.14
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

All notable changes to coverpy are documented here.

## [1.0.0] - 2026-07-25

### Added

- A typed, context-managed Python 3.10+ client.
- Multi-result search, catalog ID lookup, and UPC lookup APIs.
- Rich normalized metadata for current iTunes Search API responses.
- A `coverpy` command suitable for one-off use through `uvx`.
- GitHub Actions for tests, package verification, and trusted PyPI publishing.

### Changed

- Replaced `setup.py`, ad hoc requirements, and Make targets with `pyproject.toml`, `uv`,
`uvx`, and `uv.lock`.
- Moved the package to a modern `src/` layout.
- Replaced Travis CI with GitHub Actions.
- Made album search the default while retaining the original `get_cover()` API.

### Removed

- Python 2 compatibility metadata and legacy universal wheels.
- Travis, Scrutinizer, stale packaging files, and committed `.DS_Store` files.
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Contributing

## Setup

Install [uv](https://docs.astral.sh/uv/) and sync the locked environment:

```console
uv sync --locked
```

## Checks

Run the same checks as CI before opening a pull request:

```console
uv run ruff format --check .
uv run ruff check .
uv run mypy
uv run pytest
uv build --no-sources
uvx --from twine twine check dist/*
```

Tests must mock network access. Do not depend on the live Apple endpoint in the test suite.
8 changes: 4 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
5 changes: 0 additions & 5 deletions MANIFEST

This file was deleted.

16 changes: 0 additions & 16 deletions Makefile

This file was deleted.

Loading
Loading