Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
9e744cb
Decluttering UI stage 1
May 20, 2025
7a92212
modular widgets for layer selection
May 21, 2025
7399bdd
ruff fix
May 21, 2025
bc7845b
make tabs scrollable if required
May 21, 2025
4fadd68
add unconformity to strat column
May 21, 2025
a952692
add extents tab to bounding box widget
May 21, 2025
3c197ba
move data manager into main from gui
May 26, 2025
055d5f1
add project manager class to manage interaction with qgs project
May 26, 2025
bcf5fe9
connect ui elements for stratigraphic layers
May 26, 2025
7394001
refactor bb ui
May 26, 2025
0b79f5c
adding data manager to the tabs/widgets
May 26, 2025
76f763b
conecting widgets to data manager
May 27, 2025
91880b0
updating stratigraphic column widget/manager
Jun 2, 2025
1aaa609
update stratigraphic column to use uuid instead of name
Jun 3, 2025
b7a6d4e
fix: adding new dock widget for 3D viewer
Jun 3, 2025
f6c5da0
adding model manager
Jun 16, 2025
58e89ce
fix: update bb nelements
lachlangrose Jun 23, 2025
5d6949b
fix: add qgistogeodataframe
lachlangrose Jun 23, 2025
64f0a29
fix: update data manager when fault layer changes
lachlangrose Jun 23, 2025
5a00032
fix: model manager implementation for faults
lachlangrose Jun 23, 2025
00c4d31
fix: add unit to gui without creating a new one
lachlangrose Jun 23, 2025
ac7070e
fix: add feature detail panels
lachlangrose Jun 23, 2025
863f970
fix: link model manager and data manager
lachlangrose Jun 23, 2025
a6fea12
fix: visualisation load external meshes
lachlangrose Jun 23, 2025
12edfea
fix: allow updating of stratigraphic column element
lachlangrose Jun 24, 2025
fc9685a
fix: don't duplicate features in featurelist
lachlangrose Jun 24, 2025
e180e9b
fix: update stratigraphic column units when thickness/name changes
lachlangrose Jun 24, 2025
54c3b16
fix: build stratigraphy objects
lachlangrose Jun 24, 2025
c3c2f71
setting up pre-commit
lachlangrose Jun 25, 2025
48647ec
precommit on non python files
lachlangrose Jun 25, 2025
0e3aa8b
precommit
lachlangrose Jun 25, 2025
7a73327
fix: move data/model manager to plugin main
lachlangrose Jun 25, 2025
6ee278b
fix: add clear stratigraphic column
lachlangrose Jun 25, 2025
606e3f4
fix: remove name string and colour button from stratigraphic unit
lachlangrose Jun 25, 2025
d4a0312
fix: add feature list widget. Shows all features in model for the vis…
lachlangrose Jun 25, 2025
393e343
fix: add stratgiraphic column to model when building stratigraphy
lachlangrose Jun 25, 2025
83effed
fix: call update stratirgaphy whenever column changes
lachlangrose Jun 25, 2025
e695b5f
misc
lachlangrose Jun 25, 2025
472ff09
fix: don't try and add scalarbar to the object list
lachlangrose Jun 25, 2025
5bf2e66
fix: connect orientation type toggle
lachlangrose Jun 25, 2025
fd6f4d7
fix: add structural data to unit
lachlangrose Jun 25, 2025
94b101d
fixing object removal and allowing multi select
lachlangrose Jul 14, 2025
74a2e83
allow bigger range for bb
lachlangrose Jul 15, 2025
cdf2f64
check if layer is none if it is don't try to access it
lachlangrose Jul 15, 2025
517da6b
load bb from prohject
lachlangrose Jul 15, 2025
3062df0
add faults before features.
lachlangrose Jul 15, 2025
4a9c775
set bounding box widget when data manager bounding box changes
lachlangrose Jul 15, 2025
433eabb
add regularisation/npw/cpw
lachlangrose Jul 15, 2025
74e034c
move project save to the data manager
lachlangrose Jul 15, 2025
4c5870a
adding fault trace and stratigraphic layers callbacks to set the widg…
lachlangrose Jul 15, 2025
b10cfd9
load stratigraphic column from project
lachlangrose Jul 15, 2025
16885e1
remove null items from dictionary before passing to widget
lachlangrose Jul 15, 2025
05c3975
if line is none don't try to sample it
lachlangrose Jul 15, 2025
f30f064
move both widgets into the same widget but separate with bottom level…
lachlangrose Jul 16, 2025
b80d526
add fault adjacency tab, not connected yet
lachlangrose Jul 16, 2025
bd93d95
adding dem/elevation for model
lachlangrose Jul 16, 2025
c33cdec
fix: add loopstructural log messages to qgis plugin
lachlangrose Jul 21, 2025
a4689d6
fix: port to using stratigraphic column object from loopstructural
lachlangrose Jul 21, 2025
f40aa17
fix: add dem
lachlangrose Jul 21, 2025
b64a2d6
fix: change interpolation weights to qdoublespinbox
lachlangrose Jul 21, 2025
82708dd
fix: don't add fields that aren't in the fault layer
lachlangrose Jul 21, 2025
6705655
fix: ignore unconformities for feature settings...
lachlangrose Jul 21, 2025
224a55e
fix: put all loopstructural logs in 'LoopStructural' heading
lachlangrose Jul 21, 2025
d91a90c
fix: add uuid to dictionary for created units
lachlangrose Jul 21, 2025
41953ba
fix: update dependencies/add qpip
lachlangrose Jul 21, 2025
ca87466
fix: only show loopstructural warning messages
lachlangrose Jul 21, 2025
bf631a9
fix: adding placeholder for default boundingbox.
lachlangrose Jul 21, 2025
604ca00
fix: stratigraphic column was reversed.
lachlangrose Jul 21, 2025
cea7d79
fix: allow z coordinate from shapefile to be used for elevation
lachlangrose Jul 21, 2025
67c8c2c
Update auto-labeler.yml
lachlangrose Jul 22, 2025
68067bc
Update auto-labeler.yml
lachlangrose Jul 22, 2025
0e8db15
fix: different settings for structural frames
lachlangrose Jul 22, 2025
aca081c
fix: add instructions labels to fault adjacency and stratigraphic uni…
lachlangrose Jul 22, 2025
7123388
Merge branch 'ui/refactor-into-separate-classes' of github.com:Loop3D…
lachlangrose Jul 22, 2025
b00450d
fix: remove unnecessary blank line in LoopstructuralPlugin class
lachlangrose Jul 22, 2025
377b39a
fix: fault topology plugged into LoopStructural classes with observer…
lachlangrose Jul 23, 2025
d231204
fix: add option to use shapefile z values instead of dem when the sha…
lachlangrose Jul 23, 2025
65b91cd
fix: add abutting relationships to model
lachlangrose Jul 23, 2025
996cdb8
fix: fault fault topology working
lachlangrose Jul 23, 2025
819cea1
fix: get displacement/dip/pitch from fault trace attributes
lachlangrose Jul 23, 2025
82de51e
temp disable fault parameters
lachlangrose Jul 24, 2025
1b0014b
fix: adding checks to make sure the fields are not none and are in th…
lachlangrose Jul 24, 2025
95a7b15
fix: store reference to object instead of actor
lachlangrose Jul 24, 2025
4c3fd30
fix: make sure unit name is a string
lachlangrose Jul 24, 2025
be06c6f
fix: adding placeholder to save object to file
lachlangrose Jul 24, 2025
a911bb9
fix: use default bb zmin/zmax
lachlangrose Jul 24, 2025
18d89ec
style: autoformatting
lachlangrose Jul 24, 2025
65de3be
fix: add meshio as requirement
lachlangrose Jul 24, 2025
d25dced
fix: use 3D extent for setting bounding box
lachlangrose Jul 24, 2025
f925085
fix: link feature to feature panel
lachlangrose Jul 30, 2025
f22d286
fix: update fault when layer changes and remove faults when changing …
lachlangrose Jul 30, 2025
ba95b0e
fix: add setter/getter for name field to prevent name not being a string
lachlangrose Jul 30, 2025
f9c3efd
fix: strike = dip_dir-90
lachlangrose Jul 30, 2025
bb19086
fix: add axes to plot
lachlangrose Jul 30, 2025
0b5a5fa
fix: scale vector appropriate to model bb
lachlangrose Jul 30, 2025
a391480
fix: remove print statements and add default sampler output
lachlangrose Jul 30, 2025
e61e4e2
fix: nelements not n_elements
lachlangrose Jul 30, 2025
f51f850
style: clean up
lachlangrose Jul 30, 2025
8bf531b
fix: don't add unconformities to feature list
lachlangrose Jul 30, 2025
dd06eb3
fix: add key mapping for view/delete
lachlangrose Jul 30, 2025
61dd482
fix: set defaults for interpolator in qgs plugin
lachlangrose Jul 30, 2025
e917539
fix: add bounding box outline instead of solid box
lachlangrose Jul 30, 2025
58c25ed
fix: update dem layer from project save
lachlangrose Jul 30, 2025
6a138cf
fix: update requirements for LoopStructural
lachlangrose Jul 30, 2025
7b036d5
fix: remove unused buttons
lachlangrose Jul 30, 2025
68c6a09
Merge branch 'main' into ui/refactor-into-separate-classes
lachlangrose Jul 30, 2025
40fa142
fix: remove unused imports and clean up code
lachlangrose Jul 30, 2025
2d4331d
Merge branch 'ui/refactor-into-separate-classes' of github.com:Loop3D…
lachlangrose Jul 30, 2025
de2fa38
docs: adding design document
lachlangrose Jul 30, 2025
6afc569
fix: reorder import statements and improve error handling for depende…
lachlangrose Jul 30, 2025
62d18f0
style: running pre-commit
lachlangrose Jul 30, 2025
ce3426b
fix: adding permission to linter
lachlangrose Jul 30, 2025
d37adb0
style: running black
lachlangrose Jul 30, 2025
a34bb33
ci: disable auto-commit
lachlangrose Jul 30, 2025
89d1aa6
Merge branch 'main' into ui/refactor-into-separate-classes
lachlangrose Jul 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tooling:
- any-glob-to-any-file:
- .pre-commit-config.yaml
- setup.cfg


UI:
- head-branch:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/auto-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "🏷 PR Labeler"
name: "Pull Request Labeler"
on:
- pull_request_target
- pull_request_target

jobs:
triage:
labeler:
permissions:
contents: read
pull-requests: write
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- "loopstructural/**/*.py"
- "loopstructural/metadata.txt"
- 'requirements/documentation.txt'
tags:
tags:
- "*"

pull_request:
Expand Down Expand Up @@ -87,9 +87,8 @@ jobs:
with:
# Upload entire repository
path: docs/_build/html/

- name: Deploy to GitHub Pages
id: deployment
if: ${{ github.event_name == 'push' && ( startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' ) }}
uses: actions/deploy-pages@v4

9 changes: 5 additions & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
env:
PROJECT_FOLDER: "loopstructural"
PYTHON_VERSION: 3.9
permissions:
contents: write


jobs:
Expand Down Expand Up @@ -44,8 +46,7 @@ jobs:
- name: Lint with ruff
run: |
ruff check ${{env.PROJECT_FOLDER}} --fix
- uses: stefanzweifel/git-auto-commit-action@v6
with:
repo-token: "${{ secrets.GH_PAT }}"
commit_message: "style: style fixes by ruff and autoformatting by black"
# - uses: stefanzweifel/git-auto-commit-action@v6
# with:
# commit_message: "style: style fixes by ruff and autoformatting by black"

3 changes: 1 addition & 2 deletions .github/workflows/packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
python -m pip install -U -r requirements/packaging.txt
python -m pip install --no-deps -U -r requirements/embedded.txt -t ${{ env.PROJECT_FOLDER }}/embedded_external_libs
ls loopstructural

- name: Update translations
run: pylupdate5 -noobsolete -verbose ${{ env.PROJECT_FOLDER }}/resources/i18n/plugin_translation.pro

Expand All @@ -50,4 +50,3 @@ jobs:
name: ${{ env.PROJECT_FOLDER }}-latest
path: ${{ env.PROJECT_FOLDER }}.*.zip
if-no-files-found: error

3 changes: 1 addition & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
id: release
- name: debug
run: echo "release_created=${{ steps.release.outputs.loopstructural--tag_name }}"

outputs:
release_created: ${{ steps.release.outputs.releases_created }}
package:
Expand All @@ -40,4 +40,3 @@ jobs:
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/Loop3d/${{ env.PACKAGE_NAME }}/actions/workflows/release.yml/dispatches \
-d "{\"ref\":\"${{ steps.tag.outputs.tag }}\"}"

2 changes: 0 additions & 2 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,3 @@ jobs:
--create-plugin-repo
--osgeo-username "$OSGEO_USERNAME"
--osgeo-password "$OSGEO_PASSWORD"


1 change: 0 additions & 1 deletion .github/workflows/tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,3 @@ jobs:
# run: |
# Xvfb :1 &
# python3 -m pytest tests/qgis/

26 changes: 0 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,7 @@ repos:
- --fix-only
- --target-version=py39

- repo: https://github.com/python/black
rev: 24.1.1
hooks:
- id: black
args:
- --target-version=py39

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args:
- --profile
- black
- --filter-files

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
files: ^loopstructural/.*\.py$
additional_dependencies: ["flake8-qgis<2"]
args:
[
"--config=setup.cfg",
"--select=E9,F63,F7,F82,QGS101,QGS102,QGS103,QGS104,QGS106",
]

ci:
autoupdate_schedule: quarterly
Expand Down
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"recommendations": [
"davidanson.vscode-markdownlint",
"ms-python.black-formatter",

"ms-python.isort",

"ms-python.python",
"njpwerner.autodocstring",
"redhat.vscode-yaml",
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 0.1.3 - 2025-04-15

### Fixed
### Fixed

- updating CI so that plugin is automatically pushed to QGIS plugin repository on release

Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Make sure your code *roughly* follows [PEP-8](https://www.python.org/dev/peps/pe
- docstrings: [sphinx-style](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html#the-sphinx-docstring-format) is used to write technical documentation.
- formatting: [black](https://black.readthedocs.io/) is used to automatically format the code without debate.
- sorted imports: [isort](https://pycqa.github.io/isort/) is used to sort imports

4 changes: 1 addition & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!python3

"""
Configuration for project documentation using Sphinx.
"""Configuration for project documentation using Sphinx.
"""

# standard
Expand All @@ -12,7 +11,6 @@
sys.path.insert(0, path.abspath("..")) # move into project package

# 3rd party
import sphinx_rtd_theme # theme of Read the Docs

# Package
from loopstructural import __about__
Expand Down
62 changes: 62 additions & 0 deletions docs/development/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Design Document for LoopStructural Plugin
## Overview
The LoopStructural plugin is designed to integrate geological modeling capabilities from LoopStructural into QGIS. It provides tools for visualizing, managing, and analyzing geological data, enabling users to create and refine geological models directly within the QGIS environment.

### Design Choices
1. Modular Architecture
The plugin is structured into multiple modules, each responsible for specific functionalities:

- GUI Module: Contains user interface components such as dialogs, widgets, and tabs for interacting with the plugin.
- Main Module: Handles core functionalities like data management, model management, and project handling.
- Processing Module: Provides processing algorithms and tools for geological data analysis.
- Toolbelt Module: Includes utility functions like logging and preferences management.
- Resources Module: Stores static resources such as images, translations, and help files.

This modular design ensures separation of concerns, making the codebase easier to maintain and extend.

2. Integration with QGIS
The plugin leverages QGIS's PyQt-based framework for GUI development and its processing framework for data analysis. Key integration points include:

- Use of QgsCollapsibleGroupBox for organizing UI components.
- Implementation of custom processing algorithms using the Processing module.
- Utilization of QGIS's vector and raster layers for geological data representation.

3. Dynamic UI Components
The plugin dynamically generates UI components based on the data provided by the data_manager. For example:

- Fault adjacency tables are created dynamically based on unique faults retrieved from the data manager.
- Stratigraphic units tables are similarly generated, allowing users to interact with geological units.

4. Custom Interactivity
Interactive elements like QPushButton are used extensively in the UI. These buttons allow users to perform actions such as toggling states or cycling through options (e.g., changing colors to represent different statuses).

5. Extensibility
The plugin is designed to be extensible, allowing developers to add new features or modify existing ones with minimal impact on the overall architecture. Examples include:

- Adding new tabs or widgets to the GUI.
- Extending the data_manager to support additional geological data types.
- Implementing new processing algorithms in the Processing module.

6. Resource Management
Static resources such as images and translations are stored in the resources module. This ensures that all assets are centralized and easily accessible.

7. Testing
The plugin includes a tests directory with unit tests for various components. This ensures that changes to the codebase do not introduce regressions.

## Key Components
### GUI Module
- Fault Adjacency Tab: Displays a table of faults with interactive buttons for adjacency settings.
- Stratigraphic Units Tab: Similar to the fault adjacency tab but focused on stratigraphic units.
- Visualization Widgets: Tools for rendering geological models and features.
### Main Module
- Data Manager: Handles loading, saving, and querying geological data.
- Model Manager: Manages geological models, including their creation and modification.
### Processing Module
- Provider: Implements custom processing algorithms for geological data analysis.
### Toolbelt Module
- Log Handler: Provides logging utilities for debugging and monitoring.
- Preferences: Manages user preferences and settings.
## Future Enhancements
- Support for additional geological data types.
- Improved visualization capabilities using advanced rendering libraries.
- Enhanced interactivity with more intuitive UI components.
8 changes: 4 additions & 4 deletions loopstructural/__about__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#! python3

"""
Metadata about the package to easily retrieve informations about it.
See: https://packaging.python.org/guides/single-sourcing-package-version/
"""Metadata about the package to easily retrieve informations about it.
See: https://packaging.python.org/guides/single-sourcing-package-version/
"""

# ############################################################################
Expand All @@ -12,7 +11,7 @@
# standard library
from configparser import ConfigParser
from datetime import date
from pathlib import Path
from pathlib import Path

# ############################################################################
# ########## Globals ###############
Expand Down Expand Up @@ -44,6 +43,7 @@ def plugin_metadata_as_dict() -> dict:

Returns:
dict: dict of dicts.

"""
config = ConfigParser()
if PLG_METADATA_FILE.is_file():
Expand Down
2 changes: 1 addition & 1 deletion loopstructural/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ def classFactory(iface):
"""
from .plugin_main import LoopstructuralPlugin

return LoopstructuralPlugin(iface)
return LoopstructuralPlugin(iface)
16 changes: 12 additions & 4 deletions loopstructural/gui/dlg_settings.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#! python3

"""
Plugin settings form integrated into QGIS 'Options' menu.
"""
"""Plugin settings form integrated into QGIS 'Options' menu."""

# standard
import platform
Expand Down Expand Up @@ -84,11 +82,16 @@ def __init__(self, parent):
def apply(self):
"""Called to permanently apply the settings shown in the options page (e.g. \
save them to QgsSettings objects). This is usually called when the options \
dialog is accepted."""
dialog is accepted.
"""
settings = self.plg_settings.get_plg_settings()

# misc
settings.debug_mode = self.opt_debug.isChecked()
settings.interpolator_nelements = self.n_elements_spin_box.value()
settings.interpolator_npw = self.npw_spin_box.value()
settings.interpolator_cpw = self.cpw_spin_box.value()
settings.interpolator_regularisation = self.regularisation_spin_box.value()
settings.version = __version__

# dump new settings into QgsSettings
Expand All @@ -107,6 +110,11 @@ def load_settings(self):
# global
self.opt_debug.setChecked(settings.debug_mode)
self.lbl_version_saved_value.setText(settings.version)
# self.interpolator_type_combo.setCurrentText(settings.interpolator_type)
self.n_elements_spin_box.setValue(settings.interpolator_nelements)
self.regularisation_spin_box.setValue(settings.interpolator_regularisation)
self.cpw_spin_box.setValue(settings.interpolator_cpw)
self.npw_spin_box.setValue(settings.interpolator_npw)

def reset_settings(self):
"""Reset settings to default values (set in preferences.py module)."""
Expand Down
Loading