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

Open
2 of 23 tasks
webknjaz opened this issue Jan 16, 2023 · 2 comments
Open
2 of 23 tasks

Configure pre-commit tool for this repo #12

webknjaz opened this issue Jan 16, 2023 · 2 comments

Comments

@webknjaz
Copy link
Member

webknjaz commented Jan 16, 2023

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
@rvatok
Copy link
Collaborator

rvatok commented Feb 15, 2023

встановив pre-commit через homebrew

@webknjaz
Copy link
Member Author

I wouldn't bind it to the brew-managed Python, though. Maybe, try pipx to keep everything in the userspace.

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

No branches or pull requests

2 participants