Skip to content

Conversation

@lachlangrose
Copy link
Member

No description provided.

lachlangrose and others added 30 commits June 17, 2025 10:43
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
lachlangrose and others added 15 commits December 16, 2025 11:08
#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>
@lachlangrose lachlangrose added documentation Improvements or additions to documentation ci-cd labels Jan 15, 2026
Copy link

Copilot AI left a 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
Copy link

Copilot AI Jan 19, 2026

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.

Copilot uses AI. Check for mistakes.
try:
if debug_manager and getattr(debug_manager, "is_debug", lambda: False)():

_layers = {"geology": geology, "faults": faults}
Copy link

Copilot AI Jan 19, 2026

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.

Copilot uses AI. Check for mistakes.
if debug_manager and getattr(debug_manager, "is_debug", lambda: False)():

_layers = {"geology": geology, "faults": faults}
_pickles = {"contact_extractor": contact_extractor}
Copy link

Copilot AI Jan 19, 2026

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.

Copilot uses AI. Check for mistakes.
_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(
Copy link

Copilot AI Jan 19, 2026

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.

Copilot uses AI. Check for mistakes.
try:
if debug_manager and getattr(debug_manager, "is_debug", lambda: False)():

_exported = export_debug_package(
Copy link

Copilot AI Jan 19, 2026

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.

Copilot uses AI. Check for mistakes.
epsg = geodataframe.crs.to_epsg()
if epsg:
crs = QgsCoordinateReferenceSystem.fromEpsgId(int(epsg))
except Exception:
Copy link

Copilot AI Jan 19, 2026

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.

Copilot uses AI. Check for mistakes.
if isinstance(val, np.generic):
try:
val = val.item()
except Exception:
Copy link

Copilot AI Jan 19, 2026

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.

Copilot uses AI. Check for mistakes.
logger.debug(f"Removed existing mesh: {mesh_name}")
except Exception:
logger.debug(f"Failed to remove existing mesh: {mesh_name}")
pass
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary 'pass' statement.

Copilot uses AI. Check for mistakes.
self._rebuild_timer.start()
except Exception:
logger.debug('Failed to schedule debounced rebuild', exc_info=True)
pass
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary 'pass' statement.

Suggested change
pass

Copilot uses AI. Check for mistakes.
except Exception as e:
print("Failed to save sampler debug info")
print(e)
pass
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary 'pass' statement.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd documentation Improvements or additions to documentation quality tooling UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants