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

quadtree csv reader #186

Merged
merged 5 commits into from
Feb 23, 2022
Merged

quadtree csv reader #186

merged 5 commits into from
Feb 23, 2022

Conversation

khawajasim
Copy link
Contributor

pyCSEP Pull Request Checklist

Please check out the contributing guidelines for some tips
on making pull requests to pyCSEP.

Fixes issue #(please fill in or delete if not needed).

Type of change:

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)
  • Documentation update (this pull request adds no new code)
  • Unpublished science feature (This may require a science review)
  • This change requires a documentation update

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2022

Codecov Report

Merging #186 (a9a35b2) into master (ad217ed) will decrease coverage by 0.10%.
The diff coverage is 50.00%.

❗ Current head a9a35b2 differs from pull request most recent head 876d877. Consider uploading reports for the commit 876d877 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #186      +/-   ##
==========================================
- Coverage   55.84%   55.73%   -0.11%     
==========================================
  Files          20       20              
  Lines        3560     3572      +12     
  Branches      568      569       +1     
==========================================
+ Hits         1988     1991       +3     
- Misses       1452     1460       +8     
- Partials      120      121       +1     
Impacted Files Coverage Δ
csep/utils/readers.py 46.98% <22.22%> (-0.86%) ⬇️
csep/core/regions.py 46.75% <77.77%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad217ed...876d877. Read the comment docs.

return rates, region, mws


def load_quadtree_forecast_csv(csv_fname):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we change this name to quadtree_csv_loader. Reason: this function name implies that it will return a forecast object. Also should change the name of the other function to quadtree_ascii_loader.

@wsavran
Copy link
Collaborator

wsavran commented Feb 22, 2022

aside from the comment above, this looks good to merge.

@khawajasim
Copy link
Contributor Author

Can you accept the last two enhancements I added? grid bounds for cartesian gird will be useful for writing generic function for forecast aggregation. And the check for zero cell area is also generally useful. Without this check, the function does not return zero.

@wsavran
Copy link
Collaborator

wsavran commented Feb 23, 2022

looks good to me ! merging.

@wsavran wsavran merged commit d13f74f into SCECcode:master Feb 23, 2022
wsavran added a commit that referenced this pull request Dec 12, 2022
* Quadtree csv reader (#186)
* New plotting routines (#190)
* Non poissonian tests (#189, #202, #205, #208, #209)
* Fix region border plot (#199)
* Added support for BSI catalog (#201)
* Fix consistency plots (#206)
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.

3 participants