All Projects → bcgov → gwells

bcgov / gwells

Licence: Apache-2.0 license
Groundwater Wells and Aquifers application for the Ministry of Environment

Programming Languages

python
139335 projects - #7 most used programming language
Vue
7211 projects
javascript
184084 projects - #8 most used programming language
groovy
2714 projects
shell
77523 projects
HTML
75241 projects

Projects that are alternatives of or similar to gwells

EnvReportBC
List of repositories administered by Environmental Reporting BC (www.gov.bc.ca/environmental-reporting-bc)
Stars: ✭ 17 (-34.62%)
Mutual labels:  env
checkdotenv
Verify environment variables presence for Node JS.
Stars: ✭ 12 (-53.85%)
Mutual labels:  env
vite-plugin-environment
Easily expose environment variables in Vite.js
Stars: ✭ 57 (+119.23%)
Mutual labels:  env
betterconf
Minimalistic Python library for your configs.
Stars: ✭ 35 (+34.62%)
Mutual labels:  env
envyable
The simplest yaml to ENV config loader.
Stars: ✭ 78 (+200%)
Mutual labels:  env
env-dot-prop
♻️ Get, set, or delete nested properties of process.env using a dot path
Stars: ✭ 31 (+19.23%)
Mutual labels:  env
wqbc
An R package for water quality thresholds and index calculation for British Columbia
Stars: ✭ 16 (-38.46%)
Mutual labels:  env
bcdata
An R package for searching & retrieving data from the B.C. Data Catalogue
Stars: ✭ 68 (+161.54%)
Mutual labels:  env
workbench
A hierarchical environment manager for bash, written in bash.
Stars: ✭ 17 (-34.62%)
Mutual labels:  env
django-confy
A comfy config for Django
Stars: ✭ 25 (-3.85%)
Mutual labels:  env
webpack-dotenv-plugin
Use dotenv with webpack.
Stars: ✭ 53 (+103.85%)
Mutual labels:  env
read-env
🔧 Transform environment variables into JSON object with sanitized values.
Stars: ✭ 60 (+130.77%)
Mutual labels:  env
exenv
Exenv makes loading environment variables from external sources easy.
Stars: ✭ 35 (+34.62%)
Mutual labels:  env
microservice-template
📖 Nest.js based microservice repository template
Stars: ✭ 131 (+403.85%)
Mutual labels:  env
dotenv validator
This gem check if required env variables are present and its format using the .env and .env.sample files from Dotenv.
Stars: ✭ 33 (+26.92%)
Mutual labels:  env
envclasses
envclasses is a library to map fields on dataclass object to environment variables.
Stars: ✭ 26 (+0%)
Mutual labels:  env
envman
Manage your .env configuration easily
Stars: ✭ 20 (-23.08%)
Mutual labels:  env
libcsv
libcsv is a small, simple and fast CSV library written in pure ANSI C89 that can read and write CSV data. | libcsv是用纯ANSI C89编写的小型、简单、快速的CSV库,支持读写CSV数据.
Stars: ✭ 23 (-11.54%)
Mutual labels:  env
MultiButton
A compact and easy to use event-driven button driver module. | 一个小巧易用的事件驱动按钮驱动模块.
Stars: ✭ 78 (+200%)
Mutual labels:  env
k8s-env-gen
Kubernetes environment generator makes docker env files compatible with kubernetes
Stars: ✭ 19 (-26.92%)
Mutual labels:  env

img

Groundwater Wells and Aquifers (GWELLS)

https://apps.nrs.gov.bc.ca/gwells/

Introduction

The Ministry of Environment receives and processes groundwater data and information related to the construction, alteration and decommissioning of groundwater wells. Well construction and reporting requirements are regulated under the Water Sustainability Act and Groundwater Protection Regulation. The information collected and stored is used by government and other users to help inform decisions related to the management of the groundwater resource in B.C.

GWELLS, the new groundwater data repository, aims to improve the user experience when submitting and searching for well information, to improve the quality of the data being submitted, and to improve the overall functionality of the system to meet user and regulatory requirements.

The application is being developed as an open source solution.

Table of Contents

  1. Using the GWELLS API
  2. Developing GWELLS
  3. Architecture
  4. Contributing
  5. Issues
  6. License

Using the GWELLS API

GWELLS maintains a REST API where public data relating to wells is made available for other applications and services.

Our Swagger documentation is available at https://apps.nrs.gov.bc.ca/gwells/api/. Some examples of GWELLS endpoints:

Wells:

# all wells (paginated)
curl https://apps.nrs.gov.bc.ca/gwells/api/v1/wells

# all wells in an area bounded by sw_lat, sw_long, ne_lat, and ne_long
curl https://apps.nrs.gov.bc.ca/gwells/api/v1/wells?sw_lat=51.599253&sw_long=-128.220340&ne_lat=52.108192&ne_long=-127.150547

Aquifers:

# all aquifers
curl https://apps.nrs.gov.bc.ca/gwells/api/v1/aquifers

See the Swagger documentation for more examples.

DataBC Export

GWELLS Api is used by DataBC to export model information and provide well information on the DataBC website.

The command located in app/backend/gwells/management/commands/export_databc.py is used to pull data from the gwells database and export it for consumption in DataBC.

If a new field(s) are needed for export, this export_databc.py has raw sql queries that need to be updated with the required fields. Descriptions are also needed for the swagger documentation that are pulled from the db_comment fields in the django models. Both the raw sql queries and the db_comment field on the model need to be updated for new fields.

Developing GWELLS

Running the GWELLS application locally

Clone the GWELLS repository, and build the Docker image for the backend:

cd gwells/openshift/docker/backend
docker build . --tag=gwells/backend

Then, run the application with Docker:

cd gwells
docker-compose up

Visit the following links to browse the API and frontend applications:

Authentication

Some GWELLS pages (submitting new well reports, adding or editing aquifers, or adding or editing qualified well drillers to the registry) require authentication. Authentication uses the Province's Single Sign-On system. A GWELLS team member can request access for collaborators if needed.

Running tests:

Django unit tests:

cd app/backend
docker-compose exec backend python manage.py test

Vue unit tests:

cd app/frontend
docker-compose exec frontend npm run test:unit

Postman API tests: Import the json test collections in the api-tests/ folder into Postman.

Import a Shapefile

Single shapefile, with aquifer ID specified in CLI.

docker-compose exec backend python manage.py import_shapefile 2 aquifers/fixtures/shp/shapefile.zip

Bulk import, requires the AQ_NUMBER attribute on each polygon. Requires a folder with shapefiles to be prepared and passed in (zipped or not). Note: if DEBUG=True, all geometries will be uploaded to a random aquifer instead of the one matching its' number, so we can test locally with a development database.

mkdir app/backend/bulk
mv DATABC_EXPORT_FILE.zip app/backend/bulk/

docker-compose exec backend python manage.py import_bulk_shapefile bulk

Importing Licences

To download new licence data from DataBC and merge it into your DB, do

docker-compose exec backend python manage.py import_licences

Making pull requests

Pull requests made from branches in the bcgov/gwells repo will kick off a dev pipeline, which runs tests and deploys a preview environment containing your changes. The pull request page will update when the environment is deployed and mandatory checks (unit tests, etc.) pass or fail.

Architecture

GWELLS uses PostgreSQL (with PostGIS), Django REST Framework, and Vue.js. We also use both AWS S3 and a self-hosted Minio service for storing documents.

Our production and staging environments run on an OpenShift container platform cluster. OpenShift templates for services are located in the openshift/ folder, along with more information about dev and staging environments on our cluster.

GWELLS container diagram

Contributing

Government employees, the public and members of the private sector are encouraged to contribute. Please read and follow our Code of Conduct.

All contributors retain original copyright, but are granting a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users. This project is covered by an Apache v2.0 license.

Code With Us

Many of our features have been developed by members of the community. Check the BC Developer Exchange website, where paid opportunities to build features for GWELLS and other applications are posted.

Issues

Issues are tracked on the Water Jira board. Note this is a restricted issue tracker and you will require permission to be able to view it.

License

Code released under the Apache License, Version 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].