Conversation
fso42
requested changes
Jan 3, 2025
a609e47 to
bae76de
Compare
awirb
requested changes
Feb 21, 2025
Contributor
awirb
left a comment
There was a problem hiding this comment.
I didn't check the pytests and the docu, still TODO
awirb
requested changes
Feb 21, 2025
- it now can correctly split DEM in squares and move them as well as release features. Complete workflow possible to test. Some updates to runRegional - next step: introduce configurations and com1 overrides splitting script and regional prototype progress - regional is now its own computational module (com7) - introduced configurations and overrides for in4 and com7 - in regionalRun, peak files may now be moved to a single outDir - smaller changes rework to preliminary moveOrCopyPeakFiles feature splitInputs "grouping" feature first step - Features in the input shapefile with identical names before the first underscore are added to the same folder and release shapefile introducing catchment and scenario grouping - grouping by name attribute - grouping by scenario attribute - improvements and streamlining of the whole script - improvements and fixes to Com7 - next steps: fix to how the DEM is clipped, split ENT and RES bug fixes and improvements - change to shapefile data structure reading - improved scenario grouping - smaller fixes to com7 add log info about the number of successes in the processed directories PR feedback - docstrings - add prj writing - ini override description - add subfunction writeShapefile - use glob
- PR feedback: rework splitByScenarios, simplify moveOrCopyPeakFiles, etc.. - moved splitInputs dir to be created in "Outputs / in4Region", adjust com7 accordingly - clearer logging - other fixes/improvements rework DEM clipping and add write report - incorporate PR feedback - small improvements to docstrings, comments - fix log output peakFiles add written report; create 2 visual reports - changes to docstrings, visual report, and other fixes move everything from in4 to com7Regional - add labels and cbar to visual report bug fixes; QoL improvements - bug fixes: handle case sensitivity in attributes; empty input geometries - regionalDir may now be set in com7 config - docstrings group by new "Group" attribute instead of by "Name" - suggestion by WLV refactor scenario splitting function; reduce size of stored DEM extents - fixes issue related to RES and ENT being outside DEM bounds when running com1 - control plot & report generation through cfgMain - DEM color bar via pU, new group color scheme add feature for output raster merging in regional run available methods: - max - min - mean - sum - count rework runScript; create com7Main function - get total number of sims to perform at the start (not the most solid approach but can be reworked) - create silent logger option - set pfv max merge as the default output
…ules - Updated index to include new entries in the module list and toctree. test(com7Regional, in4Region): add unit tests for modules and improve `splitInputs` configuration - Added unit tests for `com7Regional` and `in4Region` modules, including `com7RegionalMain` and `splitInputsMain` functions. - Introduced test configurations and data for validation of regional avalanche scenarios. - Updated `splitInputsCfg.ini` to enhance documentation on the `bufferSize`, detailing its influence on group extent relative to release areas.
fso42
approved these changes
Sep 2, 2025
awirb
requested changes
Sep 3, 2025
Contributor
awirb
left a comment
There was a problem hiding this comment.
pytests and docu not yet reviewd
awirb
requested changes
Sep 8, 2025
- Adjusted `moveOrCopyPeakFiles` calls to streamline argument usage by removing `regionalDir`. - Renamed and organized test data files in `testIn4Region` for better structure and consistency. - Integrated new visual reports in documentation. refactor(com7Regional): remove allTimestepOutput, fix tests to run with data in pytests - Removed all references and operations related to `allTimeStepsDir` for simplification. - Updated `moveOrCopyPeakFiles` and `com7RegionalMain` logic to return only `allPeakFilesDir` and `mergedRastersDir`. - Replaced `ascUtils` with `rasterUtils` for improved raster operations across functions. - Adjusted test cases to validate changes, ensuring consistency with the modified directory structure. - Updated default `regionalDir` in configuration for better organization. feat(com7Regional): add new regional input test files refactor(com7Regional): streamline input handling and update `splitInputs` logic; fix flipped DEM - Replaced manual DEM and release area file handling with `getInput` utilities - Renamed `inputDir` to `avalancheDir` for clearer context in directory usage. - Adjusted `clipAndMoveOptionalInput` to match the new directory structure and improve reliability. - Simplified `runSplitInputs.py` script by removing obsolete `inputDir` definition. refactor(docs): remove `in4Region` and merge content under `com7Regional` module docs(com7Regional): update `splitInputs` documentation - Added warnings about the module being under development. - Improved explanations of input and output requirements/structures. - Added details on running regional input management scripts and clarified examples. - Updated references for `com1DFA` and corrected outdated file paths/descriptions. refactor(tests): remove redundant `inputDir` assignment from `test_com7Regional` refactor(shpConversion): consolidate shapefile operations and simplify `splitInputs` - Moved reusable shapefile I/O functions (`readShapefile`, `writeShapefile`) to `shpConversion.py` - Cleaned up unused imports and standardized string formatting for consistency.
… input handling - Replaced directory-based file lookups in `clipAndMoveOptionalInput` with a dictionary-based approach using `allSimInputFiles`. - Streamlined logging for missing files (ENT/RES) docs(tinyHelper): update instructions for DEM extraction and fix data source link fix(com7Regional): correct merged raster flip direction and update doc - Fixed incorrect `flip` argument in `writeResultToRaster` for outputs. - Standardized logging messages in `splitInputs` for missing files (`ENT`/`RES`). - Updated `docs` to refine input/output documentation and clarify examples of directory structures. refactor(com7Regional): simplify `mergeRasters` using `rasterio.merge` - Replaced custom raster merging logic with `rasterio.merge` - Removed parameters (`cellSize`, `noDataValue`) and related code. - Fixed `flip` argument usage in `writeResultToRaster`. refactor(com7Regional): simplify raster merging - Replaced custom raster merging implementation with `rasterio.merge` supporting custom functions via `method=mergeMethod`. refactor(com7Regional): update file handling; review AW - Replaced multiple directory creation calls with `makeADir` for consistency. - Enhanced comments and docstrings for better readability, including `splitInputsMain` and `moveOrCopyPeakFiles`. refactor(out3Plot): revert `createExtentMinMax` with manual extent calculation -
Contributor
|
Standardtests ok |
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.
https://docs.avaframe.org/en/regional/