-
-
Notifications
You must be signed in to change notification settings - Fork 17
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 for python linter and formatter #259
Add pre commit for python linter and formatter #259
Conversation
…d .gitignore lines and rename compose for staging
* Update app/config/settings.py Co-authored-by: Kevin Park <kevinpmwpark@google.com> Co-authored-by: Ava Li <62368440+Aveline-art@users.noreply.github.com>
Fix compose stage
Lint error is: the formatter removed some whitespace and it looks like changing the file pulled it in for validation by super-linter. It was originally checked in as |
added README.md under app on how to setup linter/formatter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Enzyme3 . Great work on this as always.
A few more notes:
- The
readme
should be placed inside of our installation instructions which would help ensure our documentation is all in the same place rather than in multiple places at once. - For the lint error, node:18 is fine as far as I can tell.
- If these changes are not critical for setting up our staging env, let's merge this into our
dev-branch-1
branch to avoid creating too many merge conflicts. Also it looks like your working branch has not been updated in a while, just fyi :)
…nstructions to the installation README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Enzyme3 . Thank you for waiting for so long. I had to wait for the issue to be approved before merging. Everything looks perfect! Just a few small changes:
- Let's move the .env file into the
dev/
directory to keep the env with the related dockerfiles. Likewise, we can also rename the file to linter.env or some such. Make sure that linter.dockerfile still works - Since we have linted those files, let's take out these lines from linter.yml
VALIDATE_PYTHON: false
VALIDATE_PYTHON_BLACK: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_PYTHON_PYLINT: false
Once that is done, feel free to merge it at your leisure.
Thanks @Aveline-art , have renamed the .env file and placed it in Perhaps another TODO can be raised to enable it, and ensure that the local linting rules match with the github one |
Fixes #258
Changes
app/.pre-commit-config.yaml
which:mkdocs
directoryLots of files were modified due to the formatting/linting but those were purely cosmetic. Should focus more on:
app/.pre-commit-config.yaml
app/setup.cfg