Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Manual Development Environment Setup

Adrian Edwards edited this page Jun 25, 2021 · 11 revisions

vaccine-feed-ingest's cli tool is written in Python, but you can contribute pipeline stages in most scripting languages. Currently we run bash and python, but are open to more!

To get started helping out, you first need to set up the vaccine-feed-ingest cli.

These instructions assume you have configured git on your machine, have cloned this repo, and are working from the root directory of the repo (cd vaccine-feed-ingest after cloning).

Once you have set up your development environment, see running vaccine-feed-ingest.

Setup for Mac

  1. Install homebrew if you don't have it:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Install python version 3.9 or higher:

    brew install python@3.9
  3. (optional, recommended) If you need multiple python versions then use pyenv:

    brew install pyenv
    pyenv install
    echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.zshrc

    If you have an issue, see pyenv's instructions or skip this step.

  4. Install poetry

    brew install poetry
  5. Install app dependancies with extras for development:

    poetry install --extras lint

    Known problems and fixes:

    • ⚠️ On some macs there may be an error with a dependency called Fiona. If you see something like:
     Complete output (2 lines):
     Failed to get options via gdal-config: [Errno 2] No such file or directory: 'gdal-config'
     A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.

    Then install gdal with:

    brew install gdal

    And try poetry install --extras lint again!

    • ⚠️ When testing your installation (next step below), if you see an error like this about a dependency called rtree:
    AttributeError: dlsym(RTLD_DEFAULT, Error_GetLastErrorNum): symbol not found
    

    Then install spatialindex with:

    brew install spatialindex

    And try testing again!

  6. Test your installation!

    poetry run vaccine-feed-ingest --help
  7. (optional, not recommended) Install gcloud SDK:

    You do not need this unless you are developing against GCS. Google has detailed instructions if you need them.

    In addition to this installation step, you will need to be granted access to our development GCP environment to use this. Most contributors will not need to do this.

    brew install --cask google-cloud-sdk
    gcloud init

Setup for Ubuntu/Debian

  1. Install required system deps:

    sudo apt-get install libbz2-dev liblzma-dev libreadline-dev libsqlite3-dev pdftohtml
  2. Install python version 3.9 or higher:

    sudo apt-get install python3.9 python3-pip
  3. (optional, recommended) If you need multiple python versions then use pyenv:

    curl https://pyenv.run | bash

    Add pyenv to .bashrc:

    export PATH="$HOME/.pyenv/bin:$PATH"
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"

    Install project python version:

    pyenv install
  4. Install poetry:

    curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
  5. Add to .bashrc:

    export PATH="$HOME/.local/bin:$PATH"
  6. Install app dependancies with extras for development:

    poetry install --extras lint
  7. Test your installation!

    poetry run vaccine-feed-ingest --help
  8. (optional, not recommended) Install gcloud SDK:

    You do not need this unless you are developing against GCS. Google has detailed instructions if you need them.

    In addition to this installation step, you will need to be granted access to our development GCP environment to use this. Most contributors will not need to do this.

    curl https://sdk.cloud.google.com | bash
    gcloud init

Setup for windows

WSL is probably your best bet