-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
61 lines (59 loc) · 2.12 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
install:
poetry install
install-docs:
cd docs && pip install -r requirements.txt && cd ..
lint:
poetry run ruff check --fix . && poetry run ruff format .
type:
poetry run mypy .
tox:
pip install tox tox-gh-actions
tox
docstr:
docstr-coverage
test:
coverage run --branch -p -m pytest --capture=sys
coverage:
coverage combine | true && coverage report -m
html:
cd docs && make html && cd ../
deploy:
pip install setuptools wheel twine
echo "[pypi]" >> ~/.pypirc
echo "username = ${PYPI_USERNAME}" >> ~/.pypirc
echo "password = ${PYPI_PASSWORD}" >> ~/.pypirc
python setup.py sdist bdist_wheel
twine upload dist/*
rm -fr build dist
fake-deploy:
pip install setuptools wheel twine
echo "[pypi]" >> ~/.pypirc
echo "username = ${PYPI_USERNAME}" >> ~/.pypirc
echo "password = ${PYPI_PASSWORD}" >> ~/.pypirc
python setup.py sdist
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
rm -fr build dist
docker:
echo "$DOCKER_PASSWORD" | docker login -u $DOCKER_LOGIN --password-stdin docker.pkg.github.com
docker build -t docker.pkg.github.com/$IMAGE_NAME:$DOCKER_TAG .
docker push docker.pkg.github.com/$IMAGE_NAME:$DOCKER_TAG
clean:
rm -rf docs/build .tox .pytest_cache build circleci myjwt.egg-info dist coverage_html_report *.json *.pem *.crt dumpSyntax .coverage .coverage.* .rnd .mypy_cache
freeze:
pip freeze > freeze.txt
help:
@echo "make install Install requirements."
@echo "make install-docs Install docs requirements."
@echo "make lint Run Lint."
@echo "make type Run mypy."
@echo "make docstr Run docstr report."
@echo "make tox Run Unit test tox."
@echo "make test Run Unit test."
@echo "make coverage Show coverage report."
@echo "make html Generate docs."
@echo "make deploy Deploy package on pypi."
@echo "make fake-deploy Test Deploy."
@echo "make docker Build docker and publish on github registry."
@echo "make freeze Run pip freeze."
@echo "make clean Clean Your project.Delete useless file."
@echo "make help Show this help message."