Invoke is a Python task execution tool & library. Following the lead of most Unix CLI applications, it offers a traditional flag-based style of command-line parsing, deriving flag names and value types from task signatures (optionally, of course!). Like many of its predecessors, it offers advanced features as well – namespacing, task aliasing, before/after hooks, parallel execution and more.
Get more information at pyinvoke.org
# List all tasks invoke can find in the current direktory (from tasks.py)
invoke --list
# Only show commands that would be executed by called task(s) (dry run)
invoke -e -R img-pull
# run a task with debug output and echoing the commands
invoke -d -e img-pull
A multi-language package manager for pre-commit git hooks. You specify a list of hooks you want and pre-commit manages the installation and execution of any hook written in any language before every commit. Get more information at pre-commit.com Github repository at github.com/pre-commit/pre-commit. To use pre-commit hooks for your python project you need to create a configuration file first and then install all the hooks in the configuration file via pre-commit install
.
exclude: |
# NOT INSTALLABLE ADDONS
# END NOT INSTALLABLE ADDONS
(?x)
# Files and folders generated by bots, to avoid loops
/static/description/index\.html$|
# Library files can have extraneous formatting (even minimized)
/static/(src/)?lib/|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
python: python3
node: "14.14.0"
repos:
- repo: local
hooks:
- id: forbidden-files
name: forbidden files
entry: found forbidden files; remove them
language: fail
files: "\\.rej$"
- repo: https://github.com/oca/maintainer-tools
rev: b9c963d
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
args:
- --addons-dir
- odoo/custom/src/private
...
$ pre-commit install
pre-commit installed at .git/hooks/pre-commit
[michaelkarrer@~/odoo-new-setup/install_doodba/doodba_subproject_by_copier (master +)]$ git commit -m "First commit of doodba scaffolding test project"
[INFO] Initializing environment for https://github.com/oca/maintainer-tools.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://github.com/asottile/pyupgrade.
[INFO] Initializing environment for https://github.com/timothycrosley/isort.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier:@prettier/[email protected],[email protected].
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://gitlab.com/pycqa/flake8.
[INFO] Initializing environment for https://gitlab.com/pycqa/flake8:flake8-bugbear==20.1.4.
[INFO] Initializing environment for https://github.com/pycqa/pylint.
[INFO] Initializing environment for https://github.com/pycqa/pylint:isort==4.3.21,pylint-odoo==3.6.0.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-eslint.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-eslint:[email protected].
[INFO] Installing environment for https://github.com/oca/maintainer-tools.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
...