Skip to content
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

Adjust how PV source types are documented. #1047

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions planet/cli/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,19 +406,12 @@ def request_catalog(item_types,
@click.option(
'--var-type',
required=True,
help='Planetary variable type.',
type=click.Choice([
"analysis_ready_ps",
"biomass_proxy",
"land_surface_temperature",
"soil_water_content",
"vegetation_optical_depth",
"forest_carbon_monitoring_3m",
"forest_carbon_diligence_30m",
"field_boundaries_sentinel_2_p1m"
]),
help='A Planetary Variable type. See documentation for all available types.'
)
@click.option('--var-id', required=True, help='Planetary variable id.')
@click.option(
'--var-id',
required=True,
help='A Planetary Variable ID. See documenation for all available IDs.')
@click.option(
'--geometry',
required=True,
Expand All @@ -438,9 +431,9 @@ def request_pv(var_type, var_id, geometry, start_time, end_time, pretty):
"""Generate a Planetary Variable subscription source.
Planetary Variables come in 4 types and are further subdivided
within these types. See [Subscribing to Planetary
Variables](https://developers.planet.com/docs/subscriptions/pvs-subs/#planetary-variables-types-and-ids)
for details.
within these types. See [Subscribing to Planetary Variables](https://developers.planet.com/docs/subscriptions/pvs-subs/#planetary-variables-types-and-ids)
or the [OpenAPI spec](https://api.planet.com/subscriptions/v1/spec) for
more details.
"""
res = subscription_request.planetary_variable_source(
var_type,
Expand Down
25 changes: 8 additions & 17 deletions planet/subscription_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,7 @@ def catalog_source(


def planetary_variable_source(
var_type: Literal["analysis_ready_ps",
"biomass_proxy",
"land_surface_temperature",
"soil_water_content",
"vegetation_optical_depth",
"forest_carbon_monitoring_3m",
"forest_carbon_diligence_30m",
"field_boundaries_sentinel_2_p1m"],
var_type: str,
var_id: str,
geometry: dict,
start_time: datetime,
Expand All @@ -294,22 +287,20 @@ def planetary_variable_source(
"""Construct a Planetary Variable subscription source.

Planetary Variables come in 4 types and are further subdivided
within these types. See [Subscribing to Planetary
Variables](https://developers.planet.com/docs/subscriptions/pvs-subs/#planetary-variables-types-and-ids)
for details.
within these types. See [Subscribing to Planetary Variables](https://developers.planet.com/docs/subscriptions/pvs-subs/#planetary-variables-types-and-ids)
or the [OpenAPI spec](https://api.planet.com/subscriptions/v1/spec) for
more details.

The return value can be passed to
[planet.subscription_request.build_request][].

Note: this function does not validate variable types and ids.

Parameters:
var_type: one of "analysis_ready_ps", "biomass_proxy",
"land_surface_temperature", "soil_water_content",
"vegetation_optical_depth", "forest_carbon_monitoring_3m",
"forest_carbon_diligence_30m, or field_boundaries_sentinel_2_p1m".
var_id: a value such as "SWC-AMSR2-C_V1.0_100" for soil water
content derived from AMSR2 C band.
var_type: Planetary Variable type. See documentation for all
available types.
var_id: A Planetary Variable ID. See documenation for all
available IDs.
geometry: The area of interest of the subscription that will be
used to determine matches.
start_time: The start time of the subscription. This time can be
Expand Down
Loading