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 #64

Merged
merged 15 commits into from
Nov 14, 2024
Merged

Feature/pre commit #64

merged 15 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 development workflow to ensure code quality and consistency. Update the project configuration to include pre-commit as a dependency and add a corresponding task. Implement a new CI workflow to automatically run pre-commit checks on pull requests.

New Features:

  • Introduce pre-commit hooks configuration to automate code quality checks before commits.

Enhancements:

  • Add pre-commit as a development dependency in the pyproject.toml file.
  • Include a new task for pre-commit in the pixi tasks configuration.

CI:

  • Add a new GitHub Actions workflow to run pre-commit checks on pull requests.

Copy link

sourcery-ai bot commented Nov 14, 2024

Reviewer's Guide by Sourcery

This PR implements pre-commit hooks for automated code quality checks. The implementation adds pre-commit configuration, integrates it with the build system, and sets up CI workflow for pre-commit checks. The changes also include some cleanup of trailing whitespace and newlines across various files.

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

File-Level Changes

Change Details Files
Added pre-commit configuration and hooks
  • Created new pre-commit configuration file with standard hooks and ruff integration
  • Configured hooks for file checks, code formatting, and linting
  • Added pre-commit as a test dependency in pyproject.toml
.pre-commit-config.yaml
pyproject.toml
Set up CI workflow for pre-commit checks
  • Added new GitHub Actions workflow for running pre-commit checks on pull requests
.github/workflows/pre-commit.yaml
Added pre-commit task to build system
  • Added pre-commit task to pixi tasks configuration
pyproject.toml
Cleaned up trailing whitespace and empty lines
  • Removed trailing empty lines and whitespace from various files
README.md
CHANGELOG.md
.devcontainer/Dockerfile
.github/workflows/ci.yml
.github/workflows/publish.yml
docs/requirements.txt
scripts/setup_host.sh

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:

  • Several important configurations are being removed without explanation (Codecov token, pixi completion, etc). Please clarify if these removals are intentional and why they're needed as part of adding pre-commit hooks.
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 19fb1a8 into main Nov 14, 2024
7 checks passed
@blooop blooop deleted the feature/pre-commit branch November 14, 2024 10:46
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