Skip to content

Commit ab408fb

Browse files
authored
Merge pull request #1444 from cmu-delphi/new-ci-make
Add make install-ci target to install without editable mode
2 parents 3703b60 + daa52d2 commit ab408fb

File tree

29 files changed

+144
-93
lines changed

29 files changed

+144
-93
lines changed

.github/workflows/python-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
pip install pylint pytest pydocstyle wheel
3333
- name: Install
3434
run: |
35-
make install
35+
make install-ci
3636
- name: Lint
3737
run: |
3838
make lint

_delphi_utils_python/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ install: venv
88
pip install wheel ; \
99
pip install -e .
1010

11+
install-ci: venv
12+
. env/bin/activate; \
13+
pip install wheel ; \
14+
pip install .
15+
1116
lint:
1217
. env/bin/activate; pylint delphi_utils
1318
. env/bin/activate; pydocstyle delphi_utils

_template_python/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

cdc_covidnet/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

changehc/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

claims_hosp/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

combo_cases_and_deaths/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

covid_act_now/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

doctor_visits/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

google_symptoms/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

hhs_facilities/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

hhs_hosp/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

jhu/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

nchs_mortality/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir)

nowcast/.pylintrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ disable=logging-format-interpolation,
1616
[BASIC]
1717

1818
# Allow arbitrarily short-named variables.
19-
variable-rgx=[a-z_][a-z0-9_]*
20-
argument-rgx=[a-z_][a-z0-9_]*
21-
attr-rgx=[a-z_][a-z0-9_]*
19+
variable-rgx=[A-Za-z_][a-z0-9_]*
20+
argument-rgx=[A-Za-z_][a-z0-9_]*
21+
attr-rgx=[A-Za-z_][a-z0-9_]*
2222

2323
[DESIGN]
2424

nowcast/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY = venv, lint, test, clean
22

3-
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')
4-
3+
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
54
venv:
65
python3.8 -m venv env
76

@@ -11,6 +10,12 @@ install: venv
1110
pip install -e ../_delphi_utils_python ;\
1211
pip install -e .
1312

13+
install-ci: venv
14+
. env/bin/activate; \
15+
pip install wheel ; \
16+
pip install ../_delphi_utils_python ;\
17+
pip install .
18+
1419
lint:
1520
. env/bin/activate; pylint $(dir)
1621
. env/bin/activate; pydocstyle $(dir) --match-dir '(?!nowcast_fusion)'

nowcast/delphi_nowcast/deconvolution/__init__.py

Whitespace-only changes.

nowcast/delphi_nowcast/deconvolution/deconvolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def deconvolve_double_smooth_ntf(
7474
x_k = None
7575
alpha_0 = np.zeros(n - k - 1)
7676
u_0 = np.zeros(n - k - 1)
77-
for t in range(n_iters):
77+
for _ in range(n_iters):
7878
x_k = x_update_1 @ (Cty + rho * D.T @ (alpha_0 + u_0))
7979
Dx = D @ x_k
8080
alpha_k = _soft_thresh(Dx - u_0, lam / rho)

nowcast/delphi_nowcast/deconvolution/ground_truth.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

nowcast/delphi_nowcast/nowcast_fusion/__init__.py

Whitespace-only changes.

nowcast/delphi_nowcast/sensorization/__init__.py

Whitespace-only changes.

nowcast/delphi_nowcast/sensorization/ar_model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from datetime import datetime, timedelta, date
1+
"""Fit autoregression models."""
2+
3+
from datetime import timedelta, date
24
from typing import Tuple
35

46
import numpy as np

nowcast/delphi_nowcast/sensorization/regression_model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from datetime import datetime, timedelta, date
1+
"""Fit linear regression mdels."""
2+
3+
from datetime import timedelta, date
24

35
import numpy as np
46

0 commit comments

Comments
 (0)