-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add wrapper for csg #286
Add wrapper for csg #286
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #286 +/- ##
==========================================
- Coverage 97.15% 97.07% -0.09%
==========================================
Files 49 51 +2
Lines 4748 4848 +100
==========================================
+ Hits 4613 4706 +93
- Misses 135 142 +7 ☔ View full report in Codecov by Sentry. |
Use future implementation of stack in `nir_convert_df_to_long`
… start and end year.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some typos in the docs
docs/source/usage/csg.md
Outdated
The {py:func}`primap2.csg.compose` function creates a composite time series according to | ||
the given priorities and strategies, but it does not take care of pre- and postprocessing | ||
of the data. It will carry along unnecessary data and the resulting dataset will miss the | ||
priority coordinates. The {py:func}`primap2.csg.create_composite_source` function takes acre |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
priority coordinates. The {py:func}`primap2.csg.create_composite_source` function takes acre | |
priority coordinates. The {py:func}`primap2.csg.create_composite_source` function takes care |
docs/source/usage/csg.md
Outdated
define pre- and postprocessing: | ||
|
||
* **result_prio_coords** Defines the vales for the priority coordinates in the output dataset. As the | ||
priority coordinates differ for all input sources there is no canonical vale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
priority coordinates differ for all input sources there is no canonical vale | |
priority coordinates differ for all input sources there is no canonical value |
docs/source/usage/csg.md
Outdated
|
||
``` | ||
|
||
* **limit_coords** Optional parameter to remove data for coordinate vales not needed for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* **limit_coords** Optional parameter to remove data for coordinate vales not needed for the | |
* **limit_coords** Optional parameter to remove data for coordinate values not needed for the |
docs/source/usage/csg.md
Outdated
|
||
* **limit_coords** Optional parameter to remove data for coordinate vales not needed for the | ||
composition from the input data. The time coordinate is treated separately. | ||
* **time_range** Optional parameter to limit the time coverage of the input data. The input can either be pandas `DatetimeIndex` or a tuple of `str` or datetime-like in the form (year_from, year_to) where both boundaries are included in the range. Only the overlap of the supplied index or index created from the tuple with the time coordinate of the input dataset will be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* **time_range** Optional parameter to limit the time coverage of the input data. The input can either be pandas `DatetimeIndex` or a tuple of `str` or datetime-like in the form (year_from, year_to) where both boundaries are included in the range. Only the overlap of the supplied index or index created from the tuple with the time coordinate of the input dataset will be used. | |
* **time_range** Optional parameter to limit the time coverage of the input data. The input can either be a pandas `DatetimeIndex` or a tuple of `str` or datetime-like in the form (year_from, year_to) where both boundaries are included in the range. Only the overlap of the supplied index or index created from the tuple with the time coordinate of the input dataset will be used. |
primap2/csg/__init__.py
Outdated
"create_time_index", | ||
"set_priority_coords", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need create_time_index
and set_priority_coords
in the public API? I'd think users only need to know about create_composite_source
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there was an issue with imports when importing directly from the files but I'm not sure. I'll try if it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was no problem to change the import in the tests.
All suggestions accepted now |
CSG wrapper: small fixes
Pull request
This PR adds a wrapper around the
primap2.csg.compose()
function that prepares input data (e.g. remove unnecessary data) and postprocesses the output (add coordinates that were used in the process with new values).A larger test for the compose function as well a small test for a subfunction are added as well.
Docs will be extended.
Please confirm that this pull request has done the following:
{pr}.thing.md
file in the directorychangelog
added - see changelog/README.md for detailsDescription
Please provide a short description what your pull request does.