Skip to content

Commit

Permalink
makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
programmingAthlete committed Dec 24, 2023
1 parent 5421e09 commit 6f99a90
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
PROJECT_NAME = crypto_pkg

PYTHON = python
SHELL_DOT = $(shell printf "\033[34;1m▶\033[0m")

.PHONY: tests
tests: $(info $(M) testing package...)
pip install -e . > /dev/null && pip install pytest > /dev/null
python -m pytest tests
tests: $(info $(SHELL_DOT) testing package...)
@pip install -e . > /dev/null && pip install pytest > /dev/null
@python -m pytest tests

.PHONY: coverage
coverage: $(info $(M) coverage testing package...) ## test coverage package
coverage: $(info $(SHELL_DOT) coverage testing package...)
pip install -e . > /dev/null && pip install pytest pytest-cov > /dev/null
python -m pytest tests --cov=$(PROJECT_NAME) --cov-fail-under=0

.PHONY: deps
deps: $(info $(M) install required packages...)
deps: $(info $(SHELL_DOT) install required packages...)
pip install -r requirements.txt

.PHONY: setup
deps: $(info $(M) install required packages...)
setup: $(info $(SHELL_DOT) Install packge)
pip install -e .

.PHONY: build
build: $(info $(M) install required packages...)
build: $(info $(SHELL_DOT) build package)
rm -rf dist
python -m build

.PHONY: publishtest
publishtest: $(info $(M) install required packages...)
publishtest: $(info $(SHELL_DOT) Publish package to test PyPI)
python -m twine upload --repository testpypi dist/*

.PHONY: publish
publish: $(info $(M) install required packages...)
publish: $(info $(SHELL_DOT) Publish package to PyPI)
python -m twine upload dist/*

0 comments on commit 6f99a90

Please sign in to comment.