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

Add pre-commit hooks for ruff and lint code #10

Open
6 of 8 tasks
slackline opened this issue Jun 18, 2024 · 0 comments
Open
6 of 8 tasks

Add pre-commit hooks for ruff and lint code #10

slackline opened this issue Jun 18, 2024 · 0 comments
Assignees
Labels
linting Linting the code base

Comments

@slackline
Copy link
Collaborator

slackline commented Jun 18, 2024

The recently added switch to pyproject.toml (see #7 ) included configuration options for the ruff.

The easiest way to add this to the development workflow is via pre-commit and pre-commit.ci which runs the checks as part of the Continuous Integration.

Tasks to complete...

  • Tidy up the dev section of project.optional-dependencies in pyproject.toml. Currently there is not test-suite and there are some extraneous packages in there, at a bare minimum dev should retain ruff and
  • Add .pre-commit-config.yaml with appropriate configuration options for ruff
  • Apply linting to the code base and resolve all issues. #11
  • Ensure there is the appropriate configuration section for pre-commit.ci in the .pre-commit-config.yaml
  • Allow permission for pre-commit.ci to run on this repository.

Might also be worth linting the code with pylint as ruff doesn't always pick up all the "code smells"

  • Add pylint to dev section of project.optional-dependencies.
  • Add a .pylintrc to configure how pylint runs on the repository.
  • Add a local hook to .pre-commit-config.yaml and ensure this is excluded from pre-commit.ci (typically required because the environment that runs on pre-commit.ci won't have all of the required dependencies to run the linting).
@slackline slackline added the linting Linting the code base label Jun 18, 2024
@slackline slackline self-assigned this Jun 18, 2024
slackline added a commit that referenced this issue Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linting Linting the code base
Projects
None yet
Development

No branches or pull requests

1 participant