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

Configure pre-commit tool for this repo #12

Closed
22 of 23 tasks
webknjaz opened this issue Aug 3, 2022 · 2 comments · Fixed by #15
Closed
22 of 23 tasks

Configure pre-commit tool for this repo #12

webknjaz opened this issue Aug 3, 2022 · 2 comments · Fixed by #15

Comments

@webknjaz
Copy link
Member

webknjaz commented Aug 3, 2022

Rules:

  1. DO NOT commit to the main branch directly. ever.
  2. ABSOLUTELY NO force pushes allowed for public non-feature branches.
  3. For every feature, create a new branch matching name features/<issue-number>-<feature-name>.
  4. Submit every feature by creating Pull Request @ github, after that wait for review, fix issues, repeat until approved. If needed rebase the branch on top of main and re-push force it.
  • I HAVE READ AND UNDERSTOOD THE RULES ABOVE

  • Install pre-commit locally as follows:
python3.11 -m pip install pre-commit --user
python3.11 -m pre_commit install
  • Create branch called features/12-pre-commit-integration
  • Add .pre-commit-config.yaml config, containing the following hooks:
    • no-commit-to-branch
    • add-trailing-comma
    • remove-tabs
    • trailing-whitespace
    • check-merge-conflict
    • double-quote-string-fixer
    • requirements-txt-fixer
    • check-yaml
    • check-docstring-first
    • end-of-file-fixer
    • name-tests-test
    • check-ast
    • debug-statements
    • flake8
    • pydocstyle
    • pylint using "local" mode
    • mypy
  • Check repo using command pre-commit run --all-files, fix all issues and commit fixes as well
  • Create PR with this branch
@Martolivna
Copy link
Collaborator

Martolivna commented Dec 23, 2022

Should I write some commit description when adding a new configuration file?

@webknjaz
Copy link
Member Author

A full commit message with title and description is almost always a good idea. Give it a try. If it turns out to not be compliant w/ #6 and #7, that can always be corrected during the PR review.

Martolivna added a commit that referenced this issue Dec 23, 2022
#12

Create a configuration file .pre-commit-config.yaml for the pre-commit
framework and put some hooks in there.
@Martolivna Martolivna linked a pull request Dec 26, 2022 that will close this issue
Martolivna added a commit that referenced this issue Apr 9, 2023
Create a configuration file .pre-commit-config.yaml for the pre-commit
framework.

Resolves #12
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 a pull request may close this issue.

2 participants