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

Add utils similar to the existing Generators utils for other asset classes #45

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

scdhulipala
Copy link
Contributor

Definitions of get_index and vcat for Storages, GeneratorStorages and Lines to make extracting of a sub set of regions easier. Currently, get_index and vcat is only defined for Generators.

Copy link
Collaborator

@GordStephen GordStephen left a comment

Choose a reason for hiding this comment

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

Thanks, I just had a couple of stylistic requests/questions. We probably don't want to advertise/use these functions too widely as they obviously break region mappings if used incorrectly, but if there are situations where they're useful we may as well include them for all resource types.

In new PRAS we should just generally have a more friendly system manipulation API :)

src/PRASBase/assets.jl Outdated Show resolved Hide resolved
src/PRASBase/assets.jl Outdated Show resolved Hide resolved
src/PRASBase/assets.jl Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2023

Codecov Report

Attention: 88 lines in your changes are missing coverage. Please review.

Comparison is base (2ded134) 94.68% compared to head (440b108) 90.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
- Coverage   94.68%   90.36%   -4.32%     
==========================================
  Files          39       39              
  Lines        1843     1931      +88     
==========================================
  Hits         1745     1745              
- Misses         98      186      +88     
Files Coverage Δ
src/PRASBase/assets.jl 52.43% <1.12%> (-47.57%) ⬇️

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

@GordStephen
Copy link
Collaborator

Looks good. CodeCov indicates that the Generators version of these are tested while the new versions aren't, but I think that's just because vcat and getindex happen to be used within the package (with Generators in the EFC code), not because we have real tests for these.

@GordStephen GordStephen merged commit c6479f4 into master Nov 2, 2023
6 checks passed
@GordStephen GordStephen deleted the dsc/more_asset_utils branch April 15, 2024 23:35
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