-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (50 loc) · 1.92 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
.PHONY: lint format env
#################################################################################
# GLOBALS #
#################################################################################
PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SHELL := /bin/bash
ifeq (,$(shell which conda))
HAS_CONDA=False
else
HAS_CONDA=True
endif
#################################################################################
# COMMANDS #
#################################################################################
## Lint src directory using flake8
lint:
flake8 EnformerCelltyping
## Format src directory using black
format:
isort EnformerCelltyping && black EnformerCelltyping
## Set up python interpreter environment and install basic dependencies
pyanlyenv:
ifeq (True,$(HAS_CONDA))
@echo ">>> Detected conda, creating conda environment."
# Create the conda environment
conda env create -f environment/py_analysis.yml
@echo ">>> New conda environment created successfully!."
else
@echo ">>> No conda detected. Environment creation aborted."
endif
## Set up R interpreter environment and install basic dependencies
renv:
ifeq (True,$(HAS_CONDA))
@echo ">>> Detected conda, creating conda environment."
# Create the conda environment
conda env create -f environment/r_bioc.yml
@echo ">>> New conda environment created successfully!."
else
@echo ">>> No conda detected. Environment creation aborted."
endif
## Set up sldp environment and install basic dependencies
sldpenv:
ifeq (True,$(HAS_CONDA))
@echo ">>> Detected conda, creating conda environment."
# Create the conda environment
conda env create -f environment/sldp.yml
@echo ">>> New conda environment created successfully!."
else
@echo ">>> No conda detected. Environment creation aborted."
endif