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 tool #156

Merged
merged 3 commits into from
Nov 7, 2022

Conversation

KAUTH
Copy link
Collaborator

@KAUTH KAUTH commented Oct 24, 2022

In this PR, we add the pre-commit tool to
improve the Software Development Lifecycle
of the project by automatically running checks
(mainly linting & formatting) before one commits their changes.

  • Specifically:
  • flake8, isort and black were adjusted in tox to run as a pre-commit hooks
  • Additionally, added hooks were:
  • the check-added-large-files - prevents giant files from being committed
  • end-of-file-fixer - ensures that a file is either empty or ends with one newline
  • trailing-whitespace - trims trailing whitespace
  • check-yaml - checks yaml files for parseable syntax
  • we added a local hook with pre-commit that calls tox to check if make requirements is up-to-date
  • The Pipfile dev-packages were updated to include pre-commit.

  • We updated the README.md with how to install and enable pre-commit.

  • We ran make requirements.

  • Fix tox requirements check failing.

In this commit, we add the pre-commit tool to
improve the Software Development Lifecycle
of the project by automatically running checks
(mainly linting & formatting) before one commits their
changes.

- Specifically:
* flake8, isort and black were adjusted in tox to run as a pre-commit hooks
* Additionally, added hooks were:
 - the check-added-large-files - prevents giant files from being committed
 - end-of-file-fixer - ensures that a file is either empty or ends with one newline
 - trailing-whitespace - trims trailing whitespace
 - check-yaml - checks yaml files for parseable syntax
* we added a local hook with pre-commit that calls tox to check if `make requirements`
is up-to-date

- The Pipfile dev-packages were updated to include pre-commit.

- We updated the README.md with how to install and enable pre-commit.

- We ran `make requirements`.

- Fix tox requirements check failing.

Signed-off-by: Konstantinos Papadopoulos <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Base: 92.30% // Head: 92.30% // No change to project coverage 👍

Coverage data is based on head (480b66a) compared to base (1e59f4a).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #156   +/-   ##
=======================================
  Coverage   92.30%   92.30%           
=======================================
  Files          16       16           
  Lines         585      585           
=======================================
  Hits          540      540           
  Misses         45       45           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MVrachev
Copy link
Member

MVrachev commented Nov 2, 2022

@KAUTH could you apply the changes we discussed in pr repository-service-tuf/repository-service-tuf-cli#110 here as well?

- Edited description in README.rst

- Added precommit command in
the Makefile

Signed-off-by: Konstantinos Papadopoulos <[email protected]>
Copy link
Member

@MVrachev MVrachev left a comment

Choose a reason for hiding this comment

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

I had a look at the changes and they seem the same as in the repository-service-tuf/repository-service-tuf-cli#110 pr.

@KAUTH I will ask you the same as I mentioned in my comment
repository-service-tuf/repository-service-tuf-worker#114 (review) or create additional two issues in this repo.

@KAUTH
Copy link
Collaborator Author

KAUTH commented Nov 6, 2022

I had a look at the changes and they seem the same as in the repository-service-tuf/repository-service-tuf-cli#110 pr.

@KAUTH I will ask you the same as I mentioned in my comment
repository-service-tuf/repository-service-tuf-worker#114 (review) or create additional two issues in this repo.

Done! (#173, #174) 😊

Copy link
Member

@MVrachev MVrachev left a comment

Choose a reason for hiding this comment

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

Awesome, thanks @KAUTH!

@MVrachev MVrachev merged commit 7be4f1a into repository-service-tuf:main Nov 7, 2022
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