This repo contains the reference implementation of the datEAUbase relational database and data model for use in water resource recovery facilities (WRRFs). The purpose of datEAUbase is to allow WRRF data to be stored along with their context to ensure that they are correctly interpreted in data mining, modelling and decision support activities.
-
/sql_generation_scripts: This folder contains the SQL scripts that generate the tables, key constraints and fields defined by the datEAUbase data model. The scripts are versioned starting at v0 which corresponds to the version published in Plana et al. (2019). The scripts are refferred to as "as designed" (e.g., coming from a documented specification) or "as built" (e.g., reflecting the state of the pilEAUte's datEAUbase instance at a given date.) The scripts also vary based on the target database environment (e.g., MSSQL, MYSQL, etc.) -
/docs: The folder containing the source files for the official documentation of the datEAUbase project. The files found in/docsare processed by the python packagemkdocsto build the documentation site. -
/tests: Contains a battery of tests to ensure that the documentation generation code responsible for creating the documentation website and the SQL generation scripts are working adequately. -
/src: The folder that contains the "source of truth" document for the datEAUbase: the dictionary table. The documentation and SQL statements are generated from the data encoded in this table.
uv is a tool for managing dependencies, virtual encironments and package distribution for Python. Install it with the following commands:
macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Alternatively, you can use package managers:
- macOS:
brew install uv - Windows:
winget install --id=astral-sh.uv -e
uv sync .
uv pip install -e .
To install with development dependencies:
uv sync --all-extrasor
uv pip install -e ".[dev]"uv run pytest
uv run mkdocs serve
datEAUbase is published under the CC-BY 4.0 license.