Skip to content

Commit ddd955c

Browse files
committed
style: pre-commit/ruff
1 parent bb9cbf0 commit ddd955c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+253
-306
lines changed

.github/workflows/linter.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ jobs:
4848
# - uses: stefanzweifel/git-auto-commit-action@v6
4949
# with:
5050
# commit_message: "style: style fixes by ruff and autoformatting by black"
51-

.github/workflows/package_and_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,4 @@ jobs:
165165
--create-plugin-repo
166166
--github-token ${{ secrets.GITHUB_TOKEN }}
167167
--osgeo-username ${{ secrets.OSGEO_USER }}
168-
--osgeo-password ${{ secrets.OSGEO_PASSWORD }}
168+
--osgeo-password ${{ secrets.OSGEO_PASSWORD }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
".": "0.0.1",
33
"loopstructural": "0.1.11"
4-
}
4+
}

docs/usage/3d-modeling.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,3 @@ In LoopStructural stratigraphic surfaces can be modelled using implicit function
2525

2626
### Fault modelling
2727
Faults are modelled in LoopStructural by building three implicit functions defining the fault surface, fault slip vector and the fault extent. Combined with a parametric representation of the fault displacement within these coordinates a kinematic model.
28-
29-
30-

docs/usage/install/linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@
4040
1. Restart QGIS if necessary.
4141
2. Confirm that the plugin is available under the **Plugins** menu.
4242

43-
You are now ready to use the plugin on your Linux system!
43+
You are now ready to use the plugin on your Linux system!

docs/usage/install/macosx.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
```bash
1313
brew install qgis
1414
```
15-
15+
1616
### Step 2: Install Dependencies Using pip
1717
1. Ensure you have `pip` installed. If not, install it using:
1818
```bash
@@ -33,4 +33,4 @@
3333
1. Restart QGIS if necessary.
3434
2. Confirm that the plugin is available under the **Plugins** menu.
3535

36-
You are now ready to use the plugin on your MacOS system!
36+
You are now ready to use the plugin on your MacOS system!

docs/usage/installation.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
This plugin is published on the official QGIS plugins repository: <https://plugins.qgis.org/plugins/loopstructural/>.
66

7-
LoopStructural plugin requires the installation of `LoopStructural, loopsolver, pyvista, pyvistaqt and pyqtgraph`. Optionally meshio and geoh5py can also be installed for exporting surfaces/models into different formats.
7+
LoopStructural plugin requires the installation of `LoopStructural, loopsolver, pyvista, pyvistaqt and pyqtgraph`. Optionally meshio and geoh5py can also be installed for exporting surfaces/models into different formats.
88

99
To install these dependencies you can follow the instructions below for your operating system.
1010

1111
### Using QPIP
12-
You can also use the experimental QGIS plugin QPIP which is developed by OPENGIS.ch <https://plugins.qgis.org/plugins/qpip/> that manages the Python dependencies for your QGIS environment and keeps the dependencies up to date.
12+
You can also use the experimental QGIS plugin QPIP which is developed by OPENGIS.ch <https://plugins.qgis.org/plugins/qpip/> that manages the Python dependencies for your QGIS environment and keeps the dependencies up to date.
1313

1414

1515
----
@@ -23,5 +23,3 @@ install/linux
2323
install/macosx
2424
2525
```
26-
27-

docs/usage/interface.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
The LoopStructural plugin interfaces with QGIS to define the model input data and parameters.
55

66
### Bounding box
7-
The bounding box defines the spatial extent of the model and can be either specified manually or automatically by calculating the extent from a selected layer or the current view. Not that the bounding box currently has to be axis aligned, meaning that the bounding box is defined by the minimum and maximum x, y and z coordinates.
7+
The bounding box defines the spatial extent of the model and can be either specified manually or automatically by calculating the extent from a selected layer or the current view. Not that the bounding box currently has to be axis aligned, meaning that the bounding box is defined by the minimum and maximum x, y and z coordinates.
88

99

1010
![Bounding Box](../static/bounding_box_widget.png)
@@ -17,22 +17,22 @@ If the points being modelled contain a Z coordinate, this can be used instead of
1717
### Fault layers
1818
The faults trace layer is usually a line layer that contains the trace of the fault. The fault trace is used to define the location of the fault in the model. Optional attributes can be used to further constrain the model:
1919
- **fault name** the name of the fault to be used in the model, if this is left blank the feature ID will be used instead.
20-
- **Dip** the dip of the fault, if this is left blank the fault will be assumed to be vertical.
20+
- **Dip** the dip of the fault, if this is left blank the fault will be assumed to be vertical.
2121
- **Displacement** - The maximum displacement magnitude of the fault. If this is not specified, a default value will be used.
22-
- **Pitch** - defines the pitch of the fault slip vector in the fault surface. If this is left blank a vertical slip vector is assumed and projected onto the fault surface.
22+
- **Pitch** - defines the pitch of the fault slip vector in the fault surface. If this is left blank a vertical slip vector is assumed and projected onto the fault surface.
2323

2424
![Fault Layer](../static/fault_layers.png)
2525
### Stratigraphy
2626
Two layers can be used to constrain the stratigraphy of the model:
2727
1. Basal contacts - this layer defines the basal contacts of the stratigraphy. The layer should contain a line layer with the contact traces. The attributes can be used to define the name of the contact.
28-
2. Structural data - this layer defines the structural data that is used to constrain the model. The layer should contain a point layer with the structural data. The attributes can be used to define the orientation of the data, such as dip and dip direction.
28+
2. Structural data - this layer defines the structural data that is used to constrain the model. The layer should contain a point layer with the structural data. The attributes can be used to define the orientation of the data, such as dip and dip direction.
2929

3030
![Stratigraphic Layer](../static/stratigraphic_layer.png)
3131

3232
## Stratigraphic Column
3333
The stratigraphic column defines the order of the contacts and any unconformable relationships between them. The column is defined by a list of units - these units are ordered from oldest at the bottom to youngest at the top. Unconformities can be inserted between units to define an unconformable relationship. The thicknesses define the true thickness of each unit and are used to parameterise the interpolation. The unit names should match the names of the contacts in the basal contacts layer. Units without basal contacts can be included in the stratigraphic column but will not be constrained by any data.
3434

35-
The stratigraphic column can be initialised from the basal contacts layer by clicking the "Initialise from Layer" button. This will create a column with the contacts in the order they are found in the layer. The column can then be edited to add unconformities or change the order of the units. To change the order of units simply drag the units in the list. To add an unconformity, click the "Add Unconformity" button and drag the unconformity the location in the column.
35+
The stratigraphic column can be initialised from the basal contacts layer by clicking the "Initialise from Layer" button. This will create a column with the contacts in the order they are found in the layer. The column can then be edited to add unconformities or change the order of the units. To change the order of units simply drag the units in the list. To add an unconformity, click the "Add Unconformity" button and drag the unconformity the location in the column.
3636

3737

3838
![Stratigraphic Column](../static/stratigraphic_column_04.png)
@@ -45,7 +45,7 @@ The fault-fault relationship table defines the interaction between faults in the
4545
![Fault Topology](../static/fault_topology_hamersley.png)
4646

4747
## Model parameters
48-
Once the layers have been selected, stratigraphic column defined and the fault topology relationships set, the LoopStructural model can be initialised.
48+
Once the layers have been selected, stratigraphic column defined and the fault topology relationships set, the LoopStructural model can be initialised.
4949

5050
Initialise model will create a LoopStructural model with all of the geological features in the model. For each feature in the model the number of interpolation elements (degrees of freedom), the weighting of the regularisation, contact points and orientation weight can be changed.
5151
![Model Parameters](../static/model-setup.png)

loopstructural/debug_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def _export_gdf(self, gdf, out_path: Path) -> bool:
147147
def _export_qgis_layer(self, qgs_layer, out_path: Path) -> bool:
148148
"""Export a QGIS QgsVectorLayer to GeoJSON if available."""
149149
try:
150-
from qgis.core import QgsCoordinateTransformContext, QgsVectorFileWriter
150+
from qgis.core import QgsVectorFileWriter
151151

152152
# In QGIS 3, writeAsVectorFormatV2 is preferred, but use writeAsVectorFormat for compatibility
153153
err = QgsVectorFileWriter.writeAsVectorFormat(

loopstructural/gui/map2loop_tools/sampler_widget.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44

55
from PyQt5.QtWidgets import QMessageBox, QWidget
6-
from qgis.core import QgsProject, QgsVectorFileWriter
76
from qgis.PyQt import uic
87

98
from loopstructural.toolbelt.preferences import PlgOptionsManager
@@ -141,7 +140,6 @@ def _run_sampler(self):
141140
QgsFields,
142141
QgsGeometry,
143142
QgsPointXY,
144-
QgsProject,
145143
QgsVectorLayer,
146144
)
147145
from qgis.PyQt.QtCore import QVariant

0 commit comments

Comments
 (0)