forked from Nasdaq/data-link-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
7a4fc9c
commit 56660af
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |