-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
151 lines (130 loc) · 3.73 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
check:
@pipenv run \
python check_version.py \
--file=tests/test_files/components.yaml \
--dry-run \
check \
--verbose
update:
@pipenv run \
python check_version.py \
--file=tests/test_files/components.yaml \
--dry-run \
update \
--verbose
self-check:
@pipenv run \
python check_version.py \
check \
--verbose
self-update:
@pipenv run \
python check_version.py \
update \
--verbose \
--test-command="make test-pipenv-install"
self-import-req:
@pipenv run \
python check_version.py \
--file=components.yaml \
import-req \
--requirements-file=requirements.txt \
--verbose
clear-cache:
@pipenv run python check_version.py check --clear-cache
help:
pipenv run python check_version.py --help
sbe:
pipenv run behave --tags=-skip --tags=-wip --stop --no-skipped tests/features
sbe-wip:
pipenv run behave --tags=wip --stop --no-skipped --no-summary --no-logcapture --no-capture-stderr --no-logcapture --logging-level=DEBUG tests/features
pytest:
pipenv run python -m pytest --disable-warnings -vv -x --durations=5 -m "not slow" --exitfirst --showlocals --tb=long
pytest-all:
pipenv run python -m pytest --disable-warnings -vv -x
pytest-wip:
pipenv run python -m pytest --disable-warnings -vv -m wip
pytest-help:
pipenv run python -m pytest --help
pytest-config:
pipenv run python -m pytest --disable-warnings -vv -m "not slow" --exitfirst --showlocals --tb=long tests/pytest/test_config_yaml.py
pytest-component:
pipenv run python -m pytest --disable-warnings -vv -m "not slow" --exitfirst tests/pytest/test_components.py
black:
pipenv run black .
test:
make pytest
make sbe
test-all:
make pytest-all
make sbe
venv-with-pipenv:
pyenv local 3.11
python -m venv .venv
python -m pip install --upgrade pip
python -m pip install pipenv
test-pipenv-install:
pipenv install --skip-lock
make pytest
make sbe
pipenv-clean:
rm -rf .venv Pipfile.lock
pipenv-install:
pipenv install --skip-lock -d
package-dist: clean-package-dist
pipenv run python setup.py sdist bdist_wheel
pipenv run python -m twine upload --config-file ./.pypirc dist/*
git tag -f -a `cat updater/VERSION` -m "New relase `cat updater/VERSION`"
git push origin --tags
make clean-package-dist
clean-package-dist:
rm -rf build dist updater.egg-info
clean-docs:
rm -rf docs/build
build-docs: clean-docs
cd docs && \
make html && \
make markdown
cd docs && \
find . -name *.md | xargs sed -i 's/( </ </g' && \
find . -name *.md | xargs sed -i 's/>)/>/g' && \
find . -name *.md | xargs sed -i 's/()//g'
cp docs/build/markdown/index.md ./README.md
blackd:
docker run -d --rm -p 45484:45484 --name blackd paterit/blackd
tox:
python -m tox
# to list all available versions: `pyenv install -l`
pyenv-install:
pyenv install -s 3.8.16
pyenv local 3.8.16
python -m pip install --upgrade pip
python -m pip install tox
pyenv install -s 3.7.16
pyenv local 3.7.16
python -m pip install --upgrade pip
python -m pip install tox
# pyenv install 3.6.15
# pyenv local 3.6.15
# python -m pip install tox
pyenv install -s 3.9.16
pyenv local 3.9.16
python -m pip install --upgrade pip
python -m pip install tox
pyenv install -s 3.10.11
pyenv local 3.10.11
python -m pip install --upgrade pip
python -m pip install tox
pyenv install -s 3.11.3
pyenv local 3.11.3
python -m pip install --upgrade pip
python -m pip install tox
pyenv local 3.8.16 3.7.16 3.9.16 3.10.11 3.11.3
cov:
pipenv run python -m coverage run --source=updater -m pytest --disable-warnings -vv -x
pipenv run python -m coverage report -m
cov-all:
pipenv run python -m coverage run --source=. --omit="*/.venv/*,*/tests/*,setup.py" -m pytest --disable-warnings -vv -x
pipenv run python -m coverage report -m
mypy:
pipenv run python -m mypy --strict --show-error-codes check_version.py