From 6036f022a723b722e792a88a69b32865c6e1b4c4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:55:16 -0400 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#90) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.7 → v0.6.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.7...v0.6.8) * pre-commit - Apply automatic fixes and determine correct unsafe fixes. * Bump image versions for pre-commit changes. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Matt Savoie Co-authored-by: Owen Littlejohns --- .pre-commit-config.yaml | 2 +- test/geoloco/Geoloco_Regression.ipynb | 4 --- test/geoloco/version.txt | 2 +- .../HarmonyRegression.ipynb | 21 ++++++------ test/harmony-regression/version.txt | 2 +- test/hybig/HyBIG_Regression.ipynb | 34 +++++-------------- test/hybig/version.txt | 2 +- test/net2cog/net2cog_Regression.ipynb | 4 +-- test/net2cog/version.txt | 2 +- .../NSIDC-ICESAT2_Regression.ipynb | 9 +++-- test/nsidc-icesat2/version.txt | 2 +- .../VariableSubsetter_Regression.ipynb | 1 - test/variable-subsetter/version.txt | 2 +- 13 files changed, 32 insertions(+), 55 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0af082..71c0d0c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.7 + rev: v0.6.8 hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/test/geoloco/Geoloco_Regression.ipynb b/test/geoloco/Geoloco_Regression.ipynb index 0b56313..8de2e65 100644 --- a/test/geoloco/Geoloco_Regression.ipynb +++ b/test/geoloco/Geoloco_Regression.ipynb @@ -29,14 +29,10 @@ "metadata": {}, "outputs": [], "source": [ - "from os.path import exists\n", - "\n", "from harmony import Client, Collection, Environment, Request\n", "\n", "from utilities import (\n", " submit_and_download,\n", - " get_dim_sizes,\n", - " get_sds_data,\n", " remove_results_files,\n", " print_error,\n", " print_success,\n", diff --git a/test/geoloco/version.txt b/test/geoloco/version.txt index 7dea76e..6d7de6e 100644 --- a/test/geoloco/version.txt +++ b/test/geoloco/version.txt @@ -1 +1 @@ -1.0.1 +1.0.2 diff --git a/test/harmony-regression/HarmonyRegression.ipynb b/test/harmony-regression/HarmonyRegression.ipynb index 8b0c6af..e681622 100644 --- a/test/harmony-regression/HarmonyRegression.ipynb +++ b/test/harmony-regression/HarmonyRegression.ipynb @@ -35,24 +35,25 @@ "source": [ "# harmony_host_url = 'https://harmony.sit.earthdata.nasa.gov'\n", "harmony_host_url = 'https://harmony.uat.earthdata.nasa.gov'\n", - "# harmony_host_url = 'https://harmony.earthdata.nasa.gov'\n", - "\n", - "# Import libraries used throughout the notebook\n", + "# harmony_host_url = 'https://harmony.earthdata.nasa.gov'" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ "from notebook_helpers import (\n", " get,\n", " post,\n", " show,\n", - " get_data_urls,\n", " show_async,\n", " show_async_condensed,\n", - " show_shape,\n", " print_async_status,\n", - " check_bbox_subset,\n", - " check_stac,\n", ")\n", "import json\n", - "import intake\n", - "import re" + "import intake" ] }, { @@ -579,7 +580,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.10.9" }, "mimetype": "text/x-python", "name": "python", diff --git a/test/harmony-regression/version.txt b/test/harmony-regression/version.txt index c946ee6..1180819 100644 --- a/test/harmony-regression/version.txt +++ b/test/harmony-regression/version.txt @@ -1 +1 @@ -0.1.6 +0.1.7 diff --git a/test/hybig/HyBIG_Regression.ipynb b/test/hybig/HyBIG_Regression.ipynb index 2e91833..f5630a6 100644 --- a/test/hybig/HyBIG_Regression.ipynb +++ b/test/hybig/HyBIG_Regression.ipynb @@ -75,9 +75,7 @@ "from pathlib import Path\n", "from tempfile import TemporaryDirectory\n", "\n", - "from harmony import BBox, Collection, Environment, Client, Request\n", - "from numpy.testing import assert_array_almost_equal\n", - "import rasterio\n", + "from harmony import Collection, Environment, Client, Request\n", "from rasterio.transform import Affine\n", "from rasterio.crs import CRS\n", "\n", @@ -225,9 +223,7 @@ "\n", " test_files = build_file_list(aster_basename, Path(temp_dir), 'PNG')\n", " for file_name in test_files:\n", - " assert (\n", - " file_name.exists() == True\n", - " ), f'File does not exist {file_name.resolve()}'\n", + " assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n", " print_success('all test files generated')\n", "\n", " expected_output_metadata = {\n", @@ -290,9 +286,7 @@ "\n", " test_files = build_file_list(aster_basename, Path(temp_dir), 'JPEG')\n", " for file_name in test_files:\n", - " assert (\n", - " file_name.exists() == True\n", - " ), f'File does not exist {file_name.resolve()}'\n", + " assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n", " print_success('all test files generated')\n", "\n", " expected_output_metadata = {\n", @@ -468,9 +462,7 @@ "\n", " test_files = build_file_list(measures_basename, Path(temp_dir), 'PNG')\n", " for file_name in test_files:\n", - " assert (\n", - " file_name.exists() == True\n", - " ), f'File does not exist {file_name.resolve()}'\n", + " assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n", "\n", " print_success('all test files generated')\n", "\n", @@ -528,9 +520,7 @@ "\n", " test_files = build_file_list(measures_basename, Path(temp_dir), 'JPG')\n", " for file_name in test_files:\n", - " assert (\n", - " file_name.exists() == True\n", - " ), f'File does not exist {file_name.resolve()}'\n", + " assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n", " print_success('all test files generated')\n", "\n", " expected_output_metadata = {\n", @@ -600,9 +590,7 @@ " test_files = build_file_list(measures_basename, Path(temp_dir), 'PNG')\n", "\n", " for file_name in test_files:\n", - " assert (\n", - " file_name.exists() == True\n", - " ), f'File does not exist {file_name.resolve()}'\n", + " assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n", "\n", " print_success('all test files generated')\n", "\n", @@ -670,9 +658,7 @@ " test_files = build_file_list(measures_basename, Path(temp_dir), 'PNG')\n", "\n", " for file_name in test_files:\n", - " assert (\n", - " file_name.exists() == True\n", - " ), f'File does not exist {file_name.resolve()}'\n", + " assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n", "\n", " print_success('all test files generated')\n", "\n", @@ -827,9 +813,7 @@ " tile_test_files = build_file_list(tile_basename, Path(temp_dir), 'PNG')\n", "\n", " for file_name in tile_test_files:\n", - " assert (\n", - " file_name.exists() == True\n", - " ), f'File does not exist {file_name.resolve()}'\n", + " assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n", "\n", " print_success(f'All {tile_basename} test files generated')\n", " assert_dataset_produced_correct_results(\n", @@ -859,7 +843,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.11" + "version": "3.10.9" } }, "nbformat": 4, diff --git a/test/hybig/version.txt b/test/hybig/version.txt index 5a5831a..d169b2f 100644 --- a/test/hybig/version.txt +++ b/test/hybig/version.txt @@ -1 +1 @@ -0.0.7 +0.0.8 diff --git a/test/net2cog/net2cog_Regression.ipynb b/test/net2cog/net2cog_Regression.ipynb index db7cb02..b2f9fa2 100644 --- a/test/net2cog/net2cog_Regression.ipynb +++ b/test/net2cog/net2cog_Regression.ipynb @@ -73,10 +73,8 @@ "from pathlib import Path\n", "from tempfile import TemporaryDirectory\n", "\n", - "from harmony import BBox, Collection, Environment, Client, Request\n", + "from harmony import Collection, Environment, Client, Request\n", "from harmony.harmony import ProcessingFailedException\n", - "from numpy.testing import assert_array_almost_equal\n", - "import rasterio\n", "from rasterio.transform import Affine\n", "from rasterio.crs import CRS\n", "\n", diff --git a/test/net2cog/version.txt b/test/net2cog/version.txt index 6e8bf73..17e51c3 100644 --- a/test/net2cog/version.txt +++ b/test/net2cog/version.txt @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/test/nsidc-icesat2/NSIDC-ICESAT2_Regression.ipynb b/test/nsidc-icesat2/NSIDC-ICESAT2_Regression.ipynb index 9fa791e..1d56c21 100644 --- a/test/nsidc-icesat2/NSIDC-ICESAT2_Regression.ipynb +++ b/test/nsidc-icesat2/NSIDC-ICESAT2_Regression.ipynb @@ -96,7 +96,7 @@ "metadata": {}, "outputs": [], "source": [ - "from harmony import BBox, Client, Collection, Dimension, Environment, Request\n", + "from harmony import BBox, Client, Collection, Environment, Request\n", "from os.path import exists\n", "from datetime import datetime\n", "from pathlib import Path\n", @@ -122,7 +122,6 @@ "\n", "sys.path.append('../shared_utils')\n", "from utilities import (\n", - " print_error,\n", " print_success,\n", " submit_and_download,\n", " compare_results_to_reference_file_new,\n", @@ -393,7 +392,7 @@ " print_success(f'{test_name} test suite.')\n", " else:\n", " print(\n", - " f'Bounding box tests not configured for environment: {harmony_environment} - skipping tests'\n", + " f'Bounding box tests not configured for environment: {configuration[\"env\"]} - skipping tests'\n", " )" ] }, @@ -450,7 +449,7 @@ " print_success(f'{test_name} test suite.')\n", " else:\n", " print(\n", - " f'Bounding box tests not configured for environment: {harmony_environment} - skipping tests'\n", + " f'Bounding box tests not configured for environment: {configuration[\"env\"]} - skipping tests'\n", " )" ] }, @@ -504,7 +503,7 @@ " print_success(f'{test_name} test suite.')\n", " else:\n", " print(\n", - " f'Bounding box tests not configured for environment: {harmony_environment} - skipping tests'\n", + " f'Bounding box tests not configured for environment: {configuration[\"env\"]} - skipping tests'\n", " )" ] } diff --git a/test/nsidc-icesat2/version.txt b/test/nsidc-icesat2/version.txt index 4e379d2..bcab45a 100644 --- a/test/nsidc-icesat2/version.txt +++ b/test/nsidc-icesat2/version.txt @@ -1 +1 @@ -0.0.2 +0.0.3 diff --git a/test/variable-subsetter/VariableSubsetter_Regression.ipynb b/test/variable-subsetter/VariableSubsetter_Regression.ipynb index ea58dad..feed594 100644 --- a/test/variable-subsetter/VariableSubsetter_Regression.ipynb +++ b/test/variable-subsetter/VariableSubsetter_Regression.ipynb @@ -45,7 +45,6 @@ "from os.path import exists\n", "\n", "from harmony import Client, Collection, Environment, Request\n", - "import numpy as np\n", "\n", "from utilities import (\n", " compare_results_to_reference_file,\n", diff --git a/test/variable-subsetter/version.txt b/test/variable-subsetter/version.txt index 9faa1b7..c946ee6 100644 --- a/test/variable-subsetter/version.txt +++ b/test/variable-subsetter/version.txt @@ -1 +1 @@ -0.1.5 +0.1.6