Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and jeremyh committed Feb 27, 2023
1 parent 357b086 commit 121af1e
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 19 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ from eodatasets3 import DatasetAssembler
with DatasetAssembler(
Path("/some/output/collection/path"), naming_conventions="default"
) as p:

# Add some common metadata fields.
p.platform = "landsat-7"
p.instrument = "ETM"
Expand Down
1 change: 0 additions & 1 deletion eodatasets3/assemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,6 @@ def _inherit_properties_from(
source_dataset: DatasetDoc,
inherit_skip_properties: Optional[List[str]] = None,
):

if not inherit_skip_properties:
# change the inherit_skip_properties to [] if it is None. Make the 'in list check' easier.
inherit_skip_properties = []
Expand Down
6 changes: 5 additions & 1 deletion eodatasets3/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,11 @@ def create_thumbnail_from_numpy(
out_crs = ql_grid.crs

# Scale and write as JPEG to the output.
(thumb_transform, thumb_width, thumb_height,) = calculate_default_transform(
(
thumb_transform,
thumb_width,
thumb_height,
) = calculate_default_transform(
out_crs,
out_crs,
ql_grid.shape[1],
Expand Down
1 change: 0 additions & 1 deletion eodatasets3/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ def __init__(
dataset_separator_field: Optional[str] = None,
allow_unknown_abbreviations: bool = True,
) -> None:

#: The default base URI used in product URI generation
#:
#: Example: ``https://collections.dea.ga.gov.au/``
Expand Down
1 change: 0 additions & 1 deletion eodatasets3/prepare/landsat_l1_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ def _parse_group(
lines: Iterable[Union[str, bytes]],
key_transform: Callable[[str], str] = lambda s: s.lower(),
) -> dict:

tree = {}
for line in lines:
# If line is bytes-like convert to str
Expand Down
2 changes: 0 additions & 2 deletions eodatasets3/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ def _match_product(

# We we have nothing, give up!
if (not matching_products) and (not product):

# Find the product that most closely matches it, to helpfully show the differences!
closest_product_name = None
closest_differences = None
Expand Down Expand Up @@ -1292,7 +1291,6 @@ def _load_remote_product_definitions(
from_datacube: bool = False,
from_explorer_url: Optional[str] = None,
) -> Dict[str, Dict]:

product_definitions = {}
# Load any remote products that were asked for.
if from_explorer_url:
Expand Down
3 changes: 0 additions & 3 deletions eodatasets3/wagl.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def _unpack_products(
for product in product_list:
with sub_product(product, p):
for pathname in [p for p in img_paths if f"/{product.upper()}/" in p]:

with do(f"Path {pathname!r}"):
dataset = h5group[pathname]
band_name = utils.normalise_band_name(dataset.attrs["alias"])
Expand Down Expand Up @@ -225,7 +224,6 @@ def get_oa_resolution_group(
platform: str,
oa_resolution: Optional[Tuple[float, float]],
) -> h5py.Group:

# None specified? Figure out a default.

if oa_resolution is None:
Expand Down Expand Up @@ -532,7 +530,6 @@ def _load_level1_doc(
user_specified_l1_path: Optional[Path] = None,
allow_missing_provenance=False,
):

if user_specified_l1_path:
if not user_specified_l1_path.exists():
raise ValueError(
Expand Down
1 change: 0 additions & 1 deletion tests/integration/prepare/test_esri_land_cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


def test_esri_prepare():

tif_url = ESRI_ANTIMERIDIAN_OVERLAP_TIF.resolve().as_uri()
dataset_doc = as_eo3(tif_url)

Expand Down
1 change: 0 additions & 1 deletion tests/integration/prepare/test_prepare_landsat_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,6 @@ def expected_lt05_l2_c2_folder():


def expected_le07_l2_c2_folder():

return {
"$schema": "https://schemas.opendatacube.org/dataset",
"id": "2184a390-3bfc-5393-91fa-e9dae7c3fe39",
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/test_naming_conventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ def test_africa_naming_conventions(tmp_path: Path):
Minimal fields needed for DEAfrica naming conventions
"""
with DatasetAssembler(tmp_path, naming_conventions="deafrica") as p:

# Just the fields listed in required_fields.
p.producer = "digitalearthafrica.org"
p.datetime = datetime(1998, 7, 30)
Expand All @@ -385,7 +384,6 @@ def test_africa_naming_conventions(tmp_path: Path):
)

with DatasetAssembler(tmp_path, naming_conventions="deafrica") as p:

# Just the fields listed in required_fields.
p.producer = "digitalearthafrica.org"
p.datetime = datetime(1998, 7, 30)
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/test_packagewagl.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ def test_whole_landsat_wagl_package(


def _run_wagl(args):

from eodatasets3.scripts import packagewagl

# No warnings should be logged during package.
Expand Down Expand Up @@ -1145,7 +1144,6 @@ def test_esa_sentinel_wagl_package(tmp_path: Path):


def test_sinergise_sentinel_wagl_package(tmp_path: Path):

_run_wagl(
(
WAGL_SINERGISE_SENTINEL_OUTPUT,
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/test_serialise.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ def _normalise_datetime_props(generated_doc):


def test_location_serialisation(l1_ls8_folder_md_expected: Dict):

l1_ls8_folder_md_expected["location"] = "s3://test/url/metadata.txt"
assert_unchanged_after_roundstrip(l1_ls8_folder_md_expected)


def test_location_single_serialisation(tmp_path: Path, l1_ls8_folder_md_expected: Dict):

# Always serialises a single location as 'location'
location = "https://some/test/path"

Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_tostac.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def expected_stac_doc(input_doc_folder: Path) -> Dict:


def test_tostac(odc_dataset_path: Path, expected_stac_doc: Dict):

run_tostac(odc_dataset_path)

expected_output_path = odc_dataset_path.with_name(
Expand Down

0 comments on commit 121af1e

Please sign in to comment.