-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
42 lines (32 loc) · 1.03 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
.PHONY: clean lint requirements reset-mlflow
PROJECT_NAME = ggt
PY = python
# Install dependencies with pip
requirements: clean
$(PY) -m pip install -U pip setuptools wheel
$(PY) -m pip install -r requirements.txt
# Delete all compiled Python files
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
rm -rf $(PROJECT_NAME).egg-info/
# Lint using flake8
lint:
flake8 --ignore=E203,W503 $(PROJECT_NAME)
# Automatically fix code style
style:
black . --line-length=79
# Run tests
check: lint
pytest
# Make SDSS data directory structure
sdss:
mkdir -p data/sdss/cutouts
curl http://amritrau.github.io/assets/data/info.csv > data/sdss/info.csv
hsc_demo:
mkdir -p $(demodir)/cutouts
curl ftp://ftp.astro.yale.edu/pub/hsc_morph/gampen_tutorial_files/for_train/info.csv > $(demodir)/info.csv
wget -nH --cut-dirs 5 -r ftp://ftp.astro.yale.edu/pub/hsc_morph/gampen_tutorial_files/for_train/cutouts/ -P $(demodir)/cutouts/
# Clear all MLFlow logs (use with care!)
reset-mlflow: clean
rm -rf mlruns/