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

Introduce pre-commit hooks #71

Merged
merged 9 commits into from
Jul 27, 2023
Merged

Conversation

jlenain
Copy link
Collaborator

@jlenain jlenain commented Jun 28, 2023

This PR introduces pre-commit hooks to our repository.

Following discussions with @sona-patel and #49 , in such a way, any new commit to the code will automatically:

  • be linted using black and flake8, including for commits on Jupyter notebooks,
  • see the different imports sorted using isort, following @kosack 's recommendations.

provided that developers enable pre-commits with (see https://pre-commit.com/#quick-start):

pre-commit install

TODO DONE

@jlenain jlenain marked this pull request as draft June 28, 2023 08:35
@jlenain
Copy link
Collaborator Author

jlenain commented Jun 28, 2023

@sona-patel , with such hooks, it is possible to lint the whole repository (see https://pre-commit.com/#4-optional-run-against-all-the-files) with:

pre-commit run --all-files

@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Patch coverage has no change and project coverage change: +2.69% 🎉

Comparison is base (cdded69) 0.38% compared to head (e830503) 3.08%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master     #71      +/-   ##
=========================================
+ Coverage    0.38%   3.08%   +2.69%     
=========================================
  Files          30      36       +6     
  Lines        3404    3571     +167     
=========================================
+ Hits           13     110      +97     
- Misses       3391    3461      +70     

see 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jlenain jlenain added the enhancement New feature or request label Jun 28, 2023
@jlenain jlenain assigned jlenain and unassigned jlenain Jun 28, 2023
@jlenain jlenain marked this pull request as ready for review July 12, 2023 14:27
@jlenain jlenain merged commit 3d72646 into cta-observatory:master Jul 27, 2023
12 checks passed
@jlenain jlenain deleted the pre-commit branch July 27, 2023 09:30
@jlenain jlenain mentioned this pull request Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant