-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
Makefile
66 lines (45 loc) · 1.39 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
.PHONY: _prep create_environment requirements format lint docs docs-serve test \
test-fastest test-debug-fastest _clean_manual_test manual-test manual-test-debug
## GLOBALS
PROJECT_NAME = cookiecutter-data-science
PYTHON_VERSION = 3.10
PYTHON_INTERPRETER = python
### UTILITIES
_prep:
rm -f **/*/.DS_store
### DEV COMMANDS
## Set up python interpreter environment
create_environment:
conda create --name $(PROJECT_NAME) python=$(PYTHON_VERSION) -y
@echo ">>> conda env created. Activate with:\nconda activate $(PROJECT_NAME)"
## Install Python Dependencies
requirements:
$(PYTHON_INTERPRETER) -m pip install -r dev-requirements.txt
## Format the code using isort and black
format:
isort --profile black ccds hooks tests docs/scripts
black ccds hooks tests docs/scripts
lint:
flake8 ccds hooks tests docs/scripts
isort --check --profile black ccds hooks tests docs/scripts
black --check ccds hooks tests docs/scripts
### DOCS
docs:
cd docs && mkdocs build
docs-serve:
cd docs && mkdocs serve
### TESTS
test: _prep
pytest -vvv --durations=0
test-fastest: _prep
pytest -vvv -FFF
test-debug-last:
pytest --lf --pdb
_clean_manual_test:
rm -rf manual_test
manual-test: _prep _clean_manual_test
mkdir -p manual_test
cd manual_test && python -m ccds ..
manual-test-debug: _prep _clean_manual_test
mkdir -p manual_test
cd manual_test && python -m pdb ../ccds/__main__.py ..