Skip to content

Add nation and HHS to doctor visits #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 784 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
784 commits
Select commit Hold shift + click to select a range
763fac0
revert one week shift
Nov 16, 2020
f43c69b
update details
Nov 16, 2020
070117a
update unit tests
Nov 16, 2020
8d00ead
Reflow and rename stuff
benjaminysmith Nov 16, 2020
2e6567b
More lint fixes
benjaminysmith Nov 16, 2020
f95334a
Switch to production directory
korlaxxalrok Nov 16, 2020
d007201
Switch to production directory
korlaxxalrok Nov 16, 2020
1328595
Merge pull request #529 from cmu-delphi/fix-nchs-timestamp
krivard Nov 16, 2020
4a36c58
Merge pull request #500 from benjaminysmith/main
krivard Nov 16, 2020
427ef7d
add test parameters to staging/prod
sgsmob Nov 16, 2020
a3289cc
Update ansible/templates/google_health-params-prod.json.j2
sgsmob Nov 16, 2020
bc45edb
Merge pull request #522 from cmu-delphi/feature-jenkins-deployments
krivard Nov 16, 2020
abc9cc8
Merge pull request #526 from sgsmob/hotfix
krivard Nov 16, 2020
122facc
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Nov 16, 2020
956a62d
Merge pull request #1 from cmu-delphi/main
benjaminysmith Nov 16, 2020
519001f
Merge pull request #531 from sgsmob/google_health
krivard Nov 16, 2020
a8271af
USAFacts prop fix:
dshemetov Nov 17, 2020
4149e3f
udpate signal names in code
Nov 17, 2020
4a5dda0
udpate DETAILS
Nov 17, 2020
642248d
update unit tests
Nov 17, 2020
cdd9e5c
update unit tests in test_geo
Nov 17, 2020
d7933c1
do not report missing values
Nov 17, 2020
e35d714
update unit tests
Nov 17, 2020
e0544d9
usafacts: add unit test for megafips-state prop
krivard Nov 17, 2020
6a7fd65
Merge pull request #533 from cmu-delphi/fix_usafacts_prop
krivard Nov 17, 2020
359f58e
Merge branch 'deploy-changehc' into all-deploys
krivard Nov 17, 2020
a14e248
Merge branch 'deploy-usafacts' into all-deploys
krivard Nov 17, 2020
511f102
Merge branch 'deploy-google_health' into all-deploys
krivard Nov 17, 2020
6fc291c
Merge branch 'deploy-safegraph' into all-deploys
krivard Nov 17, 2020
b39d55f
updated code for using geo utils
Oct 13, 2020
ec50220
Add shell scripts to be triggered by Jenkins
korlaxxalrok Oct 14, 2020
5f99d42
Rename shell scripts to simpler 'quidel prefix'
korlaxxalrok Oct 14, 2020
c0e4cf6
Remove -x debug to keep Jenkins output sparser
korlaxxalrok Oct 14, 2020
0092a70
Add quidel params template
korlaxxalrok Oct 14, 2020
e3226c9
Fix typo
korlaxxalrok Oct 14, 2020
0a3f601
Move config element to ansible template variable
korlaxxalrok Oct 14, 2020
70a518e
Update ingestion dir
korlaxxalrok Oct 15, 2020
5ad1f9b
We need to run as quidel_covidtest for now (#317)
korlaxxalrok Oct 15, 2020
8d3c9ec
Fix deployment (#319)
korlaxxalrok Oct 15, 2020
48994db
Fix linting errors that snuck in during cherry-picking
krivard Nov 17, 2020
017d96e
Merge branch 'repaired-deploy-quidel' into all-deploys
krivard Nov 17, 2020
fe80833
Merge pull request #538 from cmu-delphi/all-deploys
krivard Nov 17, 2020
319df4d
Set pylint equal to others
chinandrew Nov 17, 2020
493de65
Merge pull request #524 from cmu-delphi/chc/change-source-name
krivard Nov 17, 2020
de2cb0c
Add prod branch to CI
chinandrew Nov 17, 2020
7eaf191
Merge pull request #542 from cmu-delphi/prod-ci
krivard Nov 17, 2020
8832b35
Add changehc to the indicators list in Jenkinsfile
krivard Nov 17, 2020
dbcd886
Merge pull request #544 from cmu-delphi/add-changehc-to-jenkinsfile
krivard Nov 17, 2020
36f1523
Fix type in indicator name
korlaxxalrok Nov 17, 2020
d5bb545
Merge pull request #545 from cmu-delphi/fix-add-changehc-to-jenkinsfile
krivard Nov 17, 2020
0bf41a2
Reconsider missing value in NY
Nov 18, 2020
b09c6d6
delete Trailing whitespacs
Nov 18, 2020
568d165
fix errors
Nov 18, 2020
16d6e91
update unittests with constants
Nov 18, 2020
761bde5
use a constant for the new signal name
Nov 18, 2020
e98a224
fixed an error
Nov 18, 2020
05e776c
use constants
Nov 18, 2020
736d690
add tests for missing values
Nov 18, 2020
84f084b
fixed errors in DETAILS
Nov 18, 2020
c9814c6
change the class name to nchs related
Nov 18, 2020
3ad430d
change to nums in a given week
Nov 18, 2020
4b6f5bb
Merge pull request #534 from cmu-delphi/update-gs-signals-names
krivard Nov 18, 2020
c2ca85b
Merge pull request #535 from cmu-delphi/fix-nchs-missing-value
krivard Nov 18, 2020
d049649
Release safegraph_patterns (#549)
korlaxxalrok Nov 18, 2020
af05d99
Merge branch 'main' into fb-package-validation
nmdefries Nov 18, 2020
e2c86a3
update plans, small clean-up items
nmdefries Nov 18, 2020
c4c566e
add newline at end of file
chinandrew Nov 18, 2020
13618e4
update safegraph signal names to use correct suffixes
sgsmob Nov 18, 2020
404e80d
Merge pull request #553 from sgsmob/rename_signals
krivard Nov 19, 2020
00cf3a1
Merge pull request #540 from cmu-delphi/quidel-pylint
krivard Nov 19, 2020
36aa037
remove deprecated functions
chinandrew Nov 19, 2020
385e029
remove newline
chinandrew Nov 19, 2020
b6980bc
Fix tests
chinandrew Nov 19, 2020
f6caa7f
Merge pull request #555 from cmu-delphi/remove-deprecated-geo
krivard Nov 19, 2020
8afd77e
add to makefile and setup.pys
chinandrew Nov 19, 2020
fcfea35
add change to workflows
chinandrew Nov 19, 2020
0046ca7
Merge pull request #558 from cmu-delphi/add-change-ci
krivard Nov 19, 2020
8a20533
Merge pull request #155 from cmu-delphi/fb-package-validation
krivard Nov 19, 2020
816c132
Merge pull request #548 from cmu-delphi/fix-safegraph-patterns-typo
krivard Nov 19, 2020
63338b6
Add pip upgrade step, add pip retry/timeout to build + package (#559)
korlaxxalrok Nov 19, 2020
272be38
add to makefiles
chinandrew Nov 19, 2020
ee4e566
remove change
chinandrew Nov 19, 2020
79c481a
Get google symptoms to pass pydocstyle
chinandrew Nov 19, 2020
ae0e3c3
let jhu pass pydocstyle
chinandrew Nov 19, 2020
4bd85a4
fix quidel pylint
chinandrew Nov 19, 2020
fb3c175
Enable CI
chinandrew Nov 19, 2020
1f005cd
have nchs pass pydocstyle
chinandrew Nov 19, 2020
be15fe4
add null removal feature to exporting
sgsmob Nov 20, 2020
40e774a
Add google_symptoms prod params
korlaxxalrok Nov 20, 2020
ebe8263
Add production ingestion dir
korlaxxalrok Nov 20, 2020
1b17cf5
Move safegraph patterns results to correct directory
krivard Nov 20, 2020
6a62b22
Turn off hard-coded WIP mode for safegraph_patterns
krivard Nov 20, 2020
0437403
Merge pull request #560 from cmu-delphi/pydocstyle
krivard Nov 20, 2020
a34dd22
Merge pull request #561 from cmu-delphi/gsymptoms-docs
krivard Nov 20, 2020
df57017
Merge pull request #563 from cmu-delphi/quidelpylint
krivard Nov 20, 2020
c9f3dd5
Merge pull request #564 from cmu-delphi/nchs-pydoc
krivard Nov 20, 2020
fe5ed1c
Remove more hardcoded WIP from safegraph patterns
krivard Nov 20, 2020
0542074
Merge pull request #565 from sgsmob/export
krivard Nov 20, 2020
cf1f828
Merge pull request #567 from cmu-delphi/fix-sg-patterns-sourcename
krivard Nov 20, 2020
289ad49
Update jhu/delphi_jhu/pull.py
chinandrew Nov 20, 2020
d87f8cc
Update jhu/delphi_jhu/geo.py
chinandrew Nov 20, 2020
93061e5
Update ansible/templates/google_symptoms-params-prod.json.j2
korlaxxalrok Nov 20, 2020
dc801ce
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Nov 20, 2020
d81f131
remove null samples
sgsmob Nov 20, 2020
dfd690e
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Nov 20, 2020
1cb1680
remove null samples
sgsmob Nov 20, 2020
e38ddbb
Update ansible/templates/google_symptoms-params-prod.json.j2
korlaxxalrok Nov 20, 2020
59125c6
Merge pull request #566 from cmu-delphi/release-google_symptoms
krivard Nov 20, 2020
fd1b551
Merge pull request #517 from sgsmob/quidel_covidtest
krivard Nov 20, 2020
4756f76
Merge pull request #516 from sgsmob/archive
krivard Nov 20, 2020
b9cd410
Merge pull request #562 from cmu-delphi/jhu-docs
krivard Nov 20, 2020
7f087c3
Get CHC to pass pydocstyle
chinandrew Nov 20, 2020
a5223a1
Add to makefile
chinandrew Nov 20, 2020
e816a30
Get utils to pass pydocstyle
chinandrew Nov 20, 2020
0374860
Get quidel_covidtest to pass pydocstyle
chinandrew Nov 20, 2020
44eba98
Add pydocstyle to makefile
chinandrew Nov 20, 2020
44b4754
Correct makefile
chinandrew Nov 21, 2020
ac86ad8
Get quidel to pass pydocstyle
chinandrew Nov 21, 2020
d009953
added a check on signal so that outlier test is only run on cases and…
Nov 21, 2020
7a93f6f
remove a print statement
Nov 21, 2020
ea32056
Add HRR and MSA
chinandrew Nov 23, 2020
f6d8fc2
Update tests
chinandrew Nov 23, 2020
f09e3f5
change sig_cut back to 20 since we're only running this on cases and …
nmdefries Nov 23, 2020
0348db6
Refactor safegraph to use export util
chinandrew Nov 23, 2020
7270e9d
update plans
nmdefries Nov 23, 2020
5ef2740
update plans
nmdefries Nov 23, 2020
ec44327
Merge branch 'main' into large_spikes_validator
nmdefries Nov 23, 2020
715b5a0
Update imports
chinandrew Nov 23, 2020
5d9929d
Check for duplicate rows
JedGrabman Nov 23, 2020
2545dce
Update plans.md to remove duplicate rows task
JedGrabman Nov 23, 2020
1304e6f
Update run script to copy a specific range of files to the receiving …
korlaxxalrok Nov 23, 2020
cddfb38
move parameter checking to be separate from other validation
sgsmob Nov 24, 2020
9794653
remove vestigial checks
sgsmob Nov 24, 2020
e0a29b8
refactor of validate into a report
sgsmob Nov 24, 2020
3938f85
documentation of report
sgsmob Nov 24, 2020
51840c1
plug report logic into the running
sgsmob Nov 24, 2020
08b8446
adding pylintrc to validator package
sgsmob Nov 24, 2020
c7d1872
pylint compliance
sgsmob Nov 24, 2020
76c043f
add pylintrc
sgsmob Nov 24, 2020
0ae148e
Test Fix and Documentation Update
JedGrabman Nov 25, 2020
a9ba2ba
Add:
korlaxxalrok Nov 25, 2020
732d696
Merge pull request #427 from cmu-delphi/large_spikes_validator
krivard Nov 30, 2020
a627e1c
Merge pull request #573 from cmu-delphi/safegraph-hrr-msa
krivard Nov 30, 2020
a9eb30d
Merge pull request #574 from cmu-delphi/safegraph-export
krivard Nov 30, 2020
02692f9
refactor of validator for lint compliance
sgsmob Nov 30, 2020
cc34365
change order of super().__init__() call to preserve error function me…
sgsmob Nov 30, 2020
f9e9900
trailing newline to pylintrc
sgsmob Nov 30, 2020
feafbed
add TODO for last lint error
sgsmob Nov 30, 2020
727fe7a
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Nov 30, 2020
c0cd3b6
Fix ingestion directory path (#580)
korlaxxalrok Nov 30, 2020
68d84e4
Changed cutoff parameter and a formatting issue. All tests pass local…
Nov 30, 2020
66abae4
safegraph: activate 7dav signals in production
krivard Nov 30, 2020
900eae2
Merge pull request #583 from cmu-delphi/release/safegraph-7dav
krivard Nov 30, 2020
6e18126
Merge pull request #582 from cmu-delphi/validator_tests_fix
krivard Nov 30, 2020
f6653aa
get validation pylint compliant
sgsmob Dec 1, 2020
49bc1b2
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Dec 1, 2020
ec9cc20
Merge branch 'validator' into validation_report
sgsmob Dec 1, 2020
48b75a8
fix bug with missing argument to refactored function
sgsmob Dec 1, 2020
331dd15
tests for utils
sgsmob Dec 1, 2020
1d1c6fe
remove wip prefix
Dec 1, 2020
29c2f12
constants capitalization
sgsmob Dec 1, 2020
be549a5
Merge pull request #584 from cmu-delphi/remove-wip-for-gs
krivard Dec 1, 2020
71779b2
Use production ingestion directory
korlaxxalrok Dec 1, 2020
1750b13
tests for datafetching
sgsmob Dec 1, 2020
2cb2553
Add constants for cli
rumackaaron Dec 1, 2020
5e22295
Load files for cli
rumackaaron Dec 1, 2020
595e1dd
Adjust pipeline
rumackaaron Dec 1, 2020
604d11b
Merge branch 'main' of https://github.com/cmu-delphi/covidcast-indica…
rumackaaron Dec 1, 2020
c2c89fd
Merge branch 'validator' into validation_report
sgsmob Dec 1, 2020
d0db106
Fix linting
rumackaaron Dec 1, 2020
b7f213f
Update tests
rumackaaron Dec 1, 2020
f00586e
Modularized run
rumackaaron Dec 1, 2020
41e1584
params refactor
rumackaaron Dec 1, 2020
3290130
update backfill docstring
chinandrew Dec 1, 2020
90b285d
Merge pull request #586 from cmu-delphi/release-nchs_mortality
korlaxxalrok Dec 2, 2020
9d3e0fb
only iterate over geo,signal combos available on covidcast
sgsmob Dec 2, 2020
5abec9b
Merge pull request #587 from cmu-delphi/chng-dv
krivard Dec 2, 2020
22e2d59
Merge branch 'main' into chc-docs
chinandrew Dec 2, 2020
68f304a
Fix conflicts and new lints
chinandrew Dec 2, 2020
6fc6340
remove trailing whitespace
chinandrew Dec 2, 2020
db299e3
Update CHNG production params to include CLI inputs
krivard Dec 2, 2020
f091bdf
Merge pull request #569 from cmu-delphi/chc-docs
krivard Dec 2, 2020
a808f4f
Merge pull request #592 from cmu-delphi/chng/update-production-params
krivard Dec 2, 2020
d2e5a29
Merge pull request #572 from cmu-delphi/quidelpydocs
krivard Dec 2, 2020
8a734ff
Merge pull request #571 from cmu-delphi/quidel-pydocs
krivard Dec 2, 2020
6ec6824
Update _delphi_utils_python/delphi_utils/archive.py
chinandrew Dec 2, 2020
59a2945
Update _delphi_utils_python/delphi_utils/archive.py
chinandrew Dec 2, 2020
07dfdd2
Update _delphi_utils_python/delphi_utils/archive.py
chinandrew Dec 2, 2020
f1f927f
Update _delphi_utils_python/delphi_utils/archive.py
chinandrew Dec 2, 2020
6d588b5
Timezone issue described in #593
rumackaaron Dec 2, 2020
a51ee4d
Merge pull request #570 from cmu-delphi/utils-docs
krivard Dec 2, 2020
914cc1f
SirCAL default config: Add new signals, missing signals, and update m…
krivard Dec 2, 2020
a74b033
Update params template
rumackaaron Dec 3, 2020
1ed7184
Change Ansible params also
rumackaaron Dec 3, 2020
43320d8
Merge pull request #576 from JedGrabman/dev-duplicate-rows
krivard Dec 3, 2020
4382ab5
change super().__init__() call to get the correct error message printed
sgsmob Dec 3, 2020
484d3aa
move check increment to outside the loop:
sgsmob Dec 3, 2020
c372974
Merge pull request #597 from cmu-delphi/chng-params
krivard Dec 3, 2020
deacc35
Add diff bucket to params
korlaxxalrok Dec 3, 2020
352209e
Merge pull request #598 from cmu-delphi/update-nchs_mortality
korlaxxalrok Dec 3, 2020
09215a4
Add staging api proxy to Ansible inventory
korlaxxalrok Dec 3, 2020
5aac8af
Add new Ansible and template
korlaxxalrok Dec 3, 2020
ef74971
Add step to Jenkinsfile, update file name
korlaxxalrok Dec 3, 2020
787c28a
Add specific remote user for this playbook
korlaxxalrok Dec 3, 2020
16b5532
Merge pull request #596 from cmu-delphi/sircal/add-new-signals
krivard Dec 3, 2020
3beda49
Merge pull request #595 from cmu-delphi/chng-time
krivard Dec 3, 2020
7fb09b6
Merge pull request #578 from sgsmob/validator
krivard Dec 3, 2020
e01ac36
Update ansible/templates/staging-api-match-list.j2
korlaxxalrok Dec 3, 2020
659e19a
Update signal list
korlaxxalrok Dec 3, 2020
3f1571e
Accept changes
korlaxxalrok Dec 3, 2020
df6e13b
Merge pull request #599 from cmu-delphi/add-ansible-to-set-api-match-…
korlaxxalrok Dec 3, 2020
ff005e8
Update Jenkinsfile, add shell wrapper for Ansible playbook
korlaxxalrok Dec 3, 2020
7296aa8
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Dec 4, 2020
7ef8f0a
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Dec 4, 2020
723b75c
Merge pull request #602 from cmu-delphi/fix-staging-api-deploy
krivard Dec 4, 2020
a2c7709
Fix daily archive differ removing None files
eujing Dec 4, 2020
65d7d53
Fix file permissions
korlaxxalrok Dec 4, 2020
4409fd8
change name of unsuppressed errors
sgsmob Dec 4, 2020
fabb50b
change polarity of if/else to be positive
sgsmob Dec 4, 2020
9e3b957
Merge pull request #604 from cmu-delphi/fix-staging-api-deploy
krivard Dec 4, 2020
82fe76d
Merge pull request #588 from sgsmob/validator_combos
krivard Dec 4, 2020
e1546d9
Merge pull request #603 from cmu-delphi/fix-nchs_mortality
krivard Dec 4, 2020
be1750a
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Dec 5, 2020
27c3a79
add_raised_warning documentation
sgsmob Dec 5, 2020
da71d08
duplicate rows to use report
sgsmob Dec 5, 2020
a8ca165
tests for reports
sgsmob Dec 5, 2020
acf2aef
Merge pull request #589 from sgsmob/validation_report
krivard Dec 7, 2020
b2bc18b
Add structured logger for pipelines.
benjaminysmith Dec 7, 2020
4694f8e
Tweak doc based on lint checks
benjaminysmith Dec 7, 2020
22bf73b
Add examples to pydoc
benjaminysmith Dec 8, 2020
0525a97
Merge pull request #607 from benjaminysmith/SirCAL
krivard Dec 8, 2020
c5aa2cd
Add HHS mappings
chinandrew Dec 8, 2020
3bac59a
Remove unnecessary cols
chinandrew Dec 8, 2020
1357f24
Add hhs to utils
chinandrew Dec 8, 2020
d8b6ab6
make crosswalk init less verbose
chinandrew Dec 8, 2020
90aafdd
rename to hhs
chinandrew Dec 8, 2020
e0d1149
Add structured logging to SirCAL
benjaminysmith Dec 9, 2020
e9a69e2
Tweak formatting
benjaminysmith Dec 9, 2020
c02fcec
update dtype
chinandrew Dec 9, 2020
f7d0fd8
Merge branch 'add-hhs' into add-hhs-to-utils
chinandrew Dec 9, 2020
67b45a0
rename hhs
chinandrew Dec 9, 2020
8b02dbd
Merge branch 'add-hhs-to-utils' into dv-hhs-nation
chinandrew Dec 9, 2020
588f805
Add hhs and nation
chinandrew Dec 9, 2020
9b9db3d
Fix dtype for csv import
chinandrew Dec 9, 2020
20612a0
Merge pull request #612 from benjaminysmith/SirCAL
krivard Dec 9, 2020
8391b26
Merge pull request #609 from cmu-delphi/add-hhs
krivard Dec 9, 2020
188c3ce
Merge pull request #610 from cmu-delphi/add-hhs-to-utils
krivard Dec 9, 2020
40aa759
Fix bad mapping
chinandrew Dec 9, 2020
7672030
Merge pull request #619 from cmu-delphi/fix-bad-merge
krivard Dec 9, 2020
f3cbe59
Merge branch 'main' into dv-hhs-nation
chinandrew Dec 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ git checkout -b dev-my-feature-branch

### Creating your indicator

Create a directory for your new indicator by making a copy of `_template_r` or `_template_python` depending on the programming language you intend to use. The template copies of `README.md` and `REVIEW.md` include the minimum requirements for code structure, documentation, linting, testing, and method of configuration. Beyond that, we don't have any established restrictions on implementation; you can look at other existing indicators see some examples of code layout, organization, and general approach.
Create a directory for your new indicator by making a copy of `_template_r` or `_template_python` depending on the programming language you intend to use. If using Python, add the name of the directory to the list found in `jobs > build > strategy > matrix > packages` in `.github/workflows/python-ci.yml`, which will enable automated checks for your indicator when you make PRs. The template copies of `README.md` and `REVIEW.md` include the minimum requirements for code structure, documentation, linting, testing, and method of configuration. Beyond that, we don't have any established restrictions on implementation; you can look at other existing indicators see some examples of code layout, organization, and general approach.

- Consult your peers with questions! :handshake:

Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ assignees: 'benjaminysmith'

<!-- relevant for most work -->

- [ ] API [documentation](https://github.com/cmu-delphi/delphi-epidata/tree/main/docs/api) and/or [changelog](https://github.com/cmu-delphi/delphi-epidata/blob/main/docs/api/covidcast_changelog.md)
- [ ] API [documentation](https://github.com/cmu-delphi/delphi-epidata/blob/main/docs/api/covidcast-signals/_source-template.md) and/or [changelog](https://github.com/cmu-delphi/delphi-epidata/blob/main/docs/api/covidcast_changelog.md)
- [ ] API mailing list notification

<!-- relevant for new signals -->

- [ ] Statistical review (usually [correlations](https://github.com/cmu-delphi/covidcast/tree/main/docs/R-notebooks))
- [ ] Signal / source name review (usually [Roni](https://docs.google.com/document/d/10hGd4Evce4lJ4VkWaQEKFQxvmw2P4xyYGtIAWF52Sf8/edit?usp=sharing))
- [ ] Verify licensing terms and any applicable DUA restrictions

<!-- relevant for new map signals -->

Expand Down
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### Description
Type of change (bug fix, new feature, etc), brief description, and motivation for these changes.

### Changelog
Itemize code/test/documentation changes and files added/removed.
- change1
- change2

### Fixes
- Fixes #(issue)
42 changes: 42 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: [ main, prod ]
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
branches: [ main, prod ]

jobs:
build:
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
strategy:
matrix:
packages: [_delphi_utils_python, cdc_covidnet, changehc, claims_hosp, combo_cases_and_deaths, google_symptoms, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts]
defaults:
run:
working-directory: ${{ matrix.packages }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
pip install pylint pytest pydocstyle wheel
- name: Install
run: |
make install
- name: Lint
if: ${{ matrix.packages != 'claims_hosp' }}
run: |
make lint
- name: Test
run: |
make test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,7 @@ venv.bak/
.retry
.indicators-ansible-vault-pass
indicators-ansible-vault-pass

# testing_utils
testing_utils/cache
testing_utils/*.csv
92 changes: 42 additions & 50 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,81 +1,73 @@
#!groovy

// import shared library: https://github.com/cmu-delphi/jenkins-shared-library
// Import shared lib.
@Library('jenkins-shared-library') _

pipeline {
/*
Declare variables.
- indicator_list should contain all the indicators to handle in the pipeline.
- Keep in sync with '.github/workflows/python-ci.yml'.
- TODO: #527 Get this list automatically from python-ci.yml at runtime.
*/
def indicator_list = ["cdc_covidnet", "changehc", "claims_hosp", "combo_cases_and_deaths", "google_symptoms", "jhu", "nchs_mortality", "quidel", "quidel_covidtest", "safegraph", "safegraph_patterns", "usafacts"]
def build_package = [:]
def deploy_staging = [:]
def deploy_production = [:]

pipeline {
agent any

stages {

stage ("Environment") {
stage('Build and Package') {
when {
anyOf {
branch "deploy-*";
changeRequest target: "deploy-*", comparator: "GLOB"
}
branch "main";
}
steps {
script {
// Get the indicator name from the pipeline env.
if ( env.CHANGE_TARGET ) {
INDICATOR = env.CHANGE_TARGET.replaceAll("deploy-", "")
}
else if ( env.BRANCH_NAME ) {
INDICATOR = env.BRANCH_NAME.replaceAll("deploy-", "")
}
else {
INDICATOR = ""
indicator_list.each { indicator ->
build_package[indicator] = {
sh "jenkins/build-and-package.sh ${indicator}"
}
}
}
}
}

stage('Build') {
when {
changeRequest target: "deploy-*", comparator: "GLOB"
}
steps {
sh "jenkins/${INDICATOR}-jenkins-build.sh"
}
}

stage('Test') {
when {
changeRequest target: "deploy-*", comparator: "GLOB"
}
steps {
sh "jenkins/${INDICATOR}-jenkins-test.sh"
parallel build_package
}
}
}

stage('Package') {
stage('Deploy staging') {
when {
changeRequest target: "deploy-*", comparator: "GLOB"
branch "main";
}
steps {
sh "jenkins/${INDICATOR}-jenkins-package.sh"
script {
indicator_list.each { indicator ->
deploy_staging[indicator] = {
sh "jenkins/deploy-staging.sh ${indicator}"
}
}
parallel deploy_staging
}
sh "jenkins/deploy-staging-api-match-list.sh"
}
}

stage('Deploy') {
stage('Deploy production') {
when {
branch "deploy-*"
branch "prod";
}
steps {
sh "jenkins/${INDICATOR}-jenkins-deploy.sh"
script {
indicator_list.each { indicator ->
deploy_production[indicator] = {
sh "jenkins/deploy-production.sh ${indicator}"
}
}
parallel deploy_production
}
}
}
}

post {
always {
script {
/*
Use slackNotifier.groovy from shared library and provide current
build result as parameter.
*/
// Use slackNotifier.groovy from shared lib.
slackNotifier(currentBuild.currentResult)
}
}
Expand Down
22 changes: 18 additions & 4 deletions _delphi_utils_python/.pylintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
[DESIGN]

min-public-methods=1
[MESSAGES CONTROL]

disable=logging-format-interpolation,
too-many-locals,
too-many-arguments,
# Allow pytest functions to be part of a class.
no-self-use,
# Allow pytest classes to have one test.
too-few-public-methods

[MESSAGES CONTROL]
[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_]*

[DESIGN]

disable=R0801, C0330, E1101, E0611, C0114, C0116, C0103, R0913, R0914, W0702
# Don't complain about pytest "unused" arguments.
ignored-argument-names=(_.*|run_as_module)
24 changes: 24 additions & 0 deletions _delphi_utils_python/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.PHONY = venv, lint, test, clean

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

venv:
python3.8 -m venv env

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

lint:
. env/bin/activate; \
pylint $(dir); \
pydocstyle $(dir)

test:
. env/bin/activate ;\
(cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing)

clean:
rm -rf env
rm -f params.json
71 changes: 66 additions & 5 deletions _delphi_utils_python/data_proc/geomap/geo_data_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
FIPS_MSA_OUT_FILENAME = "fips_msa_table.csv"
FIPS_HRR_OUT_FILENAME = "fips_hrr_table.csv"
FIPS_ZIP_OUT_FILENAME = "fips_zip_table.csv"
FIPS_HHS_FILENAME = "fips_hhs_table.csv"
FIPS_POPULATION_OUT_FILENAME = "fips_pop.csv"

ZIP_HSA_OUT_FILENAME = "zip_hsa_table.csv"
Expand All @@ -42,8 +43,9 @@
ZIP_MSA_OUT_FILENAME = "zip_msa_table.csv"
ZIP_POPULATION_OUT_FILENAME = "zip_pop.csv"
ZIP_STATE_CODE_OUT_FILENAME = "zip_state_code_table.csv"
ZIP_HHS_FILENAME = "zip_hhs_table.csv"
STATE_OUT_FILENAME = "state_codes_table.csv"
STATE_HHS_OUT_FILENAME = "state_code_hhs_region_number_table.csv"
STATE_HHS_OUT_FILENAME = "state_code_hhs_table.csv"
JHU_FIPS_OUT_FILENAME = "jhu_uid_fips_table.csv"


Expand Down Expand Up @@ -217,6 +219,12 @@ def create_jhu_uid_fips_crosswalk():
{"jhu_uid": "63072999", "fips": "72000", "weight": 1.0},
]
)
cruise_ships = pd.DataFrame(
[
{"jhu_uid": "84088888", "fips": "88888", "weight": 1.0},
{"jhu_uid": "84099999", "fips": "99999", "weight": 1.0},
]
)

jhu_df = (
pd.read_csv(JHU_FIPS_URL, dtype={"UID": str, "FIPS": str})
Expand All @@ -234,7 +242,7 @@ def create_jhu_uid_fips_crosswalk():
# Drop the JHU UIDs that were hand-modified
dup_ind = jhu_df["jhu_uid"].isin(
pd.concat(
[hand_additions, unassigned_states, out_of_state, puerto_rico_unassigned]
[hand_additions, unassigned_states, out_of_state, puerto_rico_unassigned, cruise_ships]
)["jhu_uid"].values
)
jhu_df.drop(jhu_df.index[dup_ind], inplace=True)
Expand Down Expand Up @@ -326,12 +334,12 @@ def create_state_hhs_crosswalk():
hhs_state_pairs.append((9, "Northern Mariana Islands"))

# Make dataframe
hhs_df = pd.DataFrame(hhs_state_pairs, columns=["hhs_region_number", "state_name"])
hhs_df["hhs_region_number"] = hhs_df["hhs_region_number"].astype(str)
hhs_df = pd.DataFrame(hhs_state_pairs, columns=["hhs", "state_name"])
hhs_df["hhs"] = hhs_df["hhs"].astype(str)

(
ss_df.merge(hhs_df, on="state_name", how="left")
.dropna()[["state_code", "hhs_region_number"]]
.dropna()[["state_code", "hhs"]]
.to_csv(join(OUTPUT_DIR, STATE_HHS_OUT_FILENAME), index=False)
)

Expand Down Expand Up @@ -391,6 +399,7 @@ def create_fips_population_table():
df_pr = df_pr.groupby("fips").sum().reset_index()
df_pr = df_pr[~df_pr["fips"].isin(census_pop["fips"])]
census_pop_pr = pd.concat([census_pop, df_pr])

census_pop_pr.to_csv(join(OUTPUT_DIR, FIPS_POPULATION_OUT_FILENAME), index=False)


Expand Down Expand Up @@ -524,6 +533,56 @@ def derive_zip_to_state_code():
)


def derive_fips_hhs_crosswalk():
"""
Builds a crosswalk between FIPS county codes and HHS regions.
"""
if not isfile(join(OUTPUT_DIR, STATE_HHS_OUT_FILENAME)):
create_state_hhs_crosswalk()
if not isfile(join(OUTPUT_DIR, FIPS_POPULATION_OUT_FILENAME)):
create_fips_population_table()

fips_pop = pd.read_csv(
join(OUTPUT_DIR, FIPS_POPULATION_OUT_FILENAME), dtype={"fips": str, "pop": int}
)
state_hhs = pd.read_csv(
join(OUTPUT_DIR, STATE_HHS_OUT_FILENAME),
dtype={"state_code": str, "hhs": str},
)

fips_pop["state_code"] = fips_pop["fips"].str[:2]
(
fips_pop.merge(state_hhs, on="state_code", how="left")
.drop(columns=["state_code", "pop"])
.to_csv(join(OUTPUT_DIR, FIPS_HHS_FILENAME), index=False)
)


def derive_zip_hhs_crosswalk():
"""
Builds a crosswalk between zip code and HHS regions.
"""
if not isfile(join(OUTPUT_DIR, STATE_HHS_OUT_FILENAME)):
create_state_hhs_crosswalk()
if not isfile(join(OUTPUT_DIR, ZIP_STATE_CODE_OUT_FILENAME)):
derive_zip_to_state_code()

zip_state = pd.read_csv(
join(OUTPUT_DIR, ZIP_STATE_CODE_OUT_FILENAME),
dtype={"zip": str, "pop": int, "state_code": str}
)
state_hhs = pd.read_csv(
join(OUTPUT_DIR, STATE_HHS_OUT_FILENAME),
dtype={"state_code": str, "hhs": str},
)

(
zip_state.merge(state_hhs, on="state_code", how="left")
.drop(columns=["state_code", "state_id", "state_name"])
.to_csv(join(OUTPUT_DIR, ZIP_HHS_FILENAME), index=False)
)


if __name__ == "__main__":
create_fips_zip_crosswalk()
create_zip_hsa_hrr_crosswalk()
Expand All @@ -538,3 +597,5 @@ def derive_zip_to_state_code():
derive_zip_to_state_code()
derive_fips_state_crosswalk()
derive_zip_population_table()
derive_fips_hhs_crosswalk()
derive_zip_hhs_crosswalk()
Loading