Skip to content

Commit

Permalink
makefile: simplify tasks
Browse files Browse the repository at this point in the history
Add project makefile to simplify repetitive tasks.  Add targets for
various chores such as linting, tests and project setup.

Signed-off-by: Jamie Couture <[email protected]>
  • Loading branch information
couture-ql committed Aug 29, 2022
1 parent 7a4fc9c commit 56660af
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# default makefile target
all::


.PHONY: help
help:
echo "clean - removes all untracked files"
echo "lint - run flake8"
echo "package - create package for pypi"
echo "setup - install project and maintainer dependencies"
echo "test - run tests"
echo "upload - create and upload distribution for pypi"
echo "upload-test - create and upload distribution for testpypi"

.PHONY: clean
clean:
git clean -fxd

.PHONY: upload
upload: package
python -m twine upload --repository nasdaq-data-link --non-interactive dist/*

.PHONY: upload-test
upload-test: package
python -m twine upload --repository test-nasdaq-data-link --non-interactive --verbose dist/*

.PHONY: lint
lint:
flake8

.PHONY: package
package: clean
python setup.py sdist bdist_wheel

.PHONY: setup
setup:
pip install --upgrade pip
pip install -r requirements.txt
pip install setuptools wheel twine
pip install flake8
pip install tox

.PHONY: test
test:
tox

0 comments on commit 56660af

Please sign in to comment.