forked from nsidc/earthaccess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (45 loc) · 1.48 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
.PHONY: help
# Shell that make should use
SHELL:=bash
# Capture git branch and hash information
# https://stackoverflow.com/questions/43008842/capture-git-branch-name-in-makefile-variable
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
HASH := $(shell git rev-parse HEAD)
# - to suppress if it doesn't exist
-include make.env
help:
# http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
# adds anything that has a double # comment to the phony help list
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ".:*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
python-three-eight:
python-three-eight: ## setup python3.8 virtual environment using poetry
poetry env use python3.8
poetry install
python-three-nine:
python-three-nine: ## setup python3.9 virtual environment using poetry
poetry env use python3.9
poetry install
pre-commit:
pre-commit: ## setup pre-commit within poetry
poetry run pre-commit install
lint: ## lint the code
lint:
bash scripts/lint.sh
format: ## format the code
format:
bash scripts/format.sh
test: ## lint the code
test:
bash scripts/test.sh
docs-live: ## make live docs
docs-live:
bash scripts/docs-live.sh
deploy-docs: ## deploy the docs, if on master branch
deploy-docs:
# https://www.mkdocs.org/user-guide/deploying-your-docs/
# moved script to bash file for easy of reading
bash scripts/deploy-docs.sh
install: ## uninstall and install package with python
install:
poetry remove ./earthdata
poetry add ./earthdata