-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (38 loc) · 1.66 KB
/
Makefile
File metadata and controls
51 lines (38 loc) · 1.66 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
.PHONY: clean clean_env data lint environment serve_nb sync_data_to_s3 sync_data_from_s3 github_remote
#################################################################################
# GLOBALS #
#################################################################################
SHELL := /bin/bash
BUCKET = [OPTIONAL] your-bucket-for-syncing-data (do not include 's3://')
CONDA_ENV_NAME = veoibd_misc
CONDA_ROOT = $(shell conda info --root)
CONDA_ENV_DIR = $(CONDA_ROOT)/envs/$(CONDA_ENV_NAME)
CONDA_ENV_PY = $(CONDA_ENV_DIR)/bin/python
#################################################################################
# COMMANDS #
#################################################################################
serve_nb:
source activate $(CONDA_ENV_NAME); \
jupyter notebook --notebook-dir notebooks
environment:
conda create -n $(CONDA_ENV_NAME) --file requirements.txt --yes ; \
source activate $(CONDA_ENV_NAME); \
ipython kernel install --user --name $(CONDA_ENV_NAME) --display-name "$(CONDA_ENV_NAME)"
github_remote:
bash github/push_to_new_remote.sh
data:
source activate $(CONDA_ENV_NAME); \
python src/python/data/make_dataset.py
clean_bytecode:
find . -name "__pycache__" -type d -exec rm -r {} \; ; \
find . -name "*.pyc" -exec rm {} \;
clean_env:
source activate $(CONDA_ENV_NAME); \
rm -rf $$(jupyter --data-dir)/kernels/$(CONDA_ENV_NAME); \
rm -rf $(CONDA_ENV_DIR)
lint:
flake8 --exclude=lib/,bin/ .
sync_data_to_s3:
aws s3 sync data/ s3://$(BUCKET)/data/
sync_data_from_s3:
aws s3 sync s3://$(BUCKET)/data/ data/