diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 855336a6..56d759fb 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -1,6 +1,6 @@ name: tests -on: [pull_request, push] +on: [push] jobs: run-tests: diff --git a/examples/Advanced-Custom-ASFProduct-Subclassing.ipynb b/examples/Advanced-Custom-ASFProduct-Subclassing.ipynb index 804f1667..39cec733 100644 --- a/examples/Advanced-Custom-ASFProduct-Subclassing.ipynb +++ b/examples/Advanced-Custom-ASFProduct-Subclassing.ipynb @@ -15,14 +15,13 @@ "- `get_stack_opts()` (returns None in `ASFProduct`, implemented by `ASFStackableProduct` subclass and its subclasses)\n", "- `centroid()`\n", "- `remotezip()` (requires asf-search's optional dependency be installed)\n", - "- `get_property_paths()` (gets product's keywords and their paths in umm dictionary)\n", "- `translate_product()` (reads properties from umm, populates `properties` with associated keyword)\n", "- `get_sort_keys()`\n", "- `umm_get()`\n", "\n", "Key Properties:\n", "- `properties`\n", - "- `_base_properties` (What `get_property_paths()` uses to find values in umm json `properties`)\n", + "- `_base_properties` (maps `properties` keys to values in umm json)\n", "- `umm` (The product's umm JSON from CMR)\n", "- `metadata` (The product's metadata JSON from CMR)" ] @@ -196,12 +195,13 @@ " self.timestamp = datetime.now()\n", "\n", " # _base_properties is a special dict of ASFProduct that maps keywords to granule UMM json\n", - " # defining properties and their paths here in conjunction with `get_property_paths()` \n", - " # will let you easily access them in the product's `properties` dictionary\n", + " # defining properties and their paths here will let you\n", + " # easily access them in the product's `properties` dictionary\n", " # see `ASFProduct.umm_get()` for explanation of pathing\n", " _base_properties = {\n", " # Most product types use `CENTER_ESA_FRAME` as the value for `frameNumber` (unlike S1 and ALOS, which use `FRAME_NUMBER`), \n", " # this creates a new `esaFrame` property so we have that value too\n", + " **asf.S1Product._base_properties,\n", " 'esaFrame': {'path': ['AdditionalAttributes', ('Name', 'CENTER_ESA_FRAME'), 'Values', 0], 'cast': try_parse_int}, #Sentinel and ALOS product alt for frameNumber (ESA_FRAME)\n", " }\n", "\n", @@ -234,16 +234,7 @@ " output['properties']['timestamp'] = str(self.timestamp)\n", " output['properties']['ASFSearchVersion'] = asf.__version__\n", " return output\n", - " \n", - " # This method is used internally by `ASFProduct.translate_product()` \n", - " # to traverse the granule UMM for each property's corresponding values\n", - " @staticmethod\n", - " def get_property_paths() -> dict:\n", - " return {\n", - " **asf.S1Product.get_property_paths(),\n", - " **MyCustomS1Subclass._base_properties\n", - " }\n", - " \n", + "\n", " # ASFProduct.stack() normally stacks the current product\n", " # in this version we search for every SLC-BURST product that\n", " # overlaps the given area with the same source scene, \n", @@ -367,7 +358,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.11.5" } }, "nbformat": 4,