Skip to content

Commit 2493a26

Browse files
authored
Merge pull request #1047 from planetlabs/adjust-pv-source-types-documentation
Adjust how PV source types are documented.
2 parents c5061f9 + 5c9a157 commit 2493a26

File tree

2 files changed

+16
-32
lines changed

2 files changed

+16
-32
lines changed

planet/cli/subscriptions.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -406,19 +406,12 @@ def request_catalog(item_types,
406406
@click.option(
407407
'--var-type',
408408
required=True,
409-
help='Planetary variable type.',
410-
type=click.Choice([
411-
"analysis_ready_ps",
412-
"biomass_proxy",
413-
"land_surface_temperature",
414-
"soil_water_content",
415-
"vegetation_optical_depth",
416-
"forest_carbon_monitoring_3m",
417-
"forest_carbon_diligence_30m",
418-
"field_boundaries_sentinel_2_p1m"
419-
]),
409+
help='A Planetary Variable type. See documentation for all available types.'
420410
)
421-
@click.option('--var-id', required=True, help='Planetary variable id.')
411+
@click.option(
412+
'--var-id',
413+
required=True,
414+
help='A Planetary Variable ID. See documenation for all available IDs.')
422415
@click.option(
423416
'--geometry',
424417
required=True,
@@ -438,9 +431,9 @@ def request_pv(var_type, var_id, geometry, start_time, end_time, pretty):
438431
"""Generate a Planetary Variable subscription source.
439432
440433
Planetary Variables come in 4 types and are further subdivided
441-
within these types. See [Subscribing to Planetary
442-
Variables](https://developers.planet.com/docs/subscriptions/pvs-subs/#planetary-variables-types-and-ids)
443-
for details.
434+
within these types. See [Subscribing to Planetary Variables](https://developers.planet.com/docs/subscriptions/pvs-subs/#planetary-variables-types-and-ids)
435+
or the [OpenAPI spec](https://api.planet.com/subscriptions/v1/spec) for
436+
more details.
444437
"""
445438
res = subscription_request.planetary_variable_source(
446439
var_type,

planet/subscription_request.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,7 @@ def catalog_source(
278278

279279

280280
def planetary_variable_source(
281-
var_type: Literal["analysis_ready_ps",
282-
"biomass_proxy",
283-
"land_surface_temperature",
284-
"soil_water_content",
285-
"vegetation_optical_depth",
286-
"forest_carbon_monitoring_3m",
287-
"forest_carbon_diligence_30m",
288-
"field_boundaries_sentinel_2_p1m"],
281+
var_type: str,
289282
var_id: str,
290283
geometry: dict,
291284
start_time: datetime,
@@ -294,22 +287,20 @@ def planetary_variable_source(
294287
"""Construct a Planetary Variable subscription source.
295288
296289
Planetary Variables come in 4 types and are further subdivided
297-
within these types. See [Subscribing to Planetary
298-
Variables](https://developers.planet.com/docs/subscriptions/pvs-subs/#planetary-variables-types-and-ids)
299-
for details.
290+
within these types. See [Subscribing to Planetary Variables](https://developers.planet.com/docs/subscriptions/pvs-subs/#planetary-variables-types-and-ids)
291+
or the [OpenAPI spec](https://api.planet.com/subscriptions/v1/spec) for
292+
more details.
300293
301294
The return value can be passed to
302295
[planet.subscription_request.build_request][].
303296
304297
Note: this function does not validate variable types and ids.
305298
306299
Parameters:
307-
var_type: one of "analysis_ready_ps", "biomass_proxy",
308-
"land_surface_temperature", "soil_water_content",
309-
"vegetation_optical_depth", "forest_carbon_monitoring_3m",
310-
"forest_carbon_diligence_30m, or field_boundaries_sentinel_2_p1m".
311-
var_id: a value such as "SWC-AMSR2-C_V1.0_100" for soil water
312-
content derived from AMSR2 C band.
300+
var_type: Planetary Variable type. See documentation for all
301+
available types.
302+
var_id: A Planetary Variable ID. See documenation for all
303+
available IDs.
313304
geometry: The area of interest of the subscription that will be
314305
used to determine matches.
315306
start_time: The start time of the subscription. This time can be

0 commit comments

Comments
 (0)