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.
Browse files
Browse the repository at this point in the history
### Modifications Pull out STAC asset and processing data types. ### Verification Modified unit tests accordingly. --------- Co-authored-by: paulfouquet <[email protected]>
- Loading branch information
1 parent
e2d9e3d
commit 80620df
Showing
7 changed files
with
180 additions
and
138 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.