Repository navigation
ENH: create custom ensembles without a file and without a date - #1231
Open
MateusStano wants to merge 2 commits into
Open
MateusStano wants to merge 2 commits into
MateusStano wants to merge 2 commits into
Conversation
- `Environment.create_ensemble` keeps the ensemble in memory by default. A file is only written when `file_name` is given. - An ensemble created from profiles has no date: the Environment does not need one, and a saved ensemble loads for any launch date. Ensemble files from elsewhere still check the launch date. - `set_date` and `set_location` leave such an ensemble as it is, and the prints skip its time period. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1231 +/- ##
===========================================
+ Coverage 86.55% 86.57% +0.02%
===========================================
Files 131 131
Lines 18248 18271 +23
===========================================
+ Hits 15794 15818 +24
+ Misses 2454 2453 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Related to #1209 and #1141. This is the #1141 item of the v1.14.0 checklist.
Pull request type
Checklist
ruff) has passed locallyCHANGELOG.md: not updated here, DOC: backfill the v1.14.0 changelog and add breaking changes #1228 is collecting the entriesCurrent behavior
Environment.create_ensemble(new in this release, from #1141) works, but:custom_ensemble.ncin the current folder), so running the same cell twice raisesFileExistsError.New behavior
source = "RocketPy Environment.create_ensemble"; the loader now reads that and skips the date check. An ensemble file from anywhere else still checks the launch date.create_ensembleno longer needs a date.create_ensemble(profiles)builds the ensemble in a netCDF dataset that only exists in memory and loads it through the same code as a file. Passfile_nameto also save it; the method returns the path, orNonewhen nothing was saved.Also:
set_dateandset_locationleave an ensemble made from profiles as it is. Before, they tried to load it again from its file.env.info()does not print a time period for these ensembles.Breaking change
create_ensemblewas never released. Itsfile_namedefault changes from"custom_ensemble.nc"toNone.Additional information
Found while testing and not fixed here, since it also happens on develop for any ensemble:
select_ensemble_memberfails on an Environment that was saved and loaded again (TypeError: list indices must be integers or slices, not tuple).🤖 Generated with Claude Code