generated from linz/template-python-hello-world
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Simplify
ImageryItem
constructor TDE-1298
By pulling out STAC asset and processing data types.
- Loading branch information
Showing
7 changed files
with
179 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from datetime import datetime | ||
from typing import Callable | ||
|
||
from scripts.stac.imagery.item import STACAsset, STACProcessing, STACProcessingSoftware | ||
|
||
|
||
def fixed_now_function(now: datetime) -> Callable[[], datetime]: | ||
def func() -> datetime: | ||
return now | ||
|
||
return func | ||
|
||
|
||
def any_stac_asset() -> STACAsset: | ||
return STACAsset( | ||
**{ | ||
"href": "any href", | ||
"file:checksum": "any checksum", | ||
"created": "any created datetime", | ||
"updated": "any updated datetime", | ||
} | ||
) | ||
|
||
|
||
def any_stac_processing() -> STACProcessing: | ||
return STACProcessing( | ||
**{ | ||
"processing:datetime": "any processing datetime", | ||
"processing:software": STACProcessingSoftware( | ||
**{"gdal": "any GDAL version", "linz/topo-imagery": "any topo imagery version"} | ||
), | ||
"processing:version": "any processing version", | ||
} | ||
) |
Oops, something went wrong.