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

Augment .pre-commit #257

Merged
merged 3 commits into from
Jan 27, 2021
Merged

Augment .pre-commit #257

merged 3 commits into from
Jan 27, 2021

Conversation

berland
Copy link
Collaborator

@berland berland commented Jan 26, 2021

No description provided.

@berland berland requested a review from asnyv January 26, 2021 10:02
@berland berland requested a review from tklov11 January 26, 2021 15:14
@codecov-io
Copy link

Codecov Report

Merging #257 (093b800) into master (54ef607) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #257   +/-   ##
=======================================
  Coverage   91.36%   91.36%           
=======================================
  Files          22       22           
  Lines        2779     2779           
=======================================
  Hits         2539     2539           
  Misses        240      240           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54ef607...093b800. Read the comment docs.

@@ -2,6 +2,8 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: no-commit-to-branch
Copy link
Collaborator

@tklov11 tklov11 Jan 27, 2021

Choose a reason for hiding this comment

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

If I understood correctly, the purpose of pre-commit is to give the contributor a chance to check the code in one simple command before comitting it from the working directory to his/her local repo. From this pre-commit yaml file I only see reference to flake8 and rstcheck. Should black --check . and pytest tests/ also be included? These are the four tests I usually run in separate commands before I commit anything to my local repo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pre-commit (after a local user has run pre-commit install in his/hers local copy) will add a hook to git commit so that these commands are checked every time a git commit is attempted.

Black is already included, but pytest should be excluded as it generally takes too long time. pre-commit should finish in a couple of seconds.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok

Copy link
Collaborator

@tklov11 tklov11 left a comment

Choose a reason for hiding this comment

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

LGTM

@berland berland merged commit 0eac752 into equinor:master Jan 27, 2021
@berland berland deleted the update-pre-commit branch August 10, 2021 10:15
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.

3 participants