Skip to content

Refactor doctor visits to use geo utils package #401

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

Merged
merged 914 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
914 commits
Select commit Hold shift + click to select a range
b9a788f
uncommented code for pulling raw data
jingjtang Aug 18, 2020
ad1d4d5
Added code for using geomap utils
Aug 28, 2020
e778f62
Merge branch 'main' into nchs_mortality
Aug 31, 2020
aaa04ac
added code for uploading diffs
Aug 31, 2020
d8c7019
Merge pull request #234 from cmu-delphi/diff-uploads-usafacts
krivard Aug 31, 2020
fbe27a8
Merge latest from main
korlaxxalrok Aug 31, 2020
130a9a7
Minor changes
vishakha1812 Sep 1, 2020
b450f42
Minor change in update_sensor.py
vishakha1812 Sep 2, 2020
a6e07b8
Update test_update_sensor.py
vishakha1812 Sep 2, 2020
008bd9b
Merge pull request #250 from cmu-delphi/wip_emr
krivard Sep 3, 2020
3553e00
Merge pull request #247 from cmu-delphi/fix_ght_pulling
krivard Sep 3, 2020
a7a8e6a
Merge pull request #263 from cmu-delphi/deploy-google_health
krivard Sep 3, 2020
3988a3b
Set up production necessities for deploying Safegraph (#259)
korlaxxalrok Sep 3, 2020
c6bafc0
Finalize production setup for deploying Safegraph (#264)
korlaxxalrok Sep 4, 2020
55a41fd
Merge pull request #266 from cmu-delphi/deploy-safegraph
krivard Sep 8, 2020
96e9406
diff uploads
vishakha1812 Sep 10, 2020
9b48cce
[sir-complainsalot] Add grace period and dry run
krivard Sep 9, 2020
707ce49
remove return statement
vishakha1812 Sep 10, 2020
dd20817
remove old static file that is no longer used
huisaddison Sep 11, 2020
6fda1b2
hotfix for nyc boroughs
huisaddison Sep 11, 2020
d30ab47
Skip linting because of an unknown issue with (seemingly) Jenkins
korlaxxalrok Sep 11, 2020
5f3d8f0
Merge pull request #274 from cmu-delphi/test-and-delete/jhu-nyc-support
krivard Sep 11, 2020
8bdadde
Merge pull request #276 from cmu-delphi/deploy-jhu
krivard Sep 11, 2020
3a8e719
add code
Sep 16, 2020
7c08761
Merge branch 'run-quidel' of https://github.com/cmu-delphi/covidcast-…
Sep 16, 2020
2c7a6e4
update unit tests
Sep 16, 2020
330cb66
switched to shallow copy
Sep 16, 2020
41ca43b
update documentation
Sep 16, 2020
7362d48
Add max_borrow_obs
Sep 16, 2020
10e1546
update documentation
Sep 16, 2020
0c3366f
Copied .github directory from www-covidcast
nmdefries Sep 16, 2020
4324431
Removed pull request template and contributing info. Added data quali…
nmdefries Sep 16, 2020
6c02d0f
Two archiving, updated tests
eujing Sep 16, 2020
e81fe16
Recovered county level & Commented out unreleased signals
Sep 16, 2020
2740c26
Update params.json.template
vishakha1812 Sep 16, 2020
a74b944
Update params.json.template
vishakha1812 Sep 16, 2020
de16118
Update test_update_sensor.py
vishakha1812 Sep 16, 2020
a42155a
Update the title for DETAILS
jingjtang Sep 16, 2020
7627876
Mocked S3 for update_sensor
eujing Sep 16, 2020
8e6c337
Removed bug_report template. Updated other templates to have more detail
nmdefries Sep 17, 2020
98652c6
Removed Severity section from data_quality template
nmdefries Sep 17, 2020
3f64649
Merge pull request #269 from cmu-delphi/diff_emr
krivard Sep 18, 2020
eafba6b
Testing for mon vs non-mon behavior
eujing Sep 18, 2020
5e3796b
Added used folders
eujing Sep 18, 2020
0c6b4ad
Code and documentation for producing geo mapping files
krivard Sep 18, 2020
b08ed3f
Static geo mapping files
krivard Sep 18, 2020
0c6b422
Updated geo mapping/aggregation utility
krivard Sep 18, 2020
5394dcb
Merge pull request #277 from cmu-delphi/run-quidel
krivard Sep 18, 2020
e81102f
Merge pull request #279 from cmu-delphi/add-issue-templates
krivard Sep 18, 2020
528ef2e
Remove 8XXXX and 9XXYY, YY > 56 JHU FIPS codes, updated Puerto Rico
dshemetov Sep 18, 2020
b564e9f
Code review updates:
dshemetov Sep 22, 2020
149e16d
Update _delphi_utils_python/data_proc/geomap/geo_data_proc.py
dshemetov Sep 22, 2020
eafdf13
Update _delphi_utils_python/delphi_utils/geomap.py
dshemetov Sep 22, 2020
e16d51d
Replace assert with ValueError exception
dshemetov Sep 22, 2020
fde9525
Add doc string for megacounty code
dshemetov Sep 22, 2020
baf0c14
Link todo list to github issues
dshemetov Sep 22, 2020
9c8e1b3
Taking ownership in the README
dshemetov Sep 22, 2020
2c3de60
Add crosswalk sanity checks to test_geomap
dshemetov Sep 23, 2020
806db8a
Merge branch 'rf_geo_refactor' of https://github.com/cmu-delphi/covid…
dshemetov Sep 23, 2020
c26743e
Uncomment work functions
dshemetov Sep 24, 2020
5fbff78
Code review updates
dshemetov Sep 24, 2020
655f21d
String conversion check coverage
dshemetov Sep 24, 2020
7d34fb9
Two final features
dshemetov Sep 25, 2020
b88e89f
Part of previous commit
dshemetov Sep 25, 2020
9a0eb10
Final set of tests:
dshemetov Sep 25, 2020
0025cb7
template files
mariajahja Sep 28, 2020
b65d1ff
claims based hosp indicator package
mariajahja Sep 28, 2020
ad4a48c
unit tests
mariajahja Sep 28, 2020
cb2e025
review, addl doc, pylint, and minor fixes
mariajahja Sep 28, 2020
f4af917
code review fixes, change signal name
mariajahja Sep 28, 2020
4a75ba3
Release under MIT license
krivard Sep 29, 2020
9512675
Split off contribution guide; add context to README
krivard Sep 29, 2020
549840e
Add sections on branches, issues, and project boards
krivard Sep 29, 2020
58806ad
Add license information
krivard Sep 29, 2020
669d01b
Moved contribution guide to where github expects it
krivard Sep 29, 2020
98b1992
Update LICENSE with correct copyright date
krivard Sep 30, 2020
e42e566
Update README.md
RoniRos Sep 30, 2020
5ffbaa7
Fixed a spelling error
jingjtang Sep 30, 2020
e3e80af
Small edits to README
ryantibs Sep 30, 2020
f06e085
Complete national in todo, add dropna=True/False tests
dshemetov Sep 30, 2020
9f0c228
Merge pull request #288 from cmu-delphi/dev/public-release
krivard Sep 30, 2020
8689a8a
Fix too long lines
dshemetov Sep 30, 2020
5f7c28c
A few comment fixes and additions, minor change of "is" to "=="
dshemetov Oct 1, 2020
9a3ffe9
Linting fixes for the tests
dshemetov Oct 1, 2020
2ddd9b1
Update EMR hosp geomapper with new changes
dshemetov Oct 1, 2020
eccc72b
Emr hosp update that should've been in previous commit
dshemetov Oct 1, 2020
9aacec5
Update the jhu indicator with geomapper changes
dshemetov Oct 1, 2020
ef426f5
smoothed_claims_covid19 -> smoothed_covid19_from_claims
mariajahja Oct 1, 2020
0cfe78b
A few minor changes:
dshemetov Oct 1, 2020
cb171dc
Merge branch 'rf_geo_refactor' of github.com:cmu-delphi/covidcast-ind…
dshemetov Oct 1, 2020
8c9a143
Remove unneeded numpy import
dshemetov Oct 1, 2020
3ab1871
Small update to README
dshemetov Oct 1, 2020
64eb227
Merge pull request #285 from cmu-delphi/dev-hosp-claims
krivard Oct 2, 2020
4e6ce63
Modify national level code support:
dshemetov Oct 6, 2020
21cb473
Add archive bypass flag to JHU
dshemetov Oct 6, 2020
78ffb9a
Merge branch 'rf_geo_refactor' of github.com:cmu-delphi/covidcast-ind…
dshemetov Oct 6, 2020
4b8ef09
refactor archive tests to use common data
sgsmob Oct 6, 2020
530aba3
ability to run S3 archive as module
sgsmob Oct 6, 2020
4eba4e1
lint the test_archive file
sgsmob Oct 6, 2020
90ba3d6
Important fixes to JHU hand additions:
dshemetov Oct 7, 2020
7b31d71
add test for GitArchiveDiffer.run()
sgsmob Oct 7, 2020
0e0bfaf
increase comment coverage in test_run tests
sgsmob Oct 7, 2020
62b0376
increase comment coverage in test_run tests
sgsmob Oct 7, 2020
64fb9b7
Add indicator testing notebook and geocoding utility demo notebook
dshemetov Oct 7, 2020
ade3feb
Added missing test directory
eujing Oct 7, 2020
b830cc8
Remove trailing whitespace
krivard Oct 7, 2020
8867c14
Merge pull request #217 from cmu-delphi/rf_geo_refactor
krivard Oct 7, 2020
bcda25f
Reduce df memory usage, and vectorize more
eujing Oct 7, 2020
650c12e
Merge pull request #297 from cmu-delphi/main
krivard Oct 7, 2020
4a58a16
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Oct 8, 2020
547fab8
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Oct 8, 2020
8d77066
Fix docs typo in _delphi_utils_python/delphi_utils/archive.py
krivard Oct 9, 2020
8678fba
Merge pull request #295 from sgsmob/main
krivard Oct 9, 2020
c687428
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Oct 9, 2020
309fb79
Fix JHU bug that renamed fips to county in receiving
dshemetov Oct 9, 2020
93b5ba2
Merge pull request #304 from cmu-delphi/jhu_fips_county_fix
krivard Oct 9, 2020
d357d01
Merge pull request #305 from cmu-delphi/deploy-jhu
krivard Oct 9, 2020
81be4f4
update code for geomapping using utils
Oct 12, 2020
eec5f50
fix typo in documentation
huisaddison Oct 12, 2020
0c502f7
fix typo in documentation
huisaddison Oct 12, 2020
37edbf5
fix typo in documentation
huisaddison Oct 12, 2020
3a0f9a9
fix typo in documentation
huisaddison Oct 12, 2020
a2d5768
fix typo in documentation
huisaddison Oct 12, 2020
ed4c306
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Oct 12, 2020
6a616c4
refactor safegraph.process to pave the way for multifile processing
sgsmob Oct 12, 2020
45307ad
tests for finding the file names in the past week
sgsmob Oct 12, 2020
d78ee3a
added unit tests for bad test files
Oct 13, 2020
c164a6d
fixed linter errors
Oct 13, 2020
b7ec16d
added description for data versioning
Oct 13, 2020
efdf3fd
testing process_window
sgsmob Oct 13, 2020
7ed90e1
comments and formatting for pylint compliance
sgsmob Oct 13, 2020
d0151e8
docstring updates
sgsmob Oct 13, 2020
8918ada
lint compliance in test cases
sgsmob Oct 13, 2020
6b24185
move location of VALID_GEO_RESOLUTIONS
sgsmob Oct 13, 2020
3a2adcb
added test data for bad cases
Oct 13, 2020
19ecdbc
Clarified data versioning documentation
eujing Oct 13, 2020
cf6f4c1
Merge pull request #287 from cmu-delphi/sir-dryrun
krivard Oct 13, 2020
10d3711
file existence checking in process
sgsmob Oct 13, 2020
8604ec1
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Oct 13, 2020
4dddf0f
updated code for adding a test case where some necessary cols are mis…
Oct 13, 2020
e25d4c4
Merge branch 'nchs_mortality' of https://github.com/cmu-delphi/covidc…
Oct 13, 2020
4999ced
added data for the new test case
Oct 13, 2020
8c665c6
refactor CSV name
sgsmob Oct 13, 2020
7ff30ac
Extend geocode utility to actually support the mappings:
dshemetov Oct 13, 2020
e0ed614
add test for process
sgsmob Oct 14, 2020
8db87c5
fix line too long
sgsmob Oct 14, 2020
3d8c331
Add column renaming line in state conversion
dshemetov Oct 14, 2020
3b6d139
Geocode updates:
dshemetov Oct 14, 2020
8a1112d
Refactor to Geomapper function
chinandrew Oct 14, 2020
d6f43ae
Change na behavior to be consistent with previous implementation
chinandrew Oct 15, 2020
d8c491a
Remove unused variable
chinandrew Oct 15, 2020
e6502e5
remove extraneous prints
sgsmob Oct 15, 2020
922432b
documentation on process_file wrapper
sgsmob Oct 15, 2020
4debc31
fix broken usafacts tests to read from the proper directories
sgsmob Oct 15, 2020
352abe6
Initial CHC commit
rumackaaron Oct 15, 2020
4563d1f
Merge branch 'main' into safegraph_patterns
Oct 16, 2020
1633036
uncomment code for using geo utils
Oct 16, 2020
6358975
fixed errors in geo mapping functions
Oct 16, 2020
0909ca7
fixed errors in geo mapping function and updated the unit tests
Oct 16, 2020
c4808fa
Merge branch 'safegraph_patterns' of https://github.com/cmu-delphi/co…
Oct 16, 2020
424ceb4
deleted extra keyword argument in process
Oct 16, 2020
893aafc
Update comment on column assignment
chinandrew Oct 16, 2020
3495bee
added a dry-run mode
Oct 16, 2020
7b7934b
updated unit tests
Oct 16, 2020
986e585
fixed the dir to sample data
Oct 16, 2020
b0ae5bb
added static folder and params.json for unit tests
Oct 16, 2020
06e4b12
replace deprecated functions
chinandrew Oct 16, 2020
f6e7b78
Remove uppercase
chinandrew Oct 16, 2020
a164e25
Remove print
chinandrew Oct 16, 2020
021cbb4
Remove zips static file
chinandrew Oct 16, 2020
707535e
Fix argument
chinandrew Oct 17, 2020
4ce4630
fix whitespacing for linter
huisaddison Oct 17, 2020
3d76de4
remove unused imports
huisaddison Oct 17, 2020
8091221
Add a gap detector to Sir Complainsalot
capnrefsmmat Oct 17, 2020
849263c
Formatting fix
capnrefsmmat Oct 17, 2020
39df546
Add hospital admissions, USAFacts to Sir Complainsalot
capnrefsmmat Oct 17, 2020
51c0c03
make new receiving directory in test directory
sgsmob Oct 19, 2020
e7b0b28
Removed redundant geo_maps file
rumackaaron Oct 19, 2020
6798c34
Added tests
rumackaaron Oct 19, 2020
0befb53
Merge pull request #311 from cmu-delphi/geo_refactor_cdccovidnet
krivard Oct 19, 2020
261503a
Merge pull request #225 from cmu-delphi/safegraph_patterns
krivard Oct 19, 2020
7c8e702
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Oct 19, 2020
e1f96f9
Fix date_col docstring, add None option to date_col, add test for tha…
dshemetov Oct 19, 2020
cbfd2ac
Code cleanup and comments
rumackaaron Oct 19, 2020
90a22c4
don't overwrite files
sgsmob Oct 19, 2020
5117b9d
remove unused import
sgsmob Oct 19, 2020
509f4d7
substring testing with 'in'
sgsmob Oct 19, 2020
9d6394a
update tests to process to include wip and 7d_avg signals
sgsmob Oct 19, 2020
470e95d
added wip signals to params file
sgsmob Oct 19, 2020
0783ebd
Merge pull request #327 from cmu-delphi/sir-gapdetector
krivard Oct 19, 2020
5859982
Remove duplicated test
dshemetov Oct 19, 2020
ee49484
Merge pull request #309 from sgsmob/weekday
krivard Oct 20, 2020
bb8e17e
Merge pull request #331 from cmu-delphi/deploy-safegraph
krivard Oct 20, 2020
0115538
Issue template for feature release
krivard Oct 20, 2020
44be069
Change auto-assign of release tasks
krivard Oct 20, 2020
3a208b0
Remove uszips.csv and params.json
rumackaaron Oct 20, 2020
a1a1b50
Temporarily skip linting in Jenkins
korlaxxalrok Oct 20, 2020
b0bb289
Merge pull request #314 from sgsmob/fix_usa_tests
krivard Oct 20, 2020
317a4d5
Merge pull request #334 from cmu-delphi/deploy-usafacts
krivard Oct 20, 2020
8ad5128
Enforce and test filenaming
rumackaaron Oct 20, 2020
e57673a
Revert "Add 7-day average of each signal to Safegraph indicator"
krivard Oct 20, 2020
283e8c2
Merge pull request #336 from cmu-delphi/revert-309-weekday
krivard Oct 20, 2020
b21252f
Merge pull request #322 from cmu-delphi/geo_refactor_claimshosp
krivard Oct 20, 2020
a2fc87b
Code review suggestions
rumackaaron Oct 20, 2020
9e46bc2
Make combo cases/deaths robust to source outages
krivard Oct 20, 2020
3d0e5c5
remove wildcard imports from test
chinandrew Oct 21, 2020
12aac02
Merge pull request #349 from cmu-delphi/fix-test-imports
krivard Oct 21, 2020
6008371
Merge pull request #320 from cmu-delphi/changehc
krivard Oct 21, 2020
17bc7ab
Download CHC files via sftp
rumackaaron Oct 21, 2020
e4343fc
Modify signal name
rumackaaron Oct 21, 2020
84422b6
Remove static file
chinandrew Oct 21, 2020
6da3598
Add docstrings to test functions
krivard Oct 22, 2020
5994794
Apply suggestions from review
krivard Oct 22, 2020
6e3164d
Change states to lowercase
chinandrew Oct 22, 2020
f4b4eb4
Remove print statement
chinandrew Oct 22, 2020
2904c1d
Merge pull request #343 from cmu-delphi/fix/combo-robustify
krivard Oct 22, 2020
d243e3f
Revert "Revert "Add 7-day average of each signal to Safegraph indicat…
krivard Oct 22, 2020
d266d21
migrate safegraph.run back onto using functools.partial
sgsmob Oct 21, 2020
47a9a26
fix output file format from YYYY-MM-DD to YYYYMMDD
sgsmob Oct 21, 2020
936721e
Merge branch 'krivard/fix-weekday' of github.com:cmu-delphi/covidcast…
sgsmob Oct 22, 2020
638c578
Update comment in download_ftp_files.py
rumackaaron Oct 22, 2020
f03aef5
Merge branch 'main' of github.com:cmu-delphi/covidcast-indicators int…
sgsmob Oct 23, 2020
fee7222
add a test for delphi_safegraph.run_module
sgsmob Oct 23, 2020
7f701b4
bring safegraph_patterns more structurally in line with safegraph
sgsmob Oct 23, 2020
67bc0a9
lint and other style cleanups
sgsmob Oct 23, 2020
571d51d
New signal name
rumackaaron Oct 23, 2020
f115859
Code review suggestions
rumackaaron Oct 23, 2020
6d789d8
Merge branch 'changehc' of https://github.com/cmu-delphi/covidcast-in…
rumackaaron Oct 23, 2020
b310fd9
Corrected path to check for previous download
rumackaaron Oct 23, 2020
b27f6da
Add download tests
rumackaaron Oct 26, 2020
c8fe35f
Modify test params
rumackaaron Oct 26, 2020
7f07c41
Merge pull request #233 from cmu-delphi/nchs_mortality
krivard Oct 26, 2020
c9fea0a
Merge pull request #310 from cmu-delphi/geoutil_state_extension
krivard Oct 26, 2020
0a7865e
Merge pull request #354 from cmu-delphi/lowercase-cdcnet
krivard Oct 26, 2020
869a8d6
Update docs
chinandrew Oct 27, 2020
b485327
Update docs
chinandrew Oct 27, 2020
7248fb4
Improve linting
rumackaaron Oct 27, 2020
357f207
clarify bool parameter handling
sgsmob Oct 27, 2020
4aba282
remove unnecessary import in test
sgsmob Oct 27, 2020
7e3e516
update bool handling for safegraph_patterns too
sgsmob Oct 27, 2020
60b4a79
Add exception specificaiton
chinandrew Oct 28, 2020
2f8d4df
Merge pull request #391 from cmu-delphi/add-exceptions
krivard Oct 28, 2020
ddadab2
Merge pull request #363 from sgsmob/aws_credentials
krivard Oct 28, 2020
38a5a10
Merge pull request #378 from cmu-delphi/sg-patterns-docs
krivard Oct 28, 2020
d947887
Merge pull request #352 from cmu-delphi/changehc
krivard Oct 28, 2020
d2a5a23
Merge pull request #376 from cmu-delphi/nchs_mortality-docs
krivard Oct 28, 2020
9eb518c
Merge branch 'main' into dv-package
chinandrew Oct 28, 2020
32e044b
update county to msa
chinandrew Oct 28, 2020
776b24b
county to state and hrr
chinandrew Oct 28, 2020
bf34663
Add megacounty map
chinandrew Oct 28, 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
  •  
  •  
  •  
119 changes: 119 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Contributing to COVIDcast indicator pipelines

## Branches

* `main`

The primary/authoritative branch of this repository is called `main`, and contains up-to-date code and supporting libraries. This should be your starting point when creating a new indicator. It is protected so that only reviewed pull requests can be merged in.

* `deploy-*`

Each automated pipeline has a corresponding branch which automatically deploys to a runtime host which runs the pipeline at a designated time each day. New features and bugfixes are merged into this branch using a pull request, so that our CI system can run the lint and test cycles and make sure the package will run correctly on the runtime host. If an indicator does not have a branch named after it starting with `deploy-`, that means the indicator has not yet been automated, and has a designated human keeper who is responsible for making sure the indicator runs each day -- whether that is manually or using a scheduler like cron is the keeper's choice.

* everything else

All other branches are development branches. We don't enforce a naming policy.

## Issues

Issues are the main communication point when it comes to bugfixes, new features, or other possible changes. The repository has several issue templates that help to structure issues.

If you ensure that each issue deals with a single topic (ie a single new proposed data source, or a single data quality problem), we'll all be less likely to drop subordinate tasks on the floor, but we also recognize that a lot of the people filing issues in this repository are new to large project management and not used to focusing their thoughts in this way. It's okay, we'll all learn and get better together.

Admins will assign issues to one or more people based on balancing expediency, expertise, and team robustness. It may be faster for one person to fix something, but we can reduce the risk of having too many single points of failure if two people work on it together.

## Project Boards

The Delphi Engineering team uses project boards to structure its weekly calls and track active tasks.

Immediate work is tracked on [Release Planning](https://github.com/cmu-delphi/covidcast-indicators/projects/2)

Long-term work and modeling collaborations are tracked on [Refactoring](https://github.com/cmu-delphi/covidcast-indicators/projects/3)


## General workflow for indicators creation and deployment

So, how does one go about developing a pipeline for a new data source?

**tl;dr**

1. Create your new indicator branch from `main`.
2. Build it using the appropriate template, following the guidelines in the included README.md and REVIEW.md files.
3. Make some stuff!
4. When your stuff works, push your `dev-*` branch to remote for review.
5. Consult with a platform engineer for the remaining production setup needs. They will create a branch called `deploy-*` for your indicator.
6. Initiate a pull request against this new branch.
7. Following [the source documentation template](https://github.com/cmu-delphi/delphi-epidata/blob/main/docs/api/covidcast-signals/_source-template.md), create public API documentation for the source. You can submit this as a pull request against the delphi-epidata repository.
8. If your peers like the code, the documentation is ready, and Jenkins approves, deploy your changes by merging the PR.
9. An admin will propagate your successful changes to `main`.
10. Rejoice!

### Starting out

The `main` branch should contain up-to-date code and supporting libraries. This should be your starting point when creating a new indicator.

```shell
# Hint
#
git checkout main
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.

- Consult your peers with questions! :handshake:

Once you have something that runs locally and passes tests you set up your remote branch eventual review and production deployment.

```shell
# Hint
#
git push -u origin dev-my-feature-branch
```

You can then draft public API documentation for people who would fetch this
data from the API. Public API documentation is kept in the delphi-epidata
repository, and there is a [template Markdown
file](https://github.com/cmu-delphi/delphi-epidata/blob/main/docs/api/covidcast-signals/_source-template.md)
that outlines the features that need to be documented. You can create a pull
request to add a new file to `docs/api/covidcast-signals/` for your source. Our
goal is to have public API documentation for the data at the same time as it
becomes available to the public.

### Setting up for review and deployment

Once you have your branch set up you should get in touch with a platform engineer to pair up on the remaining production needs. These include:

- Creating the corresponding `deploy-*` branch in the repo.
- Adding the necessary Jenkins scripts for your indicator.
- Preparing the runtime host with any Automation configuration necessities.
- Reviewing the workflow to make sure it meets the general guidelines and will run as expected on the runtime host.

Once all the last mile configuration is in place you can create a pull request against the correct `deploy-*` branch to initiate the CI/CD pipeline which will build, test, and package your indicator for deployment.

If everything looks ok, you've drafted source documentation, platform engineering has validated the last mile, and the pull request is accepted, you can merge the PR. Deployment will start automatically.

Hopefully it'll be a full on :tada:, after that :crossed_fingers:

If not, circle back and try again.

## Production overview

### Running production code

Currently, the production indicators all live and run on the venerable and perennially useful Delphi primary server (also known generically as "the runtime host").

### Delivering an indicator to the production environment

We use a branch-based git workflow coupled with [Jenkins](https://www.jenkins.io/) and [Ansible](https://www.ansible.com/) to build, test, package, and deploy each indicator individually to the runtime host.

- Jenkins dutifully manages the whole process for us by executing several "stages" in the context of a [CI/CD pipeline](https://dzone.com/articles/learn-how-to-setup-a-cicd-pipeline-from-scratch). Each stage does something unique, building on the previous stage. The stages are:
- Environment - Sets up some environment-specific needs that the other stages depend on.
- Build - Create the Python venv on the Jenkins host.
- Test - Run linting and unit tests.
- Package - Tar and gzip the built environment.
- Deploy - Trigger an Ansible playbook to place the built package onto the runtime host, place any necessary production configuration, and adjust the runtime envirnemnt (if necessary).

There are several additional Jenkins-specific files that will need to be created for each indicator, as well as some configuration additions to the runtime host. It will be important to pair with a platform engineer to prepare the necessary production environment needs, test the workflow, validate on production, and ultimately sign off on a production release.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/data_quality_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Data quality issue
about: Missing data, weird data, broken data
title: ''
labels: 'data quality'
assignees: 'nmdefries'
---

**Actual Behavior:**

<!--Provide a description of the problem and a minimal reproducible example, if relevant. Please include the source and signal names, as well as sample observations, with geo region name, date, and data, demonstrating the problem.-->

When I...

**Expected behavior**

<!--A clear and concise description of what you expected to happen.-->

**Context**

<!--Add any context about the problem here.-->
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Feature release
about: Begin the finishing work for features ready to be included in a release
title: 'Release NEW_THING'
labels: 'release'
assignees: 'benjaminysmith'
---

- [Link to issue]()
- [Link to PR]()
- Proposed release version: <!-- eg 1.12 -->

<!-- Additional information about the feature: -->


<!-- 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 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))

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

- [ ] Visual review
- [ ] [Signal description pop-up text](https://docs.google.com/document/d/1kDqRg8EaI4WQXMaUUbbCGPlsUqEql8kgXCNt6AvMA9I/edit?usp=sharing) review
- [ ] [Map release notes](https://docs.google.com/document/d/1BpxGgIma_Lkd2kxtwEo2DBdHQ3zk6dHRz-leUIRlOIA/edit?usp=sharing)
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/source_signal_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: 🚀 New Source or Signal
about: Suggest incorporation of a new source or signal
title: ''
labels: 'API addition'
assignees: ''
---

<!--A clear and concise description of the source or signal you would like to add or modify, and how you imagine it working.-->

It would be great if ...

**Data details**

<!--Please link and briefly describe the proposed source. How is the raw data made available? Describe the geographic and time resolution of the raw data. Which fields should be extracted? Please describe proposed processing of the data, especially if this is a variant of an existing source or signal. -->

**Additional context**

<!--Add any other context or screenshots about the feature request here.-->
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,13 @@ venv.bak/
# mkdocs documentation
/site

# VSCode settings
*.vscode

# mypy
.mypy_cache/

# Ansible
.retry
.indicators-ansible-vault-pass
indicators-ansible-vault-pass
83 changes: 83 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!groovy

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

pipeline {

agent any

stages {

stage ("Environment") {
when {
anyOf {
branch "deploy-*";
changeRequest target: "deploy-*", comparator: "GLOB"
}
}
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 = ""
}
}
}
}

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"
}
}

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

stage('Deploy') {
when {
branch "deploy-*"
}
steps {
sh "jenkins/${INDICATOR}-jenkins-deploy.sh"
}
}
}

post {
always {
script {
/*
Use slackNotifier.groovy from shared library and provide current
build result as parameter.
*/
slackNotifier(currentBuild.currentResult)
}
}
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2020 The Delphi Group at Carnegie Mellon University

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Covidcast Indicators

[![License: MIT][mit-image]][mit-url]

In early April 2020, Delphi developed a uniform data schema for [a new Epidata endpoint focused on COVID-19](https://cmu-delphi.github.io/delphi-epidata/api/covidcast.html). Our intent was to provide signals that would track in real-time and in fine geographic granularity all facets of the COVID-19 pandemic, aiding both nowcasting and forecasting. Delphi's long history in tracking and forecasting influenza made us uniquely situated to provide access to data streams not available anywhere else, including medical claims data, electronic medical records, lab test records, massive public surveys, and internet search trends. We also process commonly-used publicly-available data sources, both for user convenience and to provide data versioning for sources that do not track revisions themselves.

Each data stream arrives in a different format using a different delivery technique, be it sftp, an access-controlled API, or an email attachment. The purpose of each pipeline in this repository is to fetch the raw source data, extract informative aggregate signals, and output those signals---which we call **COVID-19 indicators**---in a common format for upload to the [COVIDcast API](https://cmu-delphi.github.io/delphi-epidata/api/covidcast.html).

For client access to the API, along with a variety of other utilities, see our [R](https://cmu-delphi.github.io/covidcast/covidcastR/) and [Python](https://cmu-delphi.github.io/covidcast/covidcast-py/html/) packages.

For interactive visualizations (of a subset of the available indicators), see our [COVIDcast map](https://covidcast.cmu.edu).

## Organization

Utilities:
* `_delphi_utils_python` - common behaviors
* `_template_python` & `_template_r` - starting points for new data sources
* `ansible` & `jenkins` - automated testing and deployment
* `sir_complainsalot` - a Slack bot to check for missing data

Indicator pipelines: all remaining directories.

Each indicator pipeline includes its own documentation.

* Consult README.md for directions to install, lint, test, and run the pipeline for that indicator.
* Consult REVIEW.md for the checklist to use for code reviews.
* Consult DETAILS.md (if present) for implementation details, including handling of corner cases.


## License

This repository is released under the **MIT License**.

[mit-image]: https://img.shields.io/badge/License-MIT-yellow.svg
[mit-url]: https://opensource.org/licenses/MIT
Loading