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

Formatting #51

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

AlecThomson
Copy link
Contributor

Adds a pre-commit hook for formatting using ruff, and runs the formatter. The changes here are pretty much all whitespace.

The linter had to be disabled due to the large number of errors! For reference, the current list of reported errors can be found here. To run the linter simply run:

ruff check . --fix

in the root directory of RMextract.

Once these issues are resolved we should re-enable the linter in the pre-commit hook .i.e.

    # Run the linter.
    - id: ruff
      args: [ --fix ]

There is also a free CI service which can monitor the repo for future commits and PRs. See https://pre-commit.ci/.

Once solved, this closes #50

@gmloose
Copy link
Collaborator

gmloose commented May 6, 2024

Nice! 🤩
One thing I was wondering. Any reason to not use the pre-commit-ci GitHub action? Now the project depends on another 3rd party tool, which is also granted push/commit rights.

@AlecThomson
Copy link
Contributor Author

AlecThomson commented May 6, 2024

The pre-commit CI bot adds a few extra features (which may or may not be desirable). Notably it'll patch a mis-formatted PR automatically (coming in as a virtual collaborator), and also keep itself and the dependencies up-to-date with automated self-PRs. EDIT: See description here: https://pre-commit.ci/

The CI-lite action is indeed the 'liter' version, and acts as a more typical GH action.

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.

Code style
2 participants