Closed tobin-ford closed 1 month ago
Attention: Patch coverage is 79.77528%
with 18 lines
in your changes missing coverage. Please review.
Project coverage is 68.78%. Comparing base (
57cb222
) to head (0dc5089
).
Files | Patch % | Lines |
---|---|---|
pvdeg/geospatial.py | 35.71% | 18 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Describe your changes
Created an generalized autotemplating system for
pvdeg
functions. Remove the work of creating your own shapes/templates for geospatial analysis. Also updated the PR template to include a check box for autotemplating considerations with changes.Adds a new module,
decorators.py
(not in init on purpose), containing a decorator to modify the attributes of functions so we can skip runtime introspection and go straight to the relevant attributes for creating a geospatial template usingpvdeg.geospatial.autotemplate
.This is only meant to work on functions with strict return types. i.e. the function always returns the same type of values, such as
then the autotemplating decorator can be used. However, if the function return type is ambigious (it returns different types) based on the input, then autotemplating cannot be used.
Note: I named the decorator
geospatial_return_type
and it adds two attributes to a wrapped function,numeric_or_timeseries
andshape_names
. I'm not in love with the decorator name, or the first attribute name because it is a boolean. Name suggestions are welcome.Type of change
Please delete options that are not relevant.
Checklist before requesting a review
pvdeg
)