-
Notifications
You must be signed in to change notification settings - Fork 9
Add pre-commit package for django app #867
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
Open
VadimKovalenkoSNF
wants to merge
28
commits into
main
Choose a base branch
from
pre-commit-package-for-django-app
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
5ea3e22
Show mit fields in v1 (partial imple)
VadimKovalenkoSNF 7b70958
Merge branch 'main' into OSDEV-2329-mit-living-wage-production-locations
VadimKovalenkoSNF 58c4f63
Minor refactoring
VadimKovalenkoSNF d4d4f88
Refactor __get_partner_fields method
VadimKovalenkoSNF 34eccae
Merge branch 'main' into OSDEV-2329-mit-living-wage-production-locations
VadimKovalenkoSNF 4fc446f
Fix unit tests
VadimKovalenkoSNF e3173b7
Minor fix
VadimKovalenkoSNF 026614a
Apply rich living wage output
VadimKovalenkoSNF c57aea1
Merge branch 'main' into OSDEV-2329-mit-living-wage-production-locations
VadimKovalenkoSNF d78d659
Merge branch 'main' into OSDEV-2329-mit-living-wage-production-locations
VadimKovalenkoSNF 7f19bf6
Add release notes
VadimKovalenkoSNF 40819ff
Merge branch 'main' into OSDEV-2329-mit-living-wage-production-locations
VadimKovalenkoSNF 3b58dd5
Merge branch 'main' into OSDEV-2329-mit-living-wage-production-locations
VadimKovalenkoSNF e8d9181
Install pre-commit and other linters
VadimKovalenkoSNF 11686a3
Upd RELEASE notes
VadimKovalenkoSNF 4859340
Add settings.json example to the README.md
VadimKovalenkoSNF 41d9b3c
Add .vscode/example-settings.json
VadimKovalenkoSNF 6dcf345
Merge branch 'main' into pre-commit-package-for-django-app
VadimKovalenkoSNF 3ca8000
Merge branch 'main' into pre-commit-package-for-django-app
VadimKovalenkoSNF 8fef042
Add pre-requisites to Readme file
VadimKovalenkoSNF 9f2f068
More instructinos in Readme file
VadimKovalenkoSNF 5b993fc
Update: [email protected], [email protected] and [email protected]
VadimKovalenkoSNF a8d826e
Merge branch 'main' into pre-commit-package-for-django-app
VadimKovalenkoSNF 382007f
Update table of contents
VadimKovalenkoSNF a27fab7
Merge branch 'main' into pre-commit-package-for-django-app
VadimKovalenkoSNF a55d0a4
Merge branch 'main' into pre-commit-package-for-django-app
VadimKovalenkoSNF e0df7fb
Update README anchors to fix TOC fragments
VadimKovalenkoSNF 4ba491a
Updated the README to reference the correct example settings file
VadimKovalenkoSNF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,7 +49,8 @@ src/django/*.xlsx | |
|
|
||
|
|
||
| # VSCode | ||
| .vscode | ||
| .vscode/* | ||
| !.vscode/example-settings.json | ||
|
|
||
| # PyCharm | ||
| .idea/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| repos: | ||
| - repo: local | ||
| hooks: | ||
| - id: ruff-docker | ||
| name: ruff (django via docker) | ||
| language: system | ||
| entry: docker | ||
| args: | ||
| - compose | ||
| - run | ||
| - --rm | ||
| - --no-deps | ||
| - -v | ||
| - .:/workspace | ||
| - -w | ||
| - /workspace | ||
| - --entrypoint | ||
| - ruff | ||
| - django | ||
| - check | ||
| - --fix | ||
| - --exit-non-zero-on-fix | ||
| - --config | ||
| - /workspace/pyproject.toml | ||
| files: ^src/django/.*\.py$ | ||
|
|
||
| - id: isort-docker | ||
| name: isort (django via docker) | ||
| language: system | ||
| entry: docker | ||
| args: | ||
| - compose | ||
| - run | ||
| - --rm | ||
| - --no-deps | ||
| - -v | ||
| - .:/workspace | ||
| - -w | ||
| - /workspace | ||
| - --entrypoint | ||
| - isort | ||
| - django | ||
| - --settings-path | ||
| - /workspace/pyproject.toml | ||
| files: ^src/django/.*\.py$ | ||
|
|
||
| - id: black-docker | ||
| name: black (django via docker) | ||
| language: system | ||
| entry: docker | ||
| args: | ||
| - compose | ||
| - run | ||
| - --rm | ||
| - --no-deps | ||
| - -v | ||
| - .:/workspace | ||
| - -w | ||
| - /workspace | ||
| - --entrypoint | ||
| - black | ||
| - django | ||
| - --config | ||
| - /workspace/pyproject.toml | ||
| files: ^src/django/.*\.py$ | ||
|
|
||
| - id: flake8-docker | ||
| name: flake8 (django via docker) | ||
| language: system | ||
| entry: docker | ||
| args: | ||
| - compose | ||
| - run | ||
| - --rm | ||
| - --no-deps | ||
| - -v | ||
| - .:/workspace | ||
| - -w | ||
| - /workspace | ||
| - --entrypoint | ||
| - flake8 | ||
| - django | ||
| - --config | ||
| - /workspace/src/django/.flake8 | ||
| files: ^src/django/.*\.py$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python", | ||
| "ruff.enable": true, | ||
| "ruff.importStrategy": "fromEnvironment", | ||
| "ruff.path": [ | ||
| "${workspaceFolder}/.venv/bin/ruff" | ||
| ], | ||
| "black-formatter.path": [ | ||
| "${workspaceFolder}/.venv/bin/black" | ||
| ], | ||
| "python.formatting.blackPath": "${workspaceFolder}/.venv/bin/black", | ||
| "[python]": { | ||
| "editor.formatOnSave": true, | ||
| "editor.defaultFormatter": "ms-python.black-formatter", | ||
| "editor.codeActionsOnSave": { | ||
| "source.fixAll": "always", | ||
| "source.fixAll.ruff": "always" | ||
| } | ||
| }, | ||
| "python.formatting.provider": "black", | ||
| "python.formatting.blackArgs": [ | ||
| "--line-length=88", | ||
| "--config", | ||
| "pyproject.toml" | ||
| ], | ||
| "python.linting.ruffEnabled": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| [tool.black] | ||
| line-length = 88 | ||
| target-version = ["py38"] | ||
| extend-exclude = "api/migrations/|settings\\.py|manage\\.py" | ||
|
|
||
| [tool.isort] | ||
| profile = "black" | ||
| line_length = 88 | ||
| src_paths = ["src/django"] | ||
| skip = ["api/migrations"] | ||
|
|
||
| [tool.ruff] | ||
| target-version = "py38" | ||
| line-length = 88 | ||
| src = ["src/django"] | ||
| extend-exclude = ["settings.py", "manage.py", "api/migrations/*"] | ||
|
|
||
| [tool.ruff.lint] | ||
| extend-ignore = ["E203"] | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [flake8] | ||
| # Keep local linting aligned with the CI invocation from scripts/run_be_code_quality | ||
| # and .github/workflows/code_quality.yml. | ||
| exclude = settings.py, manage.py, *.pyc, api/migrations/* | ||
| max-line-length = 88 | ||
| extend-ignore = E203, W503 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.