Skip to content

Commit 842298f

Browse files
committed
Add utils to CI and fix some linting
1 parent 35ab469 commit 842298f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/python-ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ jobs:
1616
if: github.event.pull_request.draft == false
1717
strategy:
1818
matrix:
19-
#packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, google_symptoms, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts]
20-
packages: [cdc_covidnet, claims_hosp, combo_cases_and_deaths, google_symptoms, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts]
19+
packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, google_symptoms, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts]
2120
defaults:
2221
run:
2322
working-directory: ${{ matrix.packages }}

_delphi_utils_python/delphi_utils/smooth.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ def __init__(
150150
else:
151151
self.coeffs = None
152152

153-
def smooth(self, signal: Union[np.ndarray, pd.Series], impute_order=2) -> Union[np.ndarray, pd.Series]:
153+
def smooth(self,
154+
signal: Union[np.ndarray, pd.Series],
155+
impute_order=2) -> Union[np.ndarray, pd.Series]:
154156
"""Apply a smoother to a signal.
155157
156158
The major workhorse smoothing function. Imputes the nans and then applies
@@ -368,7 +370,7 @@ def savgol_coeffs(self, nl, nr, poly_fit_degree):
368370
if nr > 0:
369371
warnings.warn("The filter is no longer causal.")
370372

371-
A = np.vstack(
373+
A = np.vstack( # pylint: disable=invalid-name
372374
[np.arange(nl, nr + 1) ** j for j in range(poly_fit_degree + 1)]
373375
).T
374376

@@ -385,7 +387,7 @@ def savgol_coeffs(self, nl, nr, poly_fit_degree):
385387
coeffs[i] = (mat_inverse @ basis_vector)[0]
386388
return coeffs
387389

388-
def savgol_smoother(self, signal):
390+
def savgol_smoother(self, signal): # pylint: disable=inconsistent-return-statements
389391
"""Smooth signal with the savgol smoother.
390392
391393
Returns a convolution of the 1D signal with the Savitzky-Golay coefficients, respecting

0 commit comments

Comments
 (0)