Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: updated readme and env example #96

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,23 @@
[![MIT License](https://img.shields.io/github/license/bcgov/nr-hydrometric-rating-curve.svg)](/LICENSE.md)
![Lifecycle:Maturing](https://img.shields.io/badge/Lifecycle-Maturing-007EC6)

# RATING CURVE APP
# Hydrometric Rating Application (HydRA)

##### Intro
A hydrometric rating curve describes the mathematical relationship between stage and discharge. The rating curve app
allows users to upload any stage and discharge datasets, develop and optimize rating models as well as
save and compare results from previous sessions.
## Intro

###### Contributing Authors
NHC (Tyler De Jong, Tobias Müller), ENV X
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.

###### Updated
2023-03-31
The HydRA app is hosted in the BC Gov GitHub organization and is available at PLACEHOLDER. This repository contains all source code for the HydRA app and allows to run the app locally using docker.

## Managing the app packages

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 editate the `pyproject.toml` file.

## Running the app locally

- Create a `.env` file in the `frontend` directory of the project by copying the `.env.example` file and updating the values as needed. For development, the `DJANGO_DEBUG` variable should be set to `True`.
- 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 at `http://localhost:8003`. Note: the non-dev version of the app is served via nginx at `http://localhost:{WEB_PORT}`.

##### Contributing Authors

NHC (Tyler De Jong, Tobias Müller), ENV X
3 changes: 2 additions & 1 deletion frontend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
WEB_PORT='80'
WEB_PORT_INTERNAL='8003'
ALLOWED_HOSTS='localhost,'
CSRF_TRUSTED_ORIGINS = 'https://yourdomain.com,https://www.yourdomain.com'
CSRF_TRUSTED_ORIGINS = 'https://localhost,https://localhost'
BACKEND_URL='http://web:8003'

# django details
SECRET_KEY='debug'
Expand Down
Loading