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

Adds pre-commit #64

Merged
merged 5 commits into from
Oct 26, 2023
Merged

Adds pre-commit #64

merged 5 commits into from
Oct 26, 2023

Conversation

BradyPlanden
Copy link
Member

This PR adds the following (and closes #58):

  • Pre-commit to the repository
  • Pre-commit CI job to the test_on_push workflow
  • Updates CONTRIBUTING.MD for pre-commit workflow
  • Runs the pre-commit hooks on the repo

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #64 (87a619e) into develop (7fb11a4) will increase coverage by 0.49%.
Report is 8 commits behind head on develop.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop      #64      +/-   ##
===========================================
+ Coverage    86.88%   87.37%   +0.49%     
===========================================
  Files           21       21              
  Lines          488      507      +19     
===========================================
+ Hits           424      443      +19     
  Misses          64       64              
Files Coverage Δ
tests/unit/test_parameterisations.py 100.00% <100.00%> (ø)

Copy link
Contributor

@martinjrobins martinjrobins left a comment

Choose a reason for hiding this comment

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

looks great, thanks @BradyPlanden. Looking forward to using ruff (at least in the background)

- name: Check formatting with pre-commit
run: |
python -m pip install pre-commit
pre-commit run ruff
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, ruff is the shiny new toy :)

additional_dependencies: [ruff==0.0.284]
args: ["--fix","--ignore=E501,E402"]

# - repo: https://github.com/adamchainz/blacken-docs
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this or can be deleted?

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, I thought of leaving it for when we have the docs up and sorted, but we can just add it then.

@BradyPlanden BradyPlanden merged commit 4655f33 into develop Oct 26, 2023
@BradyPlanden BradyPlanden deleted the 58-pre-commit branch October 26, 2023 16: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.

Add pre-commit with Ruff hook
2 participants