-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (31 loc) · 1.2 KB
/
Makefile
File metadata and controls
44 lines (31 loc) · 1.2 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
.PHONY: all permissions setup check-environment data-download clean
ENV_NAME="kode_env"
# Default target
all: set-permissions setup-environment test-environment download-data test-data clean
## Make setup.sh executable
set-permissions:
@echo "Making setup.sh file executable..."
chmod +x setup.sh
## Setup Python environment
setup-environment:
@echo "Setting up Conda environment..."
./setup.sh
## Check Python environment
test-environment:
@echo "Activating the Conda environment $(ENV_NAME) and running tests..."
@bash -c "source activate $(ENV_NAME); python -m pytest tests/test_environment.py"
## Download datasets
download-data:
@echo "Downloading the datasets"
@mkdir -p data
@curl -o data/data.tar.gz "https://zenodo.org/records/1161203/files/data.tar.gz?download=1"
@tar -xzvf data/data.tar.gz --strip-components=1 -C data/
## Test that the data downloads are correct
test-data:
@echo "Checking that the downloaded data can be correctly loaded..."
@bash -c "source activate $(ENV_NAME); python -m pytest tests/test_data.py"
## Delete all compiled Python files
clean:
@find . -type f -name "*.py[co]" -delete
@find . -type d -name "__pycache__" -delete
@echo "Cleaning compiled Python files"