Repository navigation
fix: small crashes and warnings - #139
Merged
Merged
Conversation
- Obstruction.get_coordinates() no longer fails with an IndexError when a face is one node wide (obstructions one cell thick). - GeometryCollection.quantities and IsosurfaceCollection.quantities used a non-existent .name attribute and raised AttributeError. - The wall-clock times in CHID_steps.csv are parsed with their UTC offset by fdsreader instead of numpy's deprecated path, which warned on every load. The values are unchanged (UTC). - Exporting a slice without an ID named it "slice2D-"; it is now named after its first .sf file, so several unnamed slices no longer overwrite each other. - Loading a simulation with FDS+Evac data warns that Evac support is deprecated (FutureWarning). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Simulation always gets an EvacCollection, also when Evac classes were registered but their data could not be loaded; the new Evac check otherwise raised AttributeError and the whole simulation failed to load. - Faces one node wide merge near-identical coordinates from neighbouring meshes at half the grid spacing instead of a tolerance of 0. - Wall-clock times are parsed with datetime.fromisoformat instead of a hand-written offset parser. - Tests: pick the matching warning, compare quantities as sets, cover Evac classes without data and daylight saving time changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Fixes a handful of crashes and warnings that came up while writing the example notebooks. Independent of #138.
Crashes
Obstruction.get_coordinates()raisedIndexErrorfor obstructions one cell thick, whose faces are one node wide along an axis. Near-identical coordinates from neighbouring meshes are merged at half the grid spacing.GeometryCollection.quantitiesandIsosurfaceCollection.quantitiesused a non-existent.nameattribute and raisedAttributeError; they now return the quantities.Warnings
CHID_steps.csv(e.g.2024-03-14T09:39:53.199+01:00) were parsed by numpy, which deprecated UTC offsets and warned each time. They are now parsed withdatetime.fromisoformatand stored as UTC, exactly the values numpy produced before.FutureWarningthat Evac support is deprecated (it was only stated in the docs). A simulation whose Evac classes have no loadable data gets an emptyevacscollection.Export
slice2D-.yaml, so several unnamed slices overwrote each other. They are now named after their first.sffile.Tests
tests/test_crash_regressions.py(20 tests) reproduces each case on the test fixtures (bndf_data,geom_data,steckler_data, also the FDS 6.10/6.11 variants); all but the "no Evac warning without Evac data" check fail on the previous code. Three timestamp formats thatfromisoformatonly accepts from Python 3.11 on (Z,+0100,+01) are skipped on 3.10; FDS always writes+hh:mm.🤖 Generated with Claude Code