-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
76 lines (60 loc) · 2.14 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
66
67
68
69
70
71
72
73
74
75
76
.DEFAULT_GOAL := all
isort = isort dspback tests
black = black -S -l 120 --target-version py38 dspback tests
.PHONY: format
format:
docker exec dsp_dev_dspback $(isort)
docker exec dsp_dev_dspback $(black)
.PHONY: install
install:
docker exec dsp_dev_dspback pip install -r requirements.txt
docker exec dsp_dev_dspback pip install -r requirements-dev.txt
.PHONY: test
test:
docker exec dsp_dev_dspback pytest tests -vv
.PHONY: test-cov
test-cov:
docker exec dsp_dev_dspback pytest tests --cov=dspback --cov-report html
docker cp dsp_dev_dspback:htmlcov .
.PHONY: test-cov-gh-action
test-cov-gh-action:
docker exec dsp_dev_dspback pytest tests --cov=dspback --cache-clear > pytest-coverage.txt
.PHONY: default-env
default-env:
wget -N https://raw.githubusercontent.com/cznethub/dsp/develop/.env
.PHONY: up
up:
docker-compose --env-file .env up dspback
.PHONY: up-d
up-d:
docker-compose --env-file .env up -d dspback
.PHONY: up-all
up-all:
docker-compose --env-file .env up
.PHONY: up-all-d
up-all-d:
docker-compose --env-file .env up -d
.PHONY: down
down:
docker-compose --env-file .env down
.PHONY: build
build:
docker-compose --env-file .env build dspback
.PHONY: build-all
build-all:
docker-compose --env-file .env build
.PHONY: build-dspfront
build-dspfront:
rm -rf dspfront
git clone https://github.com/cznethub/dspfront.git
docker build -t dspfront dspfront
rm -rf dspfront
.PHONY: bash
bash:
docker exec -it dsp_dev_dspback /bin/bash
.PHONY: build-pydantic-schemas
build-pydantic-schemas:
docker exec dsp_dev_dspback datamodel-codegen --input-file-type jsonschema --input dspback/schemas/zenodo/schema.json --output dspback/schemas/zenodo/model.py
docker exec dsp_dev_dspback datamodel-codegen --input-file-type jsonschema --input dspback/schemas/external/schema.json --output dspback/schemas/external/model.py
docker exec dsp_dev_dspback datamodel-codegen --input-file-type jsonschema --input dspback/schemas/earthchem/schema.json --output dspback/schemas/earthchem/model.py
docker exec dsp_dev_dspback datamodel-codegen --input-file-type jsonschema --input dspback/schemas/hydroshare/schema.json --output dspback/schemas/hydroshare/model.py