Skip to content

Commit

Permalink
update evaluation names to e* from p* to match s3 bucket. (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdenno authored Nov 19, 2024
1 parent 0cf0ee3 commit 9d71ee0
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ python -m teehr.utils.install_spark_jars
```
Use Docker
```bash
$ docker build -t teehr:v0.4.2 .
$ docker run -it --rm --volume $HOME:$HOME -p 8888:8888 teehr:v0.4.2 jupyter lab --ip 0.0.0.0 $HOME
$ docker build -t teehr:v0.4.3 .
$ docker run -it --rm --volume $HOME:$HOME -p 8888:8888 teehr:v0.4.3 jupyter lab --ip 0.0.0.0 $HOME
```

## Examples
Expand Down
11 changes: 11 additions & 0 deletions docs/sphinx/changelog/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Release Notes
=============

0.4.3 - 2024-10-19
--------------------

Added
^^^^^
* None

Changed
^^^^^^^
* Changed paths to the S3 bucket evaluations to reference "e*..." instead of "p*..." naming convention.

0.4.2 - 2024-10-18
--------------------

Expand Down
6 changes: 3 additions & 3 deletions docs/sphinx/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Or, if you do not want to install TEEHR in your own virtual environment, you can

.. code-block:: bash
docker build -t teehr:v0.4.2 .
docker run -it --rm --volume $HOME:$HOME -p 8888:8888 teehr:v0.4.2 jupyter lab --ip 0.0.0.0 $HOME
docker build -t teehr:v0.4.3 .
docker run -it --rm --volume $HOME:$HOME -p 8888:8888 teehr:v0.4.3 jupyter lab --ip 0.0.0.0 $HOME
Project Objectives
------------------
Expand Down Expand Up @@ -85,7 +85,7 @@ and calculating two versions of KGE (one with bootstrap uncertainty and one with
)
# Clone the example data from S3
ev.clone_from_s3("p0_2_location_example")
ev.clone_from_s3("e0_2_location_example")
# Define a bootstrapper with custom parameters.
boot = teehr.Bootstrappers.CircularBlock(
Expand Down
13 changes: 9 additions & 4 deletions docs/sphinx/user_guide/notebooks/01_introduction_schema.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,14 @@
"metadata": {},
"source": [
"### Schema Diagram\n",
"The following diagram shows the Domain Tables, Location Data Tables and the Timeseries Tables (i.e., table groups) associated with a TEEHR Evaluation. The table groups are delineated with labeled dashed lines. The tables, relationships (lines) and the \"foreign key\" references are color coded to help explain the relationships. Foreign key is in quotes because these relationships represent something like a foreign key without actually being a foreign key as the data storage format used does not support foreign keys. The \"foreign keys\" are enforced when data is loaded, but not beyond that.\n",
"\n",
"![TEEHR Schema](https://github.com/RTIInternational/teehr/raw/refs/heads/main/docs/images/getting_started/data_model.drawio.svg)"
"The following diagram shows the Domain Tables, Location Data Tables and the Timeseries Tables (i.e., table groups) associated with a TEEHR Evaluation. The table groups are delineated with labeled dashed lines. The tables, relationships (lines) and the \"foreign key\" references are color coded to help explain the relationships. Foreign key is in quotes because these relationships represent something like a foreign key without actually being a foreign key as the data storage format used does not support foreign keys. The \"foreign keys\" are enforced when data is loaded, but not beyond that."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"https://github.com/RTIInternational/teehr/raw/refs/heads/main/docs/images/getting_started/data_model.drawio.svg?raw=true\" width=\"600px\">"
]
},
{
Expand Down Expand Up @@ -188,7 +193,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
8 changes: 4 additions & 4 deletions docs/sphinx/user_guide/notebooks/05_clone_from_s3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"metadata": {},
"source": [
"### Clone Evaluation Data form S3\n",
"As mentioned above, for this exercise we will be cloning a complete Evaluation dataset from the TEEHR S3 bucket. First we will list the available Evaluations and then we will clone the `p0_2_location_example` evaluation which is a small example Evaluation that only contains 2 gages."
"As mentioned above, for this exercise we will be cloning a complete Evaluation dataset from the TEEHR S3 bucket. First we will list the available Evaluations and then we will clone the `e0_2_location_example` evaluation which is a small example Evaluation that only contains 2 gages."
]
},
{
Expand All @@ -84,8 +84,8 @@
},
"outputs": [],
"source": [
"# Clone the p0_2_location_example evaluation from the S3 bucket\n",
"ev.clone_from_s3(\"p0_2_location_example\")"
"# Clone the e0_2_location_example evaluation from the S3 bucket\n",
"ev.clone_from_s3(\"e0_2_location_example\")"
]
},
{
Expand Down Expand Up @@ -396,7 +396,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"outputs": [],
"source": [
"ev.clone_from_s3(\n",
" evaluation_name=\"p1_camels_daily_streamflow\",\n",
" evaluation_name=\"e1_camels_daily_streamflow\",\n",
" primary_location_ids=[\"usgs-01013500\", \"usgs-01022500\"],\n",
" start_date=\"1990-10-30 00:00\",\n",
" end_date=\"1990-11-02 23:00\"\n",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "teehr"
version = "0.4.2"
version = "0.4.3"
description = "Tools for Exploratory Evaluation in Hydrologic Research"
authors = [
"RTI International",
Expand Down
2 changes: 1 addition & 1 deletion src/teehr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.4.2"
__version__ = "0.4.3"

from teehr.evaluation.evaluation import Evaluation # noqa
from teehr.models.metrics.metric_models import Metrics # noqa
Expand Down
2 changes: 1 addition & 1 deletion src/teehr/examples/08-sql.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"metadata": {},
"outputs": [],
"source": [
"ev.clone_from_s3(\"p0_2_location_example\")"
"ev.clone_from_s3(\"e0_2_location_example\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/teehr/examples/clone_from_s3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"metadata": {},
"outputs": [],
"source": [
"ev.clone_from_s3(\"p0_2_location_example\")"
"ev.clone_from_s3(\"e0_2_location_example\")"
]
},
{
Expand Down Expand Up @@ -167,7 +167,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_clone_from_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_get_s3_evaluations_list():
def test_clone_example_from_s3(tmpdir):
"""Test filter string."""
ev = Evaluation(tmpdir)
ev.clone_from_s3("p0_2_location_example")
ev.clone_from_s3("e0_2_location_example")

assert ev.units.to_sdf().count() == 4
assert ev.variables.to_sdf().count() == 3
Expand All @@ -44,7 +44,7 @@ def test_clone_and_subset_example_from_s3(tmpdir):
"""Test filter string."""
ev = Evaluation(tmpdir)
ev.clone_from_s3(
evaluation_name="p0_2_location_example",
evaluation_name="e0_2_location_example",
primary_location_ids=["usgs-14316700"],
start_date="2001-09-30 20:00",
end_date="2010-09-29 20:00"
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.2
0.4.3

0 comments on commit 9d71ee0

Please sign in to comment.