-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathMakefile
More file actions
95 lines (64 loc) · 2.13 KB
/
Makefile
File metadata and controls
95 lines (64 loc) · 2.13 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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
app_name = CoreMS
parameters_path = parameter.json
version := $(shell cat .bumpversion.cfg | grep current_version | cut -d= -f2 | tr -d ' ')
stage := $(shell cat .bumpversion.cfg | grep optional_value | cut -d= -f2 | tr -d ' ')
LIPIDOMICS_SQLITE_URL ?= https://nmdcdemo.emsl.pnnl.gov/lipidomics/parameter_files/202412_lipid_ref.sqlite
LIPIDOMICS_SQLITE_PATH ?= tests/tests_data/lcms/202412_lipid_ref.sqlite
.PHONY: download-lipidomics-db
download-lipidomics-db:
# Check if the file already exists before downloading
@if [ -f "$(LIPIDOMICS_SQLITE_PATH)" ]; then \
echo "LC-MS lipidomics database already exists at $(LIPIDOMICS_SQLITE_PATH)"; \
else \
echo "Downloading LC-MS lipidomics database"; \
mkdir -p $$(dirname $(LIPIDOMICS_SQLITE_PATH)); \
curl --retry 3 --retry-delay 5 --connect-timeout 30 --max-time 300 -L -o $(LIPIDOMICS_SQLITE_PATH) $(LIPIDOMICS_SQLITE_URL); \
echo "LC-MS lipidomics database downloaded"; \
fi
cpu:
pyprof2calltree -k -i $(file)
mem:
mprof run --multiprocess $(script)
mprof plot
major:
@bumpversion major --allow-dirty
@$(MAKE) docu
minor:
@bumpversion minor --allow-dirty
@$(MAKE) docu
patch:
@bumpversion patch --allow-dirty
@$(MAKE) docu
pypi_test:
@rm -rf build dist *.egg-info
@python3 setup.py sdist
pypi:
@rm -rf build dist *.egg-info
@python3 setup.py sdist
@twine upload dist/*
tag:
@git tag -a $(version).$(stage) -m "version $(version).$(stage)"
@git push origin $(version).$(stage)
@echo tagged $(version).$(stage) and pushed
build-image:
@echo corilo/corems:$(version).$(stage)
@docker build -t corilo/corems:$(version) .
@docker push corilo/corems:$(version)
@docker image tag corilo/corems:$(version) corilo/corems:latest
@docker push corilo/corems:latest
db-up:
@docker-compose up -d
db-down:
@docker-compose down
db-logs:
@docker-compose logs -f
db-connect:
@docker exec -it molformdb psql -U postgres
all-up:
@docker-compose -f docker-compose-jupyter.yml up
fresh-stack-up:
@docker build -t corems:local .
@docker-compose up -d
@docker run --rm -v ./data:/home/CoreMS/data corems:local
docu:
pdoc --output-dir docs --docformat numpy corems