-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (49 loc) · 2.16 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.PHONY: clean clean-test clean-pyc clean-build docs help
BASE_DIR := $(shell pwd)
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . \( -path ./env -o -path ./venv -o -path ./.env -o -path ./.venv \) -prune -o -name '*.egg-info' -exec rm -fr {} +
find . \( -path ./env -o -path ./venv -o -path ./.env -o -path ./.venv \) -prune -o -name '*.egg' -exec rm -f {} +
clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
find . -name '.ruff_cache' -exec rm -fr {} +
clean-test: ## remove test and coverage artifacts
rm -f .coverage
rm -f coverage.xml
rm -f coverage.lcov
rm -fr htmlcov/
rm -fr .pytest_cache
rm -fr .ruff_cache
find . -name '.mypy_cache' -exec rm -fr {} +
rm -rf ansible_collections/f5_ps_ansible/f5os/tests/output
lint: ruff pylint ## check style with ruff and pylint
pylint:
pylint ansible_collections/f5_ps_ansible/f5os/plugins/modules/*.py
pylint ansible_collections/f5_ps_ansible/f5os/plugins/module_utils/*.py
black:
black ansible_collections/f5_ps_ansible/f5os/plugins/modules/*.py
black ansible_collections/f5_ps_ansible/f5os/plugins/module_utils/*.py
ruff:
ruff format ansible_collections/f5_ps_ansible/f5os/plugins/modules/*.py
ruff format ansible_collections/f5_ps_ansible/f5os/plugins/module_utils/*.py
isort:
isort ansible_collections/f5_ps_ansible/f5os/plugins/modules/*.py
isort ansible_collections/f5_ps_ansible/f5os/plugins/module_utils/*.py
code-format: isort black ruff # more is MORE!
doc: docs ## alias for docs
docs:
python3 docs/f5os/ansible_module_autodoc.py
pytests:
cd ansible_collections/f5_ps_ansible/f5os && PYTHONPATH=$(BASE_DIR) pytest tests/unit/plugins/module_utils/test_utils.py
tests: test
ansible:
cp -f COPYING ansible_collections/f5_ps_ansible/f5os/COPYING
cp -f SUPPORT.md ansible_collections/f5_ps_ansible/f5os/SUPPORT.md
mkdir -p ./build
ansible-galaxy collection build ansible_collections/f5_ps_ansible/f5os --output-path build/