Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
pip install pylint pytest pydocstyle wheel
- name: Install
run: |
make install
make install-ci
- name: Lint
run: |
make lint
Expand Down
5 changes: 5 additions & 0 deletions _delphi_utils_python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ install: venv
pip install wheel ; \
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install .

lint:
. env/bin/activate; pylint delphi_utils
. env/bin/activate; pydocstyle delphi_utils
Expand Down
9 changes: 7 additions & 2 deletions _template_python/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions cdc_covidnet/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions changehc/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions claims_hosp/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions combo_cases_and_deaths/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions covid_act_now/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions doctor_visits/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions google_symptoms/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions hhs_facilities/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions hhs_hosp/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions jhu/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
9 changes: 7 additions & 2 deletions nchs_mortality/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir)
Expand Down
6 changes: 3 additions & 3 deletions nowcast/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ disable=logging-format-interpolation,
[BASIC]

# Allow arbitrarily short-named variables.
variable-rgx=[a-z_][a-z0-9_]*
argument-rgx=[a-z_][a-z0-9_]*
attr-rgx=[a-z_][a-z0-9_]*
variable-rgx=[A-Za-z_][a-z0-9_]*
argument-rgx=[A-Za-z_][a-z0-9_]*
attr-rgx=[A-Za-z_][a-z0-9_]*

[DESIGN]

Expand Down
9 changes: 7 additions & 2 deletions nowcast/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY = venv, lint, test, clean

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*')

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

Expand All @@ -11,6 +10,12 @@ install: venv
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

lint:
. env/bin/activate; pylint $(dir)
. env/bin/activate; pydocstyle $(dir) --match-dir '(?!nowcast_fusion)'
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion nowcast/delphi_nowcast/deconvolution/deconvolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def deconvolve_double_smooth_ntf(
x_k = None
alpha_0 = np.zeros(n - k - 1)
u_0 = np.zeros(n - k - 1)
for t in range(n_iters):
for _ in range(n_iters):
x_k = x_update_1 @ (Cty + rho * D.T @ (alpha_0 + u_0))
Dx = D @ x_k
alpha_k = _soft_thresh(Dx - u_0, lam / rho)
Expand Down
47 changes: 0 additions & 47 deletions nowcast/delphi_nowcast/deconvolution/ground_truth.py

This file was deleted.

Empty file.
Empty file.
4 changes: 3 additions & 1 deletion nowcast/delphi_nowcast/sensorization/ar_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from datetime import datetime, timedelta, date
"""Fit autoregression models."""

from datetime import timedelta, date
from typing import Tuple

import numpy as np
Expand Down
4 changes: 3 additions & 1 deletion nowcast/delphi_nowcast/sensorization/regression_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from datetime import datetime, timedelta, date
"""Fit linear regression mdels."""

from datetime import timedelta, date

import numpy as np

Expand Down
Loading