Skip to content

Conversation

@snejus
Copy link
Member

@snejus snejus commented Jan 19, 2026

This PR modernises the project into a more maintainable, CI-driven Python package by aligning tooling and workflows with the setup used in beetbox/confuse.

Architecture / tooling changes

  • Standardises packaging around pyproject.toml and Poetry dependency groups (adds dev and extends lint), making local dev, linting, and testing consistent and reproducible.
  • Introduces a lightweight test runner layer via poethepoet tasks (test, test-with-coverage) and centralises pytest/coverage configuration in setup.cfg.
  • Adds tests
  • Adds GitHub Actions CI to run tests on Ubuntu and Windows, and Python 3.10-3.14 versions.

@snejus snejus requested review from a team, Copilot and sampsyo and removed request for sampsyo January 19, 2026 12:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the pyacoustid project by adopting contemporary Python packaging standards and introducing comprehensive testing infrastructure. The changes align the project's tooling with the setup used in beetbox/confuse, making it more maintainable and enabling CI-driven development.

Changes:

  • Replaces setup.py with pyproject.toml using Poetry for dependency management and builds
  • Adds comprehensive test suites for both acoustid and chromaprint modules
  • Introduces GitHub Actions workflows for automated testing, linting, and releases
  • Removes Python 2 compatibility code and updates minimum Python version to 3.10

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/test_chromaprint.py Adds new test suite for chromaprint module functionality
test/test_acoustid.py Adds new test suite for acoustid API and fingerprinting
setup.py Removes legacy setup.py in favor of pyproject.toml
setup.cfg Adds pytest and coverage configuration
pyproject.toml Defines modern project metadata, dependencies, and tooling tasks
fpcalc.py Removes Python 2 compatibility and modernizes string formatting
chromaprint.py Removes Python 2 compatibility and reformats code
aidmatch.py Removes Python 2 compatibility and updates imports/formatting
acoustid.py Removes Python 2 compatibility and modernizes code
README.rst Updates Python version requirements
MANIFEST.in Removes file as packaging is now handled by pyproject.toml
.github/workflows/make_release.yaml Adds automated release workflow
.github/workflows/main.yml Adds CI workflow for running tests
.github/workflows/lint.yaml Adds linting/formatting checks
.github/workflows/changelog_reminder.yaml Adds changelog update reminder
.git-blame-ignore-revs Adds formatting commit hashes to ignore

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

[tool:pytest]
# slightly more verbose output
console_output_style = count
# pretty-print test names in the Codecov U
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment appears to be incomplete. 'Codecov U' seems to be a truncated reference, likely should be 'Codecov UI' or 'Codecov Upload'.

Suggested change
# pretty-print test names in the Codecov U
# pretty-print test names in the Codecov UI

Copilot uses AI. Check for mistakes.
[tool.poe.tasks.test-with-coverage]
help = "Run tests and record coverage"
ref = "test"
# record coverage in confuse package
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment references 'confuse package' but this is the pyacoustid project. Should reference 'chromaprint and acoustid modules' or 'pyacoustid package' instead.

Suggested change
# record coverage in confuse package
# record coverage for chromaprint and acoustid modules

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +12
- master

concurrency:
# Cancel previous workflow run when a new commit is pushed to a feature branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The branch name is inconsistent with the main.yml workflow which uses 'main'. The lint workflow references 'master' but should use 'main' to match the other workflows.

Suggested change
- master
concurrency:
# Cancel previous workflow run when a new commit is pushed to a feature branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
- main
concurrency:
# Cancel previous workflow run when a new commit is pushed to a feature branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +12
- master

concurrency:
# Cancel previous workflow run when a new commit is pushed to a feature branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition references 'master' branch but should reference 'main' to be consistent with the repository's default branch used in other workflows.

Suggested change
- master
concurrency:
# Cancel previous workflow run when a new commit is pushed to a feature branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
- main
concurrency:
# Cancel previous workflow run when a new commit is pushed to a feature branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

Copilot uses AI. Check for mistakes.
- name: Upload code coverage
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coverage file path is incorrect. According to setup.cfg line 91, the coverage XML file is written to .reports/coverage.xml, not ./coverage.xml.

Suggested change
files: ./coverage.xml
files: .reports/coverage.xml

Copilot uses AI. Check for mistakes.
@snejus snejus force-pushed the modernize-package branch 3 times, most recently from ac9c6f3 to f6113bf Compare January 19, 2026 13:23
@snejus snejus force-pushed the modernize-package branch from f6113bf to e7c969e Compare January 19, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants