Skip to content

Conversation

@petermcd
Copy link
Owner

@petermcd petermcd commented May 7, 2025

Updated python to version 3.13
Updated requirements to latest versions and pinned
Updated pre-commit hooks to latest versions
Updated pre-commit workflow to correct name of main branch

Summary by Sourcery

Update project dependencies, Python version, and development tooling to the latest versions

New Features:

  • Upgrade to Python 3.13

Enhancements:

  • Update type hints to use newer Python syntax
  • Update development tooling configurations

CI:

  • Update pre-commit workflow to use 'main' branch
  • Update GitHub Actions to use latest checkout and setup-python actions

Chores:

  • Pin requirements to specific versions
  • Update pre-commit hooks to latest versions
  • Update project Python version classifiers

@petermcd petermcd self-assigned this May 7, 2025
@petermcd petermcd added bug Something isn't working enhancement New feature or request labels May 7, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented May 7, 2025

Reviewer's Guide

This pull request upgrades the project to Python 3.13. This is achieved by updating the Python version specified in the CI workflow and pre-commit configurations, refreshing pre-commit hook versions to their latest, and pinning main dependencies. Type hints were also modernized to use the X | None syntax, and the CI workflow's target branch was updated from master to main.

File-Level Changes

Change Details Files
Upgraded Python to 3.13 across project configurations.
  • Updated Python version in CI workflow to "3.13".
  • Set default_language_version to python3.13 and pyupgrade args to --py313-plus.
  • Adjusted python_requires to >=3.13, updated Python classifiers, and set Black's target-version.
.github/workflows/pre-commit.yml
.pre-commit-config.yaml
setup.cfg
Updated pre-commit hooks and GitHub Actions.
  • Upgraded GitHub Actions versions (checkout, setup-python, pre-commit/action) in the CI workflow.
  • Updated pre-commit hook revisions (pre-commit-hooks, pyupgrade, black, isort, flake8, mypy).
.github/workflows/pre-commit.yml
.pre-commit-config.yaml
Pinned dependencies and modernized type hints.
  • Pinned versions for google-cloud-bigquery, mariadb, and python-dotenv.
  • Replaced Optional[X] with `X
None` for type hints.
Corrected CI workflow branch name.
  • Changed the pre-commit workflow's pull request trigger branch from master to main.
.github/workflows/pre-commit.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @petermcd - I've reviewed your changes - here's some feedback:

  • Consider if exclusively targeting Python 3.13 in setup.cfg is intended, as this removes support for versions 3.10-3.12.
  • Verify the black target-version in setup.cfg (currently py113), as it might be a typo for py313.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@petermcd
Copy link
Owner Author

petermcd commented May 9, 2025

CICD failure is a false positive by SNYK. SNYK is not able to install the package due to not having the prerequisites to install it (the Mariadb connector)

@petermcd petermcd merged commit 248344e into main May 9, 2025
2 of 3 checks passed
@petermcd petermcd deleted the update-requirements branch May 9, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants