Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#90)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.7 → v0.6.8](astral-sh/ruff-pre-commit@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 <[email protected]>
Co-authored-by: Owen Littlejohns <[email protected]>
  • Loading branch information
3 people authored Oct 7, 2024
1 parent 876ce33 commit 6036f02
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 0 additions & 4 deletions test/geoloco/Geoloco_Regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/geoloco/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1
1.0.2
21 changes: 11 additions & 10 deletions test/harmony-regression/HarmonyRegression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/harmony-regression/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.6
0.1.7
34 changes: 9 additions & 25 deletions test/hybig/HyBIG_Regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -859,7 +843,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.9"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion test/hybig/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.7
0.0.8
4 changes: 1 addition & 3 deletions test/net2cog/net2cog_Regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/net2cog/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
9 changes: 4 additions & 5 deletions test/nsidc-icesat2/NSIDC-ICESAT2_Regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
" )"
]
},
Expand Down Expand Up @@ -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",
" )"
]
},
Expand Down Expand Up @@ -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",
" )"
]
}
Expand Down
2 changes: 1 addition & 1 deletion test/nsidc-icesat2/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.0.3
1 change: 0 additions & 1 deletion test/variable-subsetter/VariableSubsetter_Regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/variable-subsetter/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.5
0.1.6

0 comments on commit 6036f02

Please sign in to comment.