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

feature request: allow specifying temporal extent with single string #421

Closed
soxofaan opened this issue May 8, 2023 · 2 comments
Closed

Comments

@soxofaan
Copy link
Member

soxofaan commented May 8, 2023

Temporal extents have to be specified as a list/tuple with two dates.
Often, when experimenting/exploring, you just need a single year or month, it would be handy if you can just pass temporal_extent="2022" or temporal_extent="2023-04", which would be converted automatically by the client to appropriate date ranges

@soxofaan
Copy link
Member Author

soxofaan commented Aug 24, 2023

PR #461 was merged but I'd like to iterate a bit further on it:

  • I don't think that string_to_temporal_extent or even get_temporal_extent should be user-facing helpers (related: split up openeo.util #465). They should just be reusable helpers for actual user-facing methods like Connection.load_collection, DataCube.filter_temporal, ... As such I would not document this feature through the doc strings of these functions, but in the rst docs somewhere (e.g. https://open-eo.github.io/openeo-python-client/data_access.html seems like a good option), which could then be linked to from the docs of Connection.load_collection, DataCube.filter_temporal, ... Make sure to mention that year/month based extent handling is available since version 0.23.0
  • add some tests of this feature directly with Connection.load_collection, DataCube.filter_temporal
  • is usage like cube.filter_temporal("2020", "2022") or load_collection(..., temporal_extent=["2021-03", "2022-04"]) also handled: take first day of start date and last day + 1 for end date?
  • Also I think this feature is worth mentioning in the CHANGELOG

JohanKJSchreurs added a commit that referenced this issue Sep 6, 2023
JohanKJSchreurs added a commit that referenced this issue Sep 6, 2023
JohanKJSchreurs added a commit that referenced this issue Sep 6, 2023
JohanKJSchreurs added a commit that referenced this issue Sep 6, 2023
JohanKJSchreurs added a commit that referenced this issue Sep 6, 2023
JohanKJSchreurs added a commit that referenced this issue Sep 6, 2023
JohanKJSchreurs added a commit that referenced this issue Sep 7, 2023
…stead of tuple in load_collection and filter_temporal
JohanKJSchreurs added a commit that referenced this issue Sep 8, 2023
JohanKJSchreurs added a commit that referenced this issue Sep 11, 2023
soxofaan added a commit that referenced this issue Sep 15, 2023
- restructure and change header hierarchy a bit
- trying to make paragraphs and snippets a bit more compact
soxofaan added a commit that referenced this issue Sep 18, 2023
Allows taking better normalization decisions
soxofaan added a commit that referenced this issue Sep 18, 2023
…tency

The "round up" end_date feature as originally proposed
turned out to conflict too much with existing behavior and openEO spec.

Still, the idea can still be provided through single string `extent`: "2022" -> ("2022-01-01", "2023-01-01")
soxofaan added a commit that referenced this issue Sep 18, 2023
soxofaan added a commit that referenced this issue Sep 18, 2023
soxofaan pushed a commit that referenced this issue Sep 20, 2023
soxofaan pushed a commit that referenced this issue Sep 20, 2023
soxofaan pushed a commit that referenced this issue Sep 20, 2023
soxofaan pushed a commit that referenced this issue Sep 20, 2023
soxofaan pushed a commit that referenced this issue Sep 20, 2023
soxofaan pushed a commit that referenced this issue Sep 20, 2023
…stead of tuple in load_collection and filter_temporal
soxofaan pushed a commit that referenced this issue Sep 20, 2023
soxofaan pushed a commit that referenced this issue Sep 20, 2023
soxofaan added a commit that referenced this issue Sep 20, 2023
- restructure and change header hierarchy a bit
- trying to make paragraphs and snippets a bit more compact
soxofaan added a commit that referenced this issue Sep 20, 2023
Allows taking better normalization decisions
soxofaan added a commit that referenced this issue Sep 20, 2023
…tency

The "round up" end_date feature as originally proposed
turned out to conflict too much with existing behavior and openEO spec.

Still, the idea can still be provided through single string `extent`: "2022" -> ("2022-01-01", "2023-01-01")
soxofaan added a commit that referenced this issue Sep 20, 2023
@soxofaan
Copy link
Member Author

done now: merged #468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants