-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (54 loc) · 1.96 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
68
69
70
71
72
pip-tools: ${VIRTUAL_ENV}/scripts/pip-sync
format:
isort --atomic soil_id
black soil_id
install:
pip install -r requirements.txt
install-dev:
pip install -r requirements-dev.txt
lint:
flake8 soil_id && isort -c soil_id && black --check soil_id
lock: pip-tools
CUSTOM_COMPILE_COMMAND="make lock" pip-compile --upgrade --generate-hashes --strip-extras --resolver=backtracking --output-file requirements.txt requirements/base.in
lock-dev: pip-tools
CUSTOM_COMPILE_COMMAND="make lock-dev" pip-compile --upgrade --generate-hashes --strip-extras --resolver=backtracking --output-file requirements-dev.txt requirements/dev.in
build:
echo "Building TK..."
check_rebuild:
./scripts/rebuild.sh
clean:
@find . -name *.pyc -delete
@find . -name __pycache__ -delete
test: clean check_rebuild
if [ -z "$(PATTERN)" ]; then \
$(DC_RUN_CMD) pytest soil_id; \
else \
$(DC_RUN_CMD) pytest soil_id -k $(PATTERN); \
fi
test-verbose:
pytest soil_id --capture=no
test-profile:
pytest soil_id --profile
test-graphs: test-profile graphs
graphs:
# gprof2dot -f pstats prof/combined.prof | dot -Tsvg -o prof/combined.svg
# flameprof prof/combined.prof > prof/combined_flame.svg
gprof2dot -f pstats prof/test_soil_location.prof | dot -Tsvg -o prof/test_soil_location.svg
flameprof prof/test_soil_location.prof > prof/test_soil_location_flame.svg
generate_bulk_test_results:
python -m soil_id.tests.us.generate_bulk_test_results
process_bulk_test_results:
python -m soil_id.tests.us.process_bulk_test_results $(RESULTS_FILE)
# Donwload Munsell CSV, SHX, SHP, SBX, SBN, PRJ, DBF
download-soil-data:
mkdir -p Data
cd Data; \
gdown 1tN23iVe6X1fcomcfveVp4w3Pwd0HJuTe; \
gdown 1WUa9e3vTWPi6G8h4OI3CBUZP5y7tf1Li; \
gdown 1l9MxC0xENGmI_NmGlBY74EtlD6SZid_a; \
gdown 1asGnnqe0zI2v8xuOszlsNmZkOSl7cJ2n; \
gdown 185Qjb9pJJn4AzOissiTz283tINrDqgI0; \
gdown 1P3xl1YRlfcMjfO_4PM39tkrrlL3hoLzv; \
gdown 1K0GkqxhZiVUND6yfFmaI7tYanLktekyp \
${VIRTUAL_ENV}/scripts/pip-sync:
pip install pip-tools