MicroCOVID Save

Estimating the COVID risk of ordinary activities

Project README

CI Netlify Status Translate on Weblate

microCOVID.org

Local Development

Requirements:

  • Node.js 12
  • Yarn

(See .tool-versions for specific and up-to-date versions).

  1. Install local depenendences
    $ yarn install
    
  2. Start local server
    $ yarn start
    
  3. Open http://localhost:3000

Prevalence updates

  1. Install venv to be able to run prevalence updates
    $ python3 -m venv .venv
    $ source .venv/bin/activate
    $ pip install -r requirements-manual.txt
    
  2. Install the GitHub CLI to be able to using the gh command with the prevalence_helper.sh script
    # using homebrew (see GitHub page for alternate install methods)
    $ brew install gh
    
  3. Get a COVIDActNow.org API key from here. (If you're on the microCOVID team, you can ask for our existing API key.)
  4. Then configure your API key as such:
    $ cp .secure-keys.template .secure-keys
    # Add your API key to the line in .secure-keys that is listed as CAN_API_KEY
    
  5. Run a prevalence update. Pick one of the three following examples:
    # Run the prevalence update on the auto-prevalence-update branch
    $ yarn prevalence
    # Run the prevalence update, commit changes, and submit auto-merge pull request
    $ yarn prevalence -c
    # Run the prevalence update without switching branches (useful when testing changes on a feature branch)
    $ yarn prevalence -b
    # Specify the COVIDActNow.org API key
    $ yarn prevalence -k 111aaa222bbb
    # Specify where your virtualenv lives (defaults to `.venv`)
    $ yarn prevalence -v .venv-custom
    

Linting

We use eslint to standardize our style across files. To check your files with the linter, run:

$ yarn lint

If you see warnings, you can attempt to auto-correct them with:

$ yarn fix

If there are errors it can't fix, please fix them manually before committing.

Validating model changes

One of the tests generates computed_scenarios.json, a json of inputs and outputs for various situations. Use model_comparison.ipynb to compare the model behavior before and after model changes.

Updating Community Infection Values

Updating Slider Labels

To update the prevalance slider Labels shown in the community infection Slider component, you can change the property values prevalance_slider_label_1, prevalance_slider_label_2, prevalance_slider_label_3, prevalance_slider_label_4, prevalance_slider_label_5, prevalance_slider_label_6 located in /src/locals/en.json.

Updating Slider Values

You can add 4 values to the slider. To modify these values, you can update the property values prevalance_slider_value_min, prevalance_slider_value_2, prevalance_slider_value_3, prevalance_slider_value_max located in /src/locals/en.json. Please note that values are in multiples of 100. So a value set at 0.8 will correspond to 80 infections. Another example: a value of 7.5 will correspond to 750 infections.

Open Source Agenda is not affiliated with "MicroCOVID" Project. README Source: microCOVID/microCOVID
Stars
263
Open Issues
266
Last Commit
9 months ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating