Wildfire Predictive Services to support decision making in prevention, preparedness, response and recovery.
- Create
.env
file inweb
usingweb/.env.example
as a sample. - Create
.env.docker
file inapi/app
usingapi/app/.env.example
as a sample. - Run
docker-compose build
and thendocker-compose up
- Open http://localhost:8080 to view the front end served up from a static folder by the python api.
- Open http://localhost:3000 to view the front end served up in developer mode by node.
- Open up the project:
Remote-Containers: Open Folder in Container
, select docker-compose.vscode.yml - Sometimes VSCode doesn't pick up you've changed the docker container:
Remote-Containers: Rebuild Container
- Install extensions into the container, as needed.
- You can point the API database to:
host.docker.internal
- You can start up other services outside of vscode, e.g.:
docker compose up db
anddocker compose up redis
Refer to api/README.md.
Refer to web/README.md
Apache 2.0 License - see the LICENSE.md
A glossary of terms relating to Wildfire that are relevant to Predictive Services can be found at the Predictive Wildfire Wiki Glossary Page
if you're not seeing an architecture diagram below, you need the mermaid plugin
graph LR
datamart["Environment Canada MSC Datamart"]
wf1["WFWX Fire Weather API</br>[Software System]"]
wso2["WSO2 API Gateway"]
sso["Red Hat SSO / Keycloak</br>[Idendity Provider]</br>https://oidc.gov.bc.ca"]
subgraph Wildfire Predictive Services Unit Web Application
FrontEnd["PSU Single Page Application</br>[Container: Javascript, React]"]
subgraph PSU API's
API["API</br>[Container: Python, FastAPI]"]
CFFDRS_API["CFFDRS API</br>[Container: Python, FastAPI, R]"]
end
pg_tileserv["pg_tileserv</br>[Software System]"]
redis["REDIS</br>[Software System]"]
subgraph Openshift Cronjobs
c-haines["C-Haines</br>[Container: Python]</br>Periodically fetch weather data, process and store relevant subset."]
env-canada["Env. Canada Weather</br>[Container: Python]</br> Periodically fetch weather data, process and store relevant subset."]
backup["Backup process</br>[Container: Python]"]
end
Database[("Database</br>[Container: PostgreSQL, Patroni]</br></br>Weather model data, audit logs,</br>HFI calculator data")]
Files[("Files</br>[Container: json files, shp files, html files]</br></br>Percentile data, diurnal data, jinja templates")]
end
subgraph "S3 Compliant, OCIO Object Storage Service"
s3[("Object Storage</br>[Container: S3 Compliant]</br>C-Haines, SFMS, Backups etc.")]
end
subgraph WildfireServers
SFMS
end
SFMS-."Push GeoTIFF</br>[MultiPartForm/HTTPS]".->API
API-. "Read</br>[S3/HTTPS]" .->s3
API-.->|"Read</br>[psycopg]"|Database
API-.->|"Read</br>[JSON/HTTPS]"|CFFDRS_API
API-.->|"Uses</br>[Reads from disk]"|Files
API-. "Fetch fire weather data</br>[JSON/HTTPS]" .->wso2
API-. "Cache WFWX responses" .->redis
wso2-. "Proxies" .->wf1
pg_tileserv-. "Read geometries" .->Database
FrontEnd-.->|"Uses</br>[JSON/HTTPS]"|API
FrontEnd-.->|"Uses</br>[HTTPS]"|pg_tileserv
FrontEnd-. "Authenticate</br>[HTTPS]" .->sso
FrontEnd-. "Read</br>[HTTPS]" .->s3
c-haines-. "[S3/HTTPS]" .->s3
c-haines-. "Cache Env. Canada GRIB files" .->redis
c-haines-. "Download files</br>[GRIB2/HTTPS]" .->datamart
env-canada-. "Store weather data</br>[psycopg]" .->Database
env-canada-. "Cache Env. Canada GRIB files" .->redis
env-canada-. "Download files</br>[GRIB2/HTTPS]" .->datamart
backup-. "Read</br>[psycopg]" .->Database
backup-. "[S3/HTTPS] " .->s3
Your Github PR is required to pass all our CI checks, including our test coverage threshold via CodeCov: https://docs.codecov.com/docs/about-code-coverage
Branches must be named in accordance with the rules specified in .githooks/pre-push.
- branch names should be informative, meaningful and concise.
- branch names should follow the pattern (category)/(description)/(ticket number)
# Enforce branch naming conventions for this project using git hooks.
git config core.hooksPath .githooks
example of a good branch name:
# Task related to re-factoring of logging, the ticket number being 123:
task/re-factor-logging/123
example of a bad branch name:
wps-123
Resources:
- Issues
- ZenHub Board
- PEP8 and PEP20 coding conventions, but with 110 character line breaks
- Code of Conduct