-
Notifications
You must be signed in to change notification settings - Fork 96
Item type and asset type validation in Data and Subscriptions #905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 20 commits
47c5002
b861774
5deba79
9358029
19f088b
688b23b
19d5ac1
d3e5fe5
a1819c9
bd43ec2
383deba
6c7faa1
44a82b4
4328639
adb4bba
7df6274
7e8fdaa
7e98d59
51c4485
6a8eb49
bb70f60
bf0d3f5
4ccb908
baae55a
608fc51
abbd994
b39f611
3512f80
bd6b7df
f1af245
0ad9816
a3900d2
5e41ec0
2d62bd2
c0cb296
03d3308
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,6 +127,13 @@ def catalog_source( | |
planet.exceptions.ClientError: If start_time or end_time are not valid | ||
datetimes | ||
''' | ||
for i in range(len(item_types)): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code errors out when I use multiple item-types:
it is fine if there is just one item-type
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, yes I wrote this so you'd have to explicitly write out the asset type you wanted for a given item type. Sure, your example would be fine, but what if you want ❯ planet subscriptions request-catalog \
--item-types item_type1,item_type_2,item_type_3 \
--asset-types asset_type_a, asset_type_b \
--geometry ../jsons_for_tests/aoi.geojson \
--start-time 2022-01-01 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see your comment in Slack. As you pointed out, the docs claim that a subscription will only be successfully made if one |
||
try: | ||
asset_types[i] = specs.validate_asset_type(item_types[i], | ||
asset_types[i]) | ||
except specs.SpecificationException as exception: | ||
raise ClientError(exception) | ||
|
||
parameters = { | ||
"item_types": item_types, | ||
"asset_types": asset_types, | ||
|
Uh oh!
There was an error while loading. Please reload this page.