custom h5 file exceptions#577
Open
jph6366 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
custom reV errors/exceptions
<2026-04-10 Fri>
story
implement custom rev exceptions to replace base exceptions
Unused exceptions
Hide/Show Documented Exceptions
SAM
/SAM.py/
SAMExecutionError
SAMInputWarning
SAMInputError
setattr(getattr(self.pysam, group), key, value)ResourceError
/econ.py/
/windbos.py/
/defaults.py/
/generation.py/
temperaturefor sitepotential_MW""/version_checker.py/
bespoke
/bespoke.py/
/pack_turbs.py/
/place_turbines.py/
config
/base_config.py/
/project_points.py/
/execution.py/
econ
/econ.py/
econ_funfails during SAM econ execution/cli_econ.py/
/economies_of_scale.py/
generation
/base.py/
/cli_gen.py/
/generation.py/
cls.OPTIONS[tech].reV_runfailshandlers
/exclusions.py/
/multi_year.py/
/transmission.py/
losses
/power_curve.py/
/utils.py/
/scheduled.py/
nrwal
/nrwal.py/
qa_qc
/qa_qc.py/
rep_profiles
/rep_profiles.py/
supply_curves
/aggregation.py/
/sc_aggregation.py/
/supply_curve.py/
/competitive_wind_farms.py/
/points.py/
/exclusions.py/
/tech_mapping.py/
utilities
/curtailment.py/
implementation
testing
.txtor.csvinto the glob pattern:MultiYear.parse_source_files_pattern("/path/to/data_*.txt")MultiYear.is_profile('test_2020.h5', 'cf_profile')with MultiYear('out_my.h5', mode='a') as my:my.collect(['year_2020.h5', 'year_2021.h5'], 'cf_mean')my_collect_groups('output_my.h5', groups={...}, clobber=True)comments
“User code can raise built-in exceptions. This can be used to test an exception handler or to report an error condition “just like” the situation in which the interpreter raises the same exception; but beware that there is nothing to prevent user code from raising an inappropriate error.”
“ It’s recommended to only subclass one exception type at a time to avoid any possible conflicts between how the bases handle the args attribute, as well as due to possible memory layout incompatibilities.”
Allows downstream users of reV to catch reV exceptions explicitly