A hydrometric rating curve describes the mathematical relationship between stage and discharge for a given hydrometric station. Rating curves allow to convert stage measurements to discharge measurements based on previously measured stage and discharge data pairs. The Hydrometric Rating Application (HydRA) allows users to upload any stage and discharge datasets, develop and optimize rating models as well as save and compare results from previous sessions.
The HydRA app is hosted in the BC Gov GitHub organization and is available here. This repository contains all source code for the HydRA app and allows to run the app locally using docker.
After cloning the repository, use the poetry
python package manager to install the dependencies by running poetry install
from the frontend
directory. To update the dependencies, run poetry update
or edit the pyproject.toml
file.
- Create a
.env
file in thefrontend
directory of the project by copying the.env.example
file and updating the values as needed. For development, theDJANGO_DEBUG
variable should be set toTrue
. - To run the django server locally, install docker and docker-compose. Run
docker compose -f ./frontend/docker-compose.dev.yml up --build
to start the development server. The app will be available athttp://localhost:8003
. Note: the non-dev version of the app is served via nginx athttp://localhost:{WEB_PORT}
.
To run Django tests, it is easiest to build the Docker container and attach to the running shell. The command python manage.py test
executes the tests in Django.
NHC (Tyler De Jong, Tobias Müller), ENV X