Skip to content

Conversation

@cesarcoatl
Copy link
Member

@cesarcoatl cesarcoatl commented Jun 19, 2025

this will allow us to re-enable pre-commit.ci

use blacksmith runner

Summary by Sourcery

Enable pre-commit.ci and update linting and CI configurations

Enhancements:

  • Switch Flake8 hook to coatl-dev/flake8@5.0.4 and rename stub hook to flake8-incendium-stubs
  • Re-enable pre-commit.ci with autoupdate commit message and skip configuration for pylint
  • Remove standalone pre-commit-autoupdate workflow and consolidate hook management
  • Move and configure the local pylint hook within .pre-commit-config.yaml

CI:

  • Remove the separate pre-commit job and adjust pylint CI job dependency
  • Update GitHub Actions runners for jython and pip-compile-upgrade jobs to blacksmith-2vcpu-ubuntu-2404

Documentation:

  • Add pre-commit.ci status badge to README.md

this will allow us to re-enable pre-commit.ci

use blacksmith runner
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 19, 2025

Reviewer's Guide

This PR refactors the pre-commit setup to re-enable pre-commit.ci, swaps the Flake8 hook to the coatl-dev repository at v5.0.4, repositions and renames the pylint and stubs hooks, prunes obsolete workflow files, updates CI runners to the blacksmith environment, and surfaces a pre-commit.ci badge in the README.

Class diagram for updated pre-commit hook configuration

classDiagram
  class PreCommitConfig {
    +ci: dict
    +repos: list
  }
  class Flake8Hook {
    +repo: coatl-dev/flake8
    +rev: 5.0.4
    +hooks: flake8
  }
  class PylintHook {
    +repo: local
    +hooks: pylint
    +entry: pylint
    +language: system
    +files: ^incendium/src/
    +types: [python]
    +args: [--rcfile=incendium/.pylintrc]
  }
  PreCommitConfig "1" o-- "*" Flake8Hook
  PreCommitConfig "1" o-- "*" PylintHook
Loading

File-Level Changes

Change Details Files
Revamp pre-commit configuration
  • Introduced a 'ci' section with autoupdate message and skipped pylint
  • Switched Flake8 source to coatl-dev/flake8@5.0.4
  • Renamed stubs hook from flake8-stubs to flake8-incendium-stubs
  • Re-added pylint as a local hook at the bottom
.pre-commit-config.yaml
Adjust GitHub Actions workflows for blacksmith runner
  • Removed standalone pre-commit job and its skip-hooks setting
  • Dropped 'needs: pre-commit' dependency in pylint job
  • Changed runs-on to blacksmith-2vcpu-ubuntu-2404 for jython and pip-compile-upgrade
.github/workflows/ci.yml
.github/workflows/jython.yml
.github/workflows/pip-compile-upgrade.yml
Remove obsolete pre-commit-autoupdate workflow
  • Deleted the pre-commit-autoupdate.yml file
.github/workflows/pre-commit-autoupdate.yml
Add pre-commit.ci badge to documentation
  • Inserted a pre-commit.ci status badge at the top of README.md
README.md

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
Contributor

@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 @cesarcoatl - I've reviewed your changes and they look great!


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.

@cesarcoatl cesarcoatl merged commit 4b85a7a into main Jun 19, 2025
8 checks passed
@cesarcoatl cesarcoatl deleted the build/deps/coatl-dev-flake8 branch June 19, 2025 18:05
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