346 Commits

Author SHA1 Message Date
Nyall Dawson
632d196e62 Don't show useless "available in python as" notes in PyQGIS docs
Since the method name used in the docs is ALREADY the python version!
2025-02-28 18:32:09 +10:00
ughur-a
0b9bc85378
docs(qgsprocessingcontext): fix typo (#60541)
* docs(qgsprocessingcontext): fix typo

* Update .sip.in files

---------

Co-authored-by: Even Rouault <even.rouault@spatialys.com>
2025-02-11 15:11:38 +01:00
Alexander Bruy
e7d22c7e7c always return "main" label for main annotation layer 2025-02-05 20:54:06 +10:00
Mathieu Pellerin
f2289c83f1 [processing] Fix feature iteration against a model (fixes #60131) 2025-01-28 12:06:36 +10:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
Even Rouault
0c5edad199 QgsProcessingAlgorithm::addOutput(): add a variant that accepts a unique_ptr for QgsProcessingOutputDefinition 2024-12-09 14:58:27 +10:00
Even Rouault
a389b1a568 QgsProcessingAlgorithm::addParameter(): add a variant that accepts a unique_ptr for QgsProcessingParameterDefinition 2024-12-09 14:58:27 +10:00
Nyall Dawson
52226f0b9c Mark models as security risk if they contain algs with security risks 2024-10-02 10:36:00 +10:00
Nyall Dawson
b39f760cbc
Correctly handle multiline SIP_OUT param documentation 2024-09-10 11:11:25 +10:00
Nyall Dawson
ef0289f3ec Fix formatting of Python ..deprecated annotations in docstrings
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/174
2024-09-02 11:42:12 +10:00
Nyall Dawson
d318cdb992 Standardise some since annotations 2024-09-01 02:29:17 +10:00
Nyall Dawson
49d31fa527 Fix some malformed docs 2024-08-30 05:47:07 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
be8dce7d0d Valid improvements from new sipify 2024-08-13 20:28:55 +10:00
Nyall Dawson
6f652d251b Drop no-value copy constructor dox 2024-07-25 04:02:55 +10:00
Nyall Dawson
28943f9c1b Remove a bunch of useless default constructor doxygen 2024-07-23 02:08:28 +10:00
Nyall Dawson
f2d5c870cc Move translation to reusable function 2024-07-15 14:33:21 +10:00
Nyall Dawson
afd10759b0 [processing] Show notes for algs which regenerate primary keys
Add a new Qgis::ProcessingAlgorithmDocumentationFlag flag, with
a virtual method in QgsProcessingAlgorithm to return documentation
flags. These flags are used to indicate algorithm behavior which
should be noted in the documentation.

Add initial flags for algorithms which drop and regenerate
primary keys/FIDs, and automatically add a note to the algorithm's
help panel to explain that this will occur

In future this flag could be extended with other helpful warnings,
eg

- Algorithm requires valid geometries
- Algorithm will segmentize curved geometries
- Algorithm will drop Z or M values
2024-07-15 14:33:21 +10:00
Nyall Dawson
e8b2638c5c Add processing parameter types for Area and Volume
Adds dedicated parameter types for Area and Volume values.

Modeled closely off the existing Distance paramter type.
2024-07-10 18:56:49 +10:00
Mathieu Pellerin
73c886ac97 [api][processing] Also move inputParameterName() and inputParameterDescription() to public 2024-06-24 06:40:55 +10:00
Mathieu Pellerin
1aa1c35c94 [api][processing] QgsProcessingAlgorithm's supportsInPlace function should be public 2024-06-24 06:40:55 +10:00
Nyall Dawson
1c60403286 Add testOnly option to parameterAsOutputLayer
If true, then the evaluated result won't be treated as an actual layer to load
2024-06-07 18:44:29 +10:00
Nyall Dawson
20d9657f19 Add mechanism to merge results across different model execution runs
So that if a part model was run from a previous state, we can
generate the complete state of model results across both runs
2024-05-04 06:30:43 +10:00
Nyall Dawson
8cd3c547ee Add API framework for setting initial state of a model algorithm
And allow execution of just a subset of child algorithms from
a model, using the initial state as a starting point

This will allow "resuming" a model, running part of a model using
the state from a previous execution.
2024-05-04 06:30:43 +10:00
Nyall Dawson
86cf8f8815 Store more model execution details for later retrieval 2024-05-04 06:30:43 +10:00
Nyall Dawson
0a877ea4af Documentation improvements 2024-04-21 06:46:35 +10:00
Nyall Dawson
de0f5cf87c Make API more future proof 2024-04-21 06:46:35 +10:00
Nyall Dawson
75455dffad Move class to own file 2024-04-21 06:46:35 +10:00
Nyall Dawson
d4369f714d Make log of each separate child algorithm available for retrieval after
running model
2024-04-21 06:46:35 +10:00
Nyall Dawson
172a1c2b03 Make execution status available for child algorithms 2024-04-21 06:46:35 +10:00
Nyall Dawson
8302259463 Make child results handling API more flexible 2024-04-21 06:46:35 +10:00
Nyall Dawson
5ebbb3da46 Make child results and inputs always available for models
Even when the model execution fails, store the child inputs and
results for all steps which successfully completed in the context.

This gives more debugging information to a user when a model fails,
because these values will now be reflected in the model designer
view for all steps which completed.
2024-04-21 06:46:35 +10:00
Nyall Dawson
7f4fe65bee Ensure that QgsProcessingAlgorithm::postProcess is always called
We now always call QgsProcessingAlgorithm::postProcess, even when
the algorithm fails for some reason (eg it raises an exception).
This ensures that the context cleanup logic in postProcess is
always run. Note that we still ONLY call an algorithm's specific
postProcessAlgorithm implementation for successful executions,
so the public facing API and behavior remains unchanged.

This is intented to provide a consistent handling of the cleanup
logic in postProcess, specifically to make sure that that the
context thread handling logic is triggered in all cases.
2024-04-21 06:46:35 +10:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Nyall Dawson
ee53b9ae48 Port processing enums to enum class
A step towards a Qt6 compatible Processing framework
2024-02-10 17:25:22 +10:00
Nyall Dawson
4ba4eae72a [processing] Rename grass7 provider to grass provider
And transparently map requests for grass7 provider to grass provider

It's misleading putting an old version number in the provider name,
when this provider supports grass versions 8 +
2024-02-06 18:31:48 +10:00
Nyall Dawson
c3fa3af175 [processing] Use safer provider://source syntax in more places
Use the safer method of explicitly including the provider type
when storing layer sources to string in more places, which eg
fixes running the copied qgis_process string when a non gdal
layer source is used for a raster layer. Also fixes the same
situation when restoring an algorithm from the history log.

Fixes #54264
2024-02-05 17:39:46 +10:00
Nyall Dawson
503a95a1a1 Move enums to Qgis namespace for consistency 2024-02-02 04:59:04 +10:00
Alessandro Pasotti
27824078ad Introduce QgsProcessingProvider::Flag::FlagCompatibleWithVirtualRaster 2024-01-31 10:37:52 +10:00
Nyall Dawson
6116319806 Move a processing enum to enum class in Qgis 2024-01-30 19:10:43 +10:00
Nyall Dawson
a36b203f30 Promote some processing enums to enum class, cleanups 2024-01-30 19:10:43 +10:00
Nyall Dawson
26798b84f4 Promote QgsFeatureRequest enums to enum class, move to Qgis 2024-01-30 19:10:43 +10:00
Nyall Dawson
3c179214fc Use nicely formatted results in processing logs 2024-01-09 17:02:21 +10:00
Nyall Dawson
3e10cf9338 Add method to get HTML formatted versions of output values for
processing outputs
2024-01-09 17:02:21 +10:00
Nyall Dawson
b674a7c35d Add method to format processing output values as strings 2024-01-09 17:02:21 +10:00
Nyall Dawson
3e7d376953 Add method to push formatted text to Processing feedback
Provides a method for algorithms to push HTML contents to the log
(the other feedback methods all escape HTML strings to strip
formatting characters)
2024-01-09 17:02:21 +10:00
Nyall Dawson
56e8206f21 Hold GIL when calling cheap processing methods 2023-12-07 16:21:31 +10:00
Nyall Dawson
f16bbfea79 Check validity of coverages before running coverage tools, unless
geometry validation is disabled
2023-11-02 22:03:20 +10:00
Alexander Bruy
f22efde645 add binary and boolean types to QgsFieldProxyModel to allow filtering
corresponding field types. Also expose these field types to Processing
field parameter (fix #53940)
2023-09-22 09:40:28 +10:00
Alexander Bruy
81dbdd8bae
Merge pull request #53874 from alexbruy/processing-port-align-raster-tool
Port Align rasters tool to Processing
2023-09-14 16:29:49 +03:00