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

geospatial_quick_tempalate namespace and parameters #146

Closed
wants to merge 1 commit into from

Conversation

tobin-ford
Copy link
Collaborator

Describe your changes

  • decorators.geospatial_quick_shape arguments modified. numeric_or_timeseries, now takes a string ('numeric', 'timeseries') to determine type of outputs rather than a Bool or Int
    • previously, 0 or False represented a numeric/scalar result, now this is represented by 'numeric'
    • previosuly, 1 or True represented a timeseries result, now this is represented by 'timeseries'
  • decorators.py namespace changed to default pvdeg namespace. now this can be directly accessed via pvdeg.decorators. This reduces the need for an extra import.
    • geospatial_quick_shape decorator namespace changed to defualt pvdeg namespace

Previously,

import pvdeg
from pvdeg.decorator import geospatial_quick_shape

@geospatial_quick_shape(0, ...)
def myfunc(...):
    ....

Now, either of the following options work.

import pvdeg

# now takes string instead of integer or boolean value
@pvdeg.decorators.geospatial_quick_shape('numeric', ...)
def myfunc(...):
    ....

or

# this is the style used in the PVDeg package implementations
import pvdeg.decorators

@decorators.geospatial_quick_shape('numeric', ...)
def myfunc(...):
    ....

Fixes

Namespace confusion encountered with Silvana and Riccardo

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I have performed a self-review of my code
  • Code changes are covered by tests.
  • Code changes have been evaluated for compatibility/integration with Scenario analysis (for future PRs)
  • Code changes have been evaluated for compatibility/integration with geospatial autotemplating (for future PRs)
  • New functions added to init.py
  • API.rst is up to date, along with other sphinx docs pages
  • Example notebooks are rerun and differences in results scrutinized
  • What's new changelog has been updated in the docs

@tobin-ford tobin-ford changed the title eospatial_quick_tempalate namespace and paramaters geospatial_quick_tempalate namespace and paramaters Feb 3, 2025
@tobin-ford tobin-ford changed the title geospatial_quick_tempalate namespace and paramaters geospatial_quick_tempalate namespace and parameters Feb 3, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 65.33%. Comparing base (f7469ec) to head (6e442b0).

Files with missing lines Patch % Lines
pvdeg/geospatial.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #146      +/-   ##
===============================================
- Coverage        65.42%   65.33%   -0.10%     
===============================================
  Files               36       36              
  Lines             3575     3568       -7     
===============================================
- Hits              2339     2331       -8     
- Misses            1236     1237       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tobin-ford
Copy link
Collaborator Author

#147

@tobin-ford tobin-ford closed this Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants