-
Notifications
You must be signed in to change notification settings - Fork 14
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
Various improvements to project template #75
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
dc6d52d
Sllightly faster build with parallel lint and build
sbidoul da98e61
In practice we don't need to pin acsoo anymore
sbidoul 72d74b7
Modernize pre-commit config
sbidoul 5382d75
Replace freeze with pip-deepfreeze
sbidoul fe0a0be
Cosmetics
sbidoul eab48bb
server_environment_files is not in dependencies anymore
sbidoul c712476
Slightly improve pip install calls
sbidoul 5facaf8
Cosmetics
sbidoul aac28a3
Add odoo-addons-enterprise to setup.py
sbidoul b5217d0
We can install editable in the same step
sbidoul 5daae57
project template: fix pip install command
sbidoul 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 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
160 changes: 77 additions & 83 deletions
160
acsoo/templates/project/+project.name+/.pre-commit-config.yaml
This file contains 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 |
---|---|---|
@@ -1,87 +1,81 @@ | ||
exclude: "^(?!odoo/)|.pot$|.po$" | ||
default_language_version: | ||
python: python3 | ||
node: "14.13.0" | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 19.10b0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/prettier/prettier | ||
rev: 2.0.2 | ||
hooks: | ||
- id: prettier | ||
additional_dependencies: | ||
- "@prettier/[email protected]" | ||
args: | ||
- --plugin=@prettier/plugin-xml | ||
files: "\\.(\ | ||
css|less|scss\ | ||
|graphql|gql\ | ||
|html\ | ||
|js|jsx\ | ||
|json\ | ||
|md|markdown|mdown|mkdn\ | ||
|mdx\ | ||
|ts|tsx\ | ||
|vue\ | ||
|yaml|yml\ | ||
|xml\ | ||
)$" | ||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v6.8.0 | ||
hooks: | ||
- id: eslint | ||
verbose: true | ||
args: | ||
- --color | ||
- --fix | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: flake8 | ||
name: flake8 except __init__.py | ||
args: [--exclude=__init__.py] | ||
additional_dependencies: [ | ||
"flake8-bugbear==19.8.0", | ||
"flake8-per-file-ignores==0.8.1", | ||
] | ||
- id: flake8 | ||
name: flake8 only __init__.py | ||
args: ["--extend-ignore=F401"] # ignore unused imports in __init__.py | ||
files: __init__.py | ||
- id: fix-encoding-pragma | ||
args: ["--remove"] | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
# exclude files where underlines are not distinguishable from merge conflicts | ||
exclude: /README\.rst$|^docs/.*\.rst$ | ||
- id: check-symlinks | ||
- id: check-xml | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
- repo: https://github.com/pre-commit/mirrors-pylint | ||
rev: v2.3.1 | ||
hooks: | ||
- id: pylint | ||
name: pylint odoo | ||
# check only specific Odoo addons | ||
files: odoo/addons/ | ||
types: ['file', 'python'] # to not check .csv and .conf files | ||
args: [] | ||
additional_dependencies: [pylint-odoo==3.1.0] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v1.26.2 | ||
hooks: | ||
- id: pyupgrade | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v4.3.21 | ||
hooks: | ||
- id: isort | ||
name: isort except __init__.py | ||
exclude: /__init__\.py$ | ||
- repo: https://github.com/myint/autoflake | ||
rev: v1.4 | ||
hooks: | ||
- id: autoflake | ||
args: ["-i", "--ignore-init-module-imports"] | ||
- repo: https://github.com/psf/black | ||
rev: 20.8b1 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.2.1 | ||
hooks: | ||
- id: prettier | ||
name: prettier + plugin-xml | ||
additional_dependencies: | ||
- "[email protected]" | ||
- "@prettier/[email protected]" | ||
args: | ||
- --plugin=@prettier/plugin-xml | ||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v7.14.0 | ||
hooks: | ||
- id: eslint | ||
verbose: true | ||
args: | ||
- --color | ||
- --fix | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: fix-encoding-pragma | ||
args: ["--remove"] | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
# exclude files where underlines are not distinguishable from merge conflicts | ||
exclude: /README\.rst$|^docs/.*\.rst$ | ||
- id: check-symlinks | ||
- id: check-xml | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
hooks: | ||
- id: flake8 | ||
name: flake8 except __init__.py | ||
exclude: /__init__\.py$ | ||
additional_dependencies: ["flake8-bugbear==19.8.0"] | ||
- id: flake8 | ||
name: flake8 only __init__.py | ||
args: ["--extend-ignore=F401"] # ignore unused imports in __init__.py | ||
files: /__init__\.py$ | ||
additional_dependencies: ["flake8-bugbear==19.8.0"] | ||
- repo: https://github.com/pre-commit/mirrors-pylint | ||
rev: v2.6.0 | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
files: odoo/addons/ | ||
args: [] | ||
additional_dependencies: [pylint-odoo==3.5.0] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.7.4 | ||
hooks: | ||
- id: pyupgrade | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.6.4 | ||
hooks: | ||
- id: isort | ||
name: isort except __init__.py | ||
exclude: /__init__\.py$ |
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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 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
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.
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.
👍