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/update from template #451

Merged
merged 19 commits into from
Nov 16, 2024
Merged

Feature/update from template #451

merged 19 commits into from
Nov 16, 2024

Conversation

blooop
Copy link
Collaborator

@blooop blooop commented Nov 16, 2024

Summary by Sourcery

Integrate pre-commit hooks into the project to automate code quality checks and replace Black with Ruff for code formatting. Update the CI configuration to include a pre-commit workflow that runs on pull requests.

New Features:

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

Enhancements:

  • Update the pyproject.toml to replace Black with Ruff for code formatting.
  • Add pre-commit tasks to the Pixi tool configuration for running and updating pre-commit hooks.

CI:

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

* 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
Contributor

sourcery-ai bot commented Nov 16, 2024

Reviewer's Guide by Sourcery

This PR updates the project's development tooling by replacing Black with Ruff for code formatting, adding pre-commit hooks for automated code quality checks, and making various code cleanup changes. The changes primarily focus on modernizing the development workflow and standardizing code formatting.

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 configuration
  • Removed Black configuration and dependencies
  • Added Ruff configuration with specific lint rules and ignores
  • Added pre-commit hooks configuration with various code quality checks
  • Updated format commands to use Ruff instead of Black
  • Added new pre-commit GitHub workflow
pyproject.toml
.pre-commit-config.yaml
ruff.toml
.github/workflows/pre-commit.yaml
Updated dependency configurations and build tools
  • Added pre-commit as a test dependency
  • Added pre-commit to pip language toolchain
  • Added new pixi tasks for pre-commit operations
  • Removed sphinx-autoapi dependency
pyproject.toml
bencher.deps.yaml
docs/requirements.txt
Code cleanup and formatting improvements
  • Removed unnecessary blank lines
  • Fixed match statement syntax
  • Updated git configuration for global rebase settings
bencher/results/bench_result_base.py
test/test_composable_container_base.py
bencher/example/example_dataframe.py
bencher/example/example_image1.py
test/test_bch_p.py
test/test_sweep_base.py
scripts/update_from_template.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
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 @blooop - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The git config change in update_from_template.sh from local to global (--global) could affect other repositories on the user's system. Consider keeping this as a local config.
  • When migrating from black to ruff, ensure all formatting configurations are properly transferred. Consider reviewing the removed black config settings to confirm they're all represented in the new ruff.toml.
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.

Copy link

codecov bot commented Nov 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.48%. Comparing base (21a10f4) to head (8299f25).
Report is 20 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #451   +/-   ##
=======================================
  Coverage   90.48%   90.48%           
=======================================
  Files          61       61           
  Lines        3384     3384           
=======================================
  Hits         3062     3062           
  Misses        322      322           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blooop blooop merged commit 3f0928f into main Nov 16, 2024
7 checks passed
@blooop blooop deleted the feature/update_from_template branch November 16, 2024 13:39
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