Skip to content

Commit 25c61c3

Browse files
authored
Merge pull request #443 from cmu-delphi/makefile
Add Makefiles with convenience functions to each indicator
2 parents 0e089b7 + bebf07e commit 25c61c3

File tree

15 files changed

+359
-0
lines changed

15 files changed

+359
-0
lines changed

_delphi_utils_python/Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e .
12+
13+
lint:
14+
. env/bin/activate; \
15+
pylint $(dir)
16+
17+
test:
18+
. env/bin/activate ;\
19+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
20+
21+
clean:
22+
rm -rf env
23+
rm -f params.json

_template_python/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

cdc_covidnet/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

changehc/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

claims_hosp/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

combo_cases_and_deaths/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

google_health/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

google_symptoms/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

jhu/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

nchs_mortality/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

quidel/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

quidel_covidtest/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

safegraph/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

safegraph_patterns/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

usafacts/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY = venv, lint, test, clean
2+
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4+
5+
venv:
6+
python3.8 -m venv env
7+
8+
install: venv
9+
. env/bin/activate; \
10+
pip install wheel ; \
11+
pip install -e ../_delphi_utils_python ;\
12+
pip install -e .
13+
14+
lint:
15+
. env/bin/activate; \
16+
pylint $(dir)
17+
18+
test:
19+
. env/bin/activate ;\
20+
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)
21+
22+
clean:
23+
rm -rf env
24+
rm -f params.json

0 commit comments

Comments
 (0)