Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/pre commit #66

Merged
merged 2 commits into from
Nov 14, 2024
Merged

Feature/pre commit #66

merged 2 commits into from
Nov 14, 2024

Conversation

blooop
Copy link
Owner

@blooop blooop commented Nov 14, 2024

Summary by Sourcery

Integrate pre-commit hooks into the project to automate code quality checks and formatting. Replace Black with Ruff for formatting tasks and add a new GitHub Actions workflow to run pre-commit checks on pull requests. Fix a typo in the README.md file.

New Features:

  • Introduce pre-commit hooks to automate code quality checks and formatting.

Enhancements:

  • Replace Black with Ruff for code formatting tasks.

CI:

  • Add a new GitHub Actions workflow for running pre-commit checks on pull requests.

Documentation:

  • Fix a typo in the README.md file.

* add pre-commit for ruff

* add pre commit

* add precommit github workflow

* update pre-commit version

* add pre-commit task

* run pre-commit

* enable more pre-commit checks

* remove black

* update pixi.lock

* add typo

* add precommit to docker

* remove black settings

* extract ruff settings into ruff.toml

* extract ruff settings into ruff.toml

* update pre-commit hooks
* add more precommit

* fix spelling

* pre-commit all
Copy link

sourcery-ai bot commented Nov 14, 2024

Reviewer's Guide by Sourcery

This PR introduces pre-commit hooks and transitions from Black to Ruff for code formatting. The changes include setting up pre-commit configuration, updating the project's dependencies, and modifying various CI-related files. The formatting configuration has been moved from pyproject.toml to dedicated configuration files.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Replaced Black formatter with Ruff and added pre-commit hooks
  • Removed Black dependency and configuration
  • Added pre-commit as a test dependency
  • Created new pre-commit configuration file with various code quality hooks
  • Added new pre-commit GitHub workflow
  • Updated pixi tasks to use Ruff for formatting and added pre-commit commands
pyproject.toml
.pre-commit-config.yaml
.github/workflows/pre-commit.yaml
Migrated Ruff configuration to a dedicated file
  • Moved Ruff configuration from pyproject.toml to ruff.toml
  • Added additional lint configurations for tests, docs, and tools directories
  • Updated line length and ignore settings
pyproject.toml
ruff.toml
Updated development environment setup
  • Added pre-commit to pip language toolchain
  • Removed bash completion for pixi from Dockerfile
  • Cleaned up trailing whitespace and empty lines in various files
python_template.deps.yaml
.devcontainer/Dockerfile
README.md
CHANGELOG.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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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 @blooop - I've reviewed your changes - here's some feedback:

Overall Comments:

  • This PR contains several unrelated changes (bash completion removal, file endings, CI token changes). Please split these into separate PRs to keep this one focused on just the pre-commit hooks and formatter changes.
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.

@blooop blooop merged commit 2ebae3a into main Nov 14, 2024
12 checks passed
@blooop blooop deleted the feature/pre_commit branch November 14, 2024 18:10
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.

1 participant