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

Improve pre-commit hooks and use of ruff #248

Merged

Conversation

fpgmaas
Copy link

@fpgmaas fpgmaas commented Jul 15, 2024

Proposed changes

Currently, there are some issues with the use of pre-commit hooks and ruff:

  • We define the version of ruff three times, and each time a different version:
    • >=0.5 in pyproject.toml
    • 0.0.291 in .pre-commit-config.yaml
    • 0.5.1 in ci/lint.yaml
  • ruff format is not part of the pre-commit hooks. The codebase currently contains unformatted code.
  • pre-commit is missing as a development dependency
  • We run the unit tests in the pre-commit hooks, which seems a bit superfluous.

This PR proposes to;

  • Choose one version of ruff, in the pre-commit hooks.
  • Add ruff format as part of the pre-commit hooks.
  • Remove pytest from the pre-commit hooks.

pyproject.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@SemyonSinchenko SemyonSinchenko left a comment

Choose a reason for hiding this comment

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

I left some comments about Ruff.

update makefile

add make command for ruff
Copy link
Collaborator

@SemyonSinchenko SemyonSinchenko left a comment

Choose a reason for hiding this comment

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

LGTM overall, we can merge it after resolving conflicts. @fpgmaas fyi

@fpgmaas fpgmaas marked this pull request as draft July 15, 2024 11:42
@fpgmaas fpgmaas marked this pull request as ready for review July 15, 2024 11:53
@fpgmaas
Copy link
Author

fpgmaas commented Jul 15, 2024

LGTM overall, we can merge it after resolving conflicts. @fpgmaas fyi

@SemyonSinchenko Thanks! Resolved conflicts.

Copy link
Collaborator

@SemyonSinchenko SemyonSinchenko left a comment

Choose a reason for hiding this comment

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

I left one more comment.

.github/workflows/lint.yaml Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@SemyonSinchenko SemyonSinchenko left a comment

Choose a reason for hiding this comment

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

LGTM

@SemyonSinchenko
Copy link
Collaborator

@fpgmaas Thanks for the contribution!

@SemyonSinchenko SemyonSinchenko merged commit 0d47136 into mrpowers-io:planning-1.0-release Jul 15, 2024
5 checks passed
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