Skip to content
Snippets Groups Projects
Commit 12f63c5f authored by Moul's avatar Moul
Browse files

[enh] Makefile: Update commands, since it wasn’t maintained

Call pre-commit
Remove 'check-format' not much interesting with pre-commit
build: keep dist directory, this is not hurting
Fix 'deploy' cmd publishing to pypi_test
Switch to 'poetry deploy' prompting for PyPI credentials
parent 4b6664b6
No related branches found
No related tags found
1 merge request!170#165, #182: Stop using the Makefile in the CI and tools installed from Poetry dev dependencies in favor of pre-commit, Bump Sphinx to v4
.PHONY: docs check check-format mypy pylint format build deploy deploy_test .PHONY: docs check mypy pylint format build deploy deploy_test
.SILENT: deploy deploy_test # do not echo commands with password .SILENT: deploy deploy_test # do not echo commands with password
# generate documentation # generate documentation
docs: docs:
cd docs && rm duniterpy.*; poetry run sphinx-apidoc -o . ../duniterpy && poetry run make clean && poetry run make html && cd .. poetry run sphinx-apidoc -o docs . && poetry run sphinx-build -b html docs public
# check # check
check: mypy pylint check-format check:
pre-commit run --all-files
# check static typing # check static typing
mypy: mypy:
poetry run mypy duniterpy --ignore-missing-imports pre-commit run --all-files mypy
poetry run mypy tests --ignore-missing-imports
poetry run mypy examples --ignore-missing-imports
# check code errors # check code errors
pylint: pylint:
poetry run pylint duniterpy tests examples pre-commit run --all-files pylint
# check format
check-format:
black --check duniterpy
black --check tests
black --check examples
# format code # format code
format: format:
black duniterpy pre-commit run --all-files black
black tests
black examples
# build a wheel package in dist folder # build a wheel package in dist folder
build: build:
if [ -d "./dist" ]; then rm -r dist/*; fi
poetry build poetry build
# upload on PyPi repository # upload on PyPi repository
deploy: deploy:
poetry publish --build --username ${PYPI_LOGIN} --password ${PYPI_PASSWORD} --repository pypi_test poetry publish --build
# upload on PyPi test repository # upload on PyPi test repository
deploy_test: deploy_test:
poetry config repositories.pypi_test https://test.pypi.org/legacy/ poetry config repositories.pypi_test https://test.pypi.org/legacy/
poetry publish --build --username ${PYPI_TEST_LOGIN} --password ${PYPI_TEST_PASSWORD} --repository pypi_test poetry publish --build --repository pypi_test
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment