This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
67 lines (51 loc) · 1.65 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
62
63
64
65
66
67
.PHONY: help clean clean-pyc clean-build list test test-dbg test-cov test-all coverage docs release sdist install deps develop tag
project-name = eptools
version-var := "__version__ = "
version-string := $(shell grep $(version-var) $(project-name)/version.py)
version := $(subst __version__ = ,,$(version-string))
help:
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "clean-pyenv - remove the pipenv Python environment"
@echo "lint - check style with flake8"
@echo "install - install"
@echo "develop - install in development mode"
@echo "deps - install dependencies"
@echo "tag - create a git tag with current version"
install: deps
pipenv run python setup.py install
develop: dev_deps
pipenv run python setup.py develop
pipenv run pre-commit install
deps:
pipenv install --skip-lock
dev_deps:
pipenv install --skip-lock --dev
clean: clean-build clean-pyc
clean-build:
rm -fr build/
rm -fr dist/
rm -fr *.egg-info
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -rf {} +
find . -name '*.log*' -delete
find . -name '.DS_Store' -delete
clean-pyenv:
pipenv --rm
lint:
pipenv run flake8 $(project-name) test
format:
pipenv run black --line-length=120 --safe .
pre-commit:
pipenv run pre-commit run
tag: clean
@echo "Creating git tag v$(version)"
git tag v$(version)
git push --tags
badges:
pipenv run inv fetch-talks-json -c ep2018 -o notebooks/talks.json -s accepted
pipenv run inv fetch-ticket-profiles -c ep2018 -o notebooks/profiles.json
pipenv run python eptools/badge_creator.py