-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (32 loc) · 1.06 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
env:
# brew install pyenv
pip install -U poetry=="1.5.*"
pyenv install --skip-existing 3.11
pyenv local 3.11 && poetry env use $(shell pyenv which python3) && poetry install --no-interaction
poetry run pip install --upgrade pip
env_rm:
yes | poetry cache clear . --all && poetry env remove --all
fmt:
# show changes
poetry run isort --diff --color ./src ./tests
poetry run black --diff --color ./src ./tests
# change
poetry run isort ./src ./tests
poetry run black ./src ./tests
checks:
poetry run isort --check ./src ./tests
poetry run black --check ./src ./tests
poetry run mypy ./src ./tests
poetry run pylint ./src ./tests
pytest_ci:
poetry run pytest -sv --junit-xml junit/test-results.xml ./tests
pytest:
poetry run pytest --cache-clear --capture=no --verbose --disable-warnings --color=yes ./tests
checks_all: checks pytest
lib:
# 'sdist' for notebooks, 'wheel' for jobs
poetry build --format sdist && poetry build --format wheel
ls -1 ./dist
clean:
rm -rf ./.*_cache ./dist ./.python-version
find ./ -type d -name "__pycache__" -exec rm -rf {} +