forked from interTwin-eu/dask-flood-mapper
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (42 loc) · 1.47 KB
/
Copy pathMakefile
File metadata and controls
51 lines (42 loc) · 1.47 KB
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
SHELL = /bin/bash
.PHONY: help clean install test version dist
PIPENV_DIR := $(HOME)/.local/share/virtualenvs
PIPENV_ACTIVATE := pipenv shell
help:
@echo "make clean"
@echo " clean all python build/compilation files and directories"
@echo "make install"
@echo " install dependencies in local venv environment and creates a new one if it doesn't exist yet"
@echo "make test"
@echo " run test with coverage"
@echo "make version"
@echo " update _version.py with current version tag"
@echo "make dist"
@echo " build the package ready for distribution and update the version tag"
clean:
find . -name '*.pyc' -exec rm --force {} +
find . -name '*.pyo' -exec rm --force {} +
find . -name '*~' -exec rm --force {} +
rm --force .coverage
rm --force --recursive .pytest_cache
rm --force --recursive build/
rm --force --recursive dist/
rm --force --recursive *.egg-info
$(PIPENV_DIR):
pipenv upgrade && pipenv install --dev
environment: $(PIPENV_DIR)
@echo -e "pipenv environment is ready.
install: $(PIPENV_DIR)
- $(PIPENV_ACTIVATE)
pipenv install -e .[test]
teardown: $(PIPENV_DIR)
pipenv --rm
test: install
- $(PIPENV_ACTIVATE)
pytest tests/ -rsx --verbose --color=yes --cov=dask_flood_mapper --cov-report term-missing
version:
echo -e "__version__ = \"$(shell git describe --always --tags --abbrev=0)\"\n__commit__ = \"$(shell git rev-parse --short HEAD)\"" > src/dask_flood_mapper/_version.py
dist: version
- $(PIPENV_ACTIVATE)
pipenv install build twine
python3 -m build