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

Pre release #147

Merged
merged 81 commits into from
Feb 14, 2025
Merged

Pre release #147

merged 81 commits into from
Feb 14, 2025

Conversation

tobin-ford
Copy link
Collaborator

@tobin-ford tobin-ford commented Feb 7, 2025

Parallel Weather Downloads

Utilities for parallelized downloading of PVGIS and NSRDB. This is useful because it allows us to max out the 30 requests/sec to PVGIS using dask for multiprocessing. Not as useful for NSRDB because of the low rate limit per day on api requests.

This is being pushed forward in anticipation of GeoGridFusion being released publicly.

Fixes

#142

GeospatialScenario autobuild KDtrees and restructure files

Remove kdtree as a required argument from GeospatialScenario down-selection methods and classifiers. kdtree objects are now generated on the fly when required and saved back to the class instance so they do not have to be kept track of or rebuilt for each one of these calls.

Major Organization: GeospatialScenario class definition moved from scenario.py to geopspatialscenario.py to maintain reasonable file size for these classes.

Issue ticket number and link

implements request from #122 "remove KDtree from downselect calls. we should generate the kdtree from the scenario's metadata at runtime"

geospatial_quick_tempalate namespace and parameters

  • 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'
    • previously, 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

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • 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

Sorry, something went wrong.

@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 37.91749% with 316 lines in your changes missing coverage. Please review.

Project coverage is 62.71%. Comparing base (2aa7332) to head (984e84b).
Report is 18 commits behind head on development.

Files with missing lines Patch % Lines
pvdeg/pysam.py 14.07% 116 Missing ⚠️
pvdeg/weather.py 43.63% 62 Missing ⚠️
pvdeg/scenario.py 20.00% 48 Missing ⚠️
pvdeg/store.py 31.57% 26 Missing ⚠️
pvdeg/geospatial.py 43.18% 25 Missing ⚠️
pvdeg/utilities.py 13.04% 20 Missing ⚠️
pvdeg/decorators.py 43.75% 18 Missing ⚠️
pvdeg/geospatialscenario.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #147      +/-   ##
===============================================
- Coverage        65.65%   62.71%   -2.94%     
===============================================
  Files               36       39       +3     
  Lines             3549     3935     +386     
===============================================
+ Hits              2330     2468     +138     
- Misses            1219     1467     +248     

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

@tobin-ford tobin-ford marked this pull request as ready for review February 7, 2025 19:19
Copy link
Collaborator

@martin-springer martin-springer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Tobin, it's looking great. Let's talk through some of my comments in our meeting.

@martin-springer martin-springer merged commit 54615a5 into development Feb 14, 2025
6 checks passed
@tobin-ford tobin-ford deleted the pre-release branch February 20, 2025 17:28
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.

4 participants