From 9d71ee0d133b671a02c1556c8643a07bb6e335f6 Mon Sep 17 00:00:00 2001 From: Matt Denno Date: Tue, 19 Nov 2024 13:47:31 -0500 Subject: [PATCH] update evaluation names to e* from p* to match s3 bucket. (#335) --- README.md | 4 ++-- docs/sphinx/changelog/index.rst | 11 +++++++++++ docs/sphinx/getting_started/index.rst | 6 +++--- .../notebooks/01_introduction_schema.ipynb | 13 +++++++++---- .../user_guide/notebooks/05_clone_from_s3.ipynb | 8 ++++---- .../notebooks/06_grouping_and_filtering.ipynb | 2 +- pyproject.toml | 2 +- src/teehr/__init__.py | 2 +- src/teehr/examples/08-sql.ipynb | 2 +- src/teehr/examples/clone_from_s3.ipynb | 4 ++-- tests/test_clone_from_s3.py | 4 ++-- version.txt | 2 +- 12 files changed, 38 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 93659c6f..5dfeb3f7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/sphinx/changelog/index.rst b/docs/sphinx/changelog/index.rst index 2c120d4a..f3fb42e3 100644 --- a/docs/sphinx/changelog/index.rst +++ b/docs/sphinx/changelog/index.rst @@ -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 -------------------- diff --git a/docs/sphinx/getting_started/index.rst b/docs/sphinx/getting_started/index.rst index 31b75573..bde2e846 100644 --- a/docs/sphinx/getting_started/index.rst +++ b/docs/sphinx/getting_started/index.rst @@ -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 ------------------ @@ -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( diff --git a/docs/sphinx/user_guide/notebooks/01_introduction_schema.ipynb b/docs/sphinx/user_guide/notebooks/01_introduction_schema.ipynb index 5575523a..c0383e78 100644 --- a/docs/sphinx/user_guide/notebooks/01_introduction_schema.ipynb +++ b/docs/sphinx/user_guide/notebooks/01_introduction_schema.ipynb @@ -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": [ + "" ] }, { @@ -188,7 +193,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.15" + "version": "3.10.12" } }, "nbformat": 4, diff --git a/docs/sphinx/user_guide/notebooks/05_clone_from_s3.ipynb b/docs/sphinx/user_guide/notebooks/05_clone_from_s3.ipynb index 7f6e47e3..87be6f18 100644 --- a/docs/sphinx/user_guide/notebooks/05_clone_from_s3.ipynb +++ b/docs/sphinx/user_guide/notebooks/05_clone_from_s3.ipynb @@ -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." ] }, { @@ -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\")" ] }, { @@ -396,7 +396,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.15" + "version": "3.10.12" } }, "nbformat": 4, diff --git a/docs/sphinx/user_guide/notebooks/06_grouping_and_filtering.ipynb b/docs/sphinx/user_guide/notebooks/06_grouping_and_filtering.ipynb index 839895c4..1653a6e5 100644 --- a/docs/sphinx/user_guide/notebooks/06_grouping_and_filtering.ipynb +++ b/docs/sphinx/user_guide/notebooks/06_grouping_and_filtering.ipynb @@ -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", diff --git a/pyproject.toml b/pyproject.toml index f087a975..ab1b3eb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/src/teehr/__init__.py b/src/teehr/__init__.py index fe1e9e50..85fb2054 100644 --- a/src/teehr/__init__.py +++ b/src/teehr/__init__.py @@ -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 diff --git a/src/teehr/examples/08-sql.ipynb b/src/teehr/examples/08-sql.ipynb index 02b05f4f..498f0f97 100644 --- a/src/teehr/examples/08-sql.ipynb +++ b/src/teehr/examples/08-sql.ipynb @@ -43,7 +43,7 @@ "metadata": {}, "outputs": [], "source": [ - "ev.clone_from_s3(\"p0_2_location_example\")" + "ev.clone_from_s3(\"e0_2_location_example\")" ] }, { diff --git a/src/teehr/examples/clone_from_s3.ipynb b/src/teehr/examples/clone_from_s3.ipynb index 96f89ac6..3a6daed5 100644 --- a/src/teehr/examples/clone_from_s3.ipynb +++ b/src/teehr/examples/clone_from_s3.ipynb @@ -48,7 +48,7 @@ "metadata": {}, "outputs": [], "source": [ - "ev.clone_from_s3(\"p0_2_location_example\")" + "ev.clone_from_s3(\"e0_2_location_example\")" ] }, { @@ -167,7 +167,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.15" + "version": "3.10.12" } }, "nbformat": 4, diff --git a/tests/test_clone_from_s3.py b/tests/test_clone_from_s3.py index 8a1246b7..37366d88 100644 --- a/tests/test_clone_from_s3.py +++ b/tests/test_clone_from_s3.py @@ -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 @@ -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" diff --git a/version.txt b/version.txt index f7abe273..70d5b25f 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.4.2 \ No newline at end of file +0.4.3 \ No newline at end of file