-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
@mbuchhorn pointed me to this snippet from doc:
openeo-python-client/docs/cookbook/sampling.md
Lines 37 to 42 in 7c321be
| job = s2_bands.create_job( | |
| title="Sentinel2", | |
| description="Sentinel-2 L2A bands", | |
| out_format="netCDF", | |
| sample_by_feature=True, | |
| ) |
I find this extremely confusing: the sample_by_feature looks like a job option this way, while the kwargs will be passed as format option:
openeo-python-client/openeo/rest/datacube.py
Lines 2411 to 2423 in 7c321be
| def create_job( | |
| self, | |
| out_format: Optional[str] = None, | |
| *, | |
| title: Optional[str] = None, | |
| description: Optional[str] = None, | |
| plan: Optional[str] = None, | |
| budget: Optional[float] = None, | |
| job_options: Optional[dict] = None, | |
| validate: Optional[bool] = None, | |
| auto_add_save_result: bool = True, | |
| # TODO: avoid `format_options` as keyword arguments | |
| **format_options, |
Note that there is a dedicated argument job_options for the job options, but the kwargs argument goes to format options, which is an optional feature here actually. I think we should get rid of this backwards argument handling