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 and migrate to ruff #232

Merged
merged 4 commits into from
Mar 31, 2023

Conversation

Saransh-cpp
Copy link
Member

  • add pre-commit
  • use ruff
  • remove flake8
  • update docs
  • add .git-blame-ignore-revs to preserve git blame messed up by the pre-commit commit

This should be safe to merge before the branches are merged.

Additionally, pre-commit.ci should be activated for liionpack (it isn't activated right now).

@Saransh-cpp Saransh-cpp linked an issue Mar 7, 2023 that may be closed by this pull request
@Saransh-cpp
Copy link
Member Author

Weirdly, the workflows fail on PyBaMM develop too.

@TomTranter
Copy link
Collaborator

Hey @Saransh-cpp thanks for this. I've just merged another PR into develop which should fix these failing tests

@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Merging #232 (7cd7902) into develop (4e4c16e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #232      +/-   ##
===========================================
- Coverage    94.78%   94.77%   -0.01%     
===========================================
  Files           11       11              
  Lines         1188     1187       -1     
===========================================
- Hits          1126     1125       -1     
  Misses          62       62              

@Saransh-cpp
Copy link
Member Author

@TomTranter can you enable https://pre-commit.ci for liionpack? pre-commit.ci will make formatting a breeze for PRs.

@TomTranter
Copy link
Collaborator

@TomTranter can you enable https://pre-commit.ci for liionpack? pre-commit.ci will make formatting a breeze for PRs.

What should I do? The docs say "nothing is needed beyond the .pre-commit-config.yaml file you already have!"

@TomTranter TomTranter merged commit 0eae90e into pybamm-team:develop Mar 31, 2023
@Saransh-cpp Saransh-cpp deleted the add-pre-commit branch March 31, 2023 16:55
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.

Migrate to ruff and start using pre-commit
2 participants