-
Notifications
You must be signed in to change notification settings - Fork 1
Dev 0.1.12 #64
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
base: main
Are you sure you want to change the base?
Dev 0.1.12 #64
Conversation
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 9 to 11. - [Release notes](https://github.com/dawidd6/action-download-artifact/releases) - [Commits](dawidd6/action-download-artifact@v9...v11) --- updated-dependencies: - dependency-name: dawidd6/action-download-artifact dependency-version: '11' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
ci: fix formatting of release-please
…ction-download-artifact-11 Bump dawidd6/action-download-artifact from 9 to 11
…processing/sorter
adding basal contacts unit name
#59) * Initial plan * feat: add debug manager and directory setting Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> * chore: refine debug handling and options Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> * chore: address review follow ups Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> * fix: convert unit_name_field to 'UNITNAME' * fix: updating unload to prevent error when missing dock widgets * fix: rename unit_name_column to unit_name_field * fix: update stratigraphic column with calculated thicknesses * fix: update stratigraphic unit to prevent missing widget error * style: formatting * chore: log layer sources in debug params Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> * feat: export layers and add offline runner script Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> * fix: give debug manager the logger * fix: add generic exporter for m2l objects * fix: pass debug manager to api for exporting packages * move export to debug manager --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> Co-authored-by: Lachlan Grose <lachlan.grose@monash.edu>
* Initial plan * feat: add debug manager and directory setting Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> * chore: refine debug handling and options Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> * chore: address review follow ups Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> * fix: convert unit_name_field to 'UNITNAME' * fix: updating unload to prevent error when missing dock widgets * fix: rename unit_name_column to unit_name_field * fix: update stratigraphic column with calculated thicknesses * fix: update stratigraphic unit to prevent missing widget error * style: formatting * chore: log layer sources in debug params Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> * feat: export layers and add offline runner script Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com> * fix: give debug manager the logger * fix: add generic exporter for m2l objects * fix: pass debug manager to api for exporting packages * move export to debug manager * adding rebuild with debounce when geometry properties are changed * call update feature when rebuild is required * adding progress bar when model update is required * keep track of source feature for meshes * update feature in viewer when it changes * fix: debug mode changes logging * adding copilot fixes --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lachlangrose <7371904+lachlangrose@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request represents development release 0.1.12, introducing significant enhancements to the LoopStructural QGIS plugin. The PR adds map2loop integration tools, improves performance through debouncing and threading, implements an Observable pattern for model updates, and includes extensive code cleanup.
Changes:
- Added map2loop processing tools (sampler, sorter, basal contacts, thickness calculator) with dedicated GUI widgets and API integration
- Implemented Observer pattern for model updates with background threading support for expensive operations
- Added intelligent column matching utility (ColumnMatcher) and debug infrastructure for troubleshooting
- Enhanced UI responsiveness with debounced rebuilds and efficient stratigraphic column updates
- Updated dependencies (LoopStructural 1.6.24, numpy 1.26.4) and cleaned up code formatting
Reviewed changes
Copilot reviewed 49 out of 72 changed files in this pull request and generated 56 comments.
Show a summary per file
| File | Description |
|---|---|
| loopstructural/main/m2l_api.py | New API module providing unified interface to map2loop tools (sampling, sorting, contacts, thickness) |
| loopstructural/main/helpers.py | Column matching utility with fuzzy string matching and geological field aliases |
| loopstructural/main/model_manager.py | Observable pattern implementation with thread-safe notifications and update methods |
| loopstructural/plugin_main.py | Duplicate action/menu registrations; defensive unload logic |
| loopstructural/gui/map2loop_tools/*.py | New GUI widgets for map2loop processing tools |
| loopstructural/gui/modelling/geological_model_tab/*.py | Background threading for model updates; debounced feature rebuilds |
| loopstructural/toolbelt/preferences.py | Debug directory preference and logging configuration |
| loopstructural/requirements.txt | Dependency updates (LoopStructural 1.6.24, numpy 1.26.4) |
| tests/qgis/*.py | Whitespace cleanup and string formatting improvements |
| tests/qgis/test_column_matching.py | Comprehensive test suite for ColumnMatcher |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Build units DataFrame | ||
| if ( | ||
| unit_name_field | ||
| and unit_name_field != unit_name_field |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparison of identical values; use cmath.isnan() if testing for not-a-number.
| try: | ||
| if debug_manager and getattr(debug_manager, "is_debug", lambda: False)(): | ||
|
|
||
| _layers = {"geology": geology, "faults": faults} |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable _layers is not used.
| if debug_manager and getattr(debug_manager, "is_debug", lambda: False)(): | ||
|
|
||
| _layers = {"geology": geology, "faults": faults} | ||
| _pickles = {"contact_extractor": contact_extractor} |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable _pickles is not used.
| _layers = {"geology": geology, "faults": faults} | ||
| _pickles = {"contact_extractor": contact_extractor} | ||
| # export layers and pickles first to get the actual filenames used | ||
| _exported = export_debug_package( |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable _exported is not used.
| try: | ||
| if debug_manager and getattr(debug_manager, "is_debug", lambda: False)(): | ||
|
|
||
| _exported = export_debug_package( |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable _exported is not used.
| epsg = geodataframe.crs.to_epsg() | ||
| if epsg: | ||
| crs = QgsCoordinateReferenceSystem.fromEpsgId(int(epsg)) | ||
| except Exception: |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| if isinstance(val, np.generic): | ||
| try: | ||
| val = val.item() | ||
| except Exception: |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| logger.debug(f"Removed existing mesh: {mesh_name}") | ||
| except Exception: | ||
| logger.debug(f"Failed to remove existing mesh: {mesh_name}") | ||
| pass |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary 'pass' statement.
| self._rebuild_timer.start() | ||
| except Exception: | ||
| logger.debug('Failed to schedule debounced rebuild', exc_info=True) | ||
| pass |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary 'pass' statement.
| pass |
| except Exception as e: | ||
| print("Failed to save sampler debug info") | ||
| print(e) | ||
| pass |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary 'pass' statement.
No description provided.