This repository contains GitHub Actions workflows that fetch data from the Andhra Pradesh CCP API and the Andhra Pradesh MLHP API and sync the data to the BigQuery data warehouse.
The code fetches "back-dated" records, i.e., where the submission date is later than the session date. The data are deduplicated in dbt.
-
Set up uv for managing dependencies.
- Install uv according to instructions here.
- Install python using
uv python install. - Sync the project's dependencies using
uv sync. - Add and remove dependencies using
uv add package_nameanduv remove package_name. - Run python scripts using
uv run path_to_script.py.
-
Configure the repository secrets locally.
-
Create a file secrets/andhra_pradesh_ccp.yml as follows, replacing
xxxas appropriate:url: xxx username: xxx password: xxx
The
urlis currently a proxy URL, because the actual API is inaccessible within GitHub Actions due to an unresolvable misconfiguration on the API server. -
Create a file secrets/andhra_pradesh_mlhp.yml as follows, replacing
xxxas appropriate:url: xxx key: xxx
-
Create a file secrets/slack_token.txt that contains the Slack bot token.
-
Create a file secrets/service_account_key.json that contains the JSON key for the service account that will connect to BigQuery (airbyte-user).
-
Create a file secrets/gh_pat.txt that contains a GitHub fine-grained personal access token that has
- access on the NooraHealth organization
- repository access to this repo
- read and write permissions for Actions
-
-
Configure the repository secrets on GitHub.
- Copy and paste the contents of secrets/andhra_pradesh_ccp.yml into a secret named "ANDHRA_PRADESH_CCP".
- Copy and paste the contents of secrets/andhra_pradesh_mlhp.yml into a secret named "ANDHRA_PRADESH_MLHP".
- Copy and paste the contents of secrets/slack_token.txt into a secret named "SLACK_TOKEN".
- Copy and paste the contents of secrets/bigquery_service_account_key.json into a secret named "SERVICE_ACCOUNT_KEY".
- Copy and paste the contents of secrets/gh_pat.txt into a secret named "GH_PAT".