93 Commits

Author SHA1 Message Date
Nyall Dawson
64b52bf31b Fix handling of interpolation layers with differing input coordinate reference systems
Fixes #27048
2019-11-05 16:57:33 +10:00
Nyall Dawson
da1b5637af Fix deprecated gdal import warnings 2019-07-25 11:25:51 +10:00
Bas Couwenberg
2628c480c5 Don't include revision in sources.
Prevent changes to files that weren't changed between releases.
This eases review of the changes between releases significantly.
2019-05-17 16:47:47 +02:00
Martin Dobias
ee63cffd88 [processing] Add 'project' to test definition and 'directory' output test
- for algorithms that produce directory output, it is possible to test
  that directory contents are exactly the same (recursively)
- added possibility to have a project file loaded before an algorithm is run
- documented the new additions (+ few existing ones)
2019-04-25 21:40:31 +02:00
Nyall Dawson
f5a3485eae Fix some Python warnings, avoid accidently hiding all deprecation warnings 2019-03-28 11:47:23 +10:00
Matthias Kuhn
2a973fc0b6
Allow using gpkg in processing tests 2018-10-31 10:27:54 +01:00
Nyall Dawson
f3e9aaf79a Fix some inefficient python dictionary iteration 2018-10-31 08:42:51 +10:00
Nyall Dawson
4acef1efbf [processing] Fix crash in extract by attribute when field name does not exist
Fixes #19531
2018-08-04 05:57:46 +10:00
Nyall Dawson
9fe26af8fa Allow processing tests to specify ellipsoid/project CRS 2018-06-29 07:12:48 +10:00
Nyall Dawson
e273ac2815 [processing] Some test debugging help 2018-06-01 11:54:31 +10:00
Nyall Dawson
870d20740c [processing] Tweaks and checks for checkParameterValues 2018-05-28 16:02:38 +10:00
Martin Dobias
73d10afe31 Processing tests: allow topological geometry tests instead of exact tests
This is useful with geometry algorithms when the order of the coordinates of produced
geometries does not need to be exactly the same every time, but the output is still
topologically equivalent.
2018-05-10 06:50:57 -04:00
Nyall Dawson
b3288192ee [processing] Fix exception when clicking help for GDAL algorithms 2018-05-06 07:13:15 +10:00
Nyall Dawson
6c892652ac Followup a463858, fix failing tests 2018-04-20 08:38:15 +10:00
Nyall Dawson
e83cd6155f [processing] Better debugging for failed tests 2018-04-10 09:57:58 +10:00
Alexander Bruy
e1a64f6a8f [processing] remove unused files 2018-02-05 08:50:37 +02:00
Alexander Bruy
4b63975eaf [processing] tests for SAGA provider and related fixes 2017-11-09 18:56:44 +02:00
Alexander Bruy
b4214798e9 [processing] infrastructure for SAGA tests 2017-11-09 18:56:44 +02:00
Nyall Dawson
ba62ffce2c Make constructors for QgsVectorLayer and QgsRasterLayer more flexible
...by moving extra arguments to new LayerOptions structs. This allows
us to more easily add new layer constructor options without making
the API cumbersome to use.
2017-11-09 14:28:51 +11:00
Nyall Dawson
ddb3198ef2 Add some more debugging to processing algorithm test
Trying to pinpoint which algorithm occasionally segfaults during
test runs
2017-09-05 09:18:16 +10:00
Nyall Dawson
d573c43e3e Better test debugging 2017-08-25 15:58:57 +10:00
Nyall Dawson
7b2250bb35 Convert processing tests to use native algs where they exist 2017-08-17 20:20:58 +10:00
Mario Baranzini
78af413dcc Remove python future compatibility layer 2017-08-07 10:27:15 +02:00
Nyall Dawson
d4ad063f45 Allow specifying a 'primary key' field when comparing layers for
processing tests

Some algorithms will return results in different orders, e.g.
due to the use of dicts or other methods which do not guarantee
a fixed return order.

Using a primary key to do the feature match allows us to flexibly
handle these situations and provide tests for these algorithms.
2017-08-05 22:10:18 +10:00
Nyall Dawson
9968962ab9 Allow specifying multiple possible vector layer results for processing
tests

Some algorithms are non-deterministic and the results may vary from
run to run. In this case we allow specifying multiple possible valid
results, and the test will pass if the result layer matches any of these.
2017-08-05 17:51:38 +10:00
Nyall Dawson
5d635d190d Allow list of acceptable raster hashes for processing algorithm tests
Differences in gdal libraries mean the hash value may differ between
platforms. Allow multiple acceptable hashes to be listed for
expected test results
2017-08-05 17:51:38 +10:00
Nyall Dawson
504cc1f390 Port Truncate alg to new API 2017-07-27 14:43:42 +10:00
Alexander Bruy
56208540f9 [processing] remove GeoAlgorithmExecutionException 2017-07-13 09:02:24 +03:00
Nyall Dawson
1e13d733c2 Move declaration of algorithm parameters/outputs to a new virtual
initAlgorithm() method

This allows 2 benefits:
- algorithms can be subclassed and have subclasses add additional
parameters/outputs to the algorithm. With the previous approach
of declaring parameters/outputs in the constructor, it's not
possible to call virtual methods to add additional parameters/
outputs (since you can't call virtual methods from a constructor).

- initAlgorithm takes a variant map argument, allowing the algorithm
to dynamically adjust its declared parameters and outputs according
to this configuration map. This potentially allows model algorithms which
can be configured to have variable numbers of parameters and
outputs at run time. E.g. a "router" algorithm which directs
features to one of any number of output sinks depending on some
user configured criteria.
2017-07-10 16:31:14 +10:00
Nyall Dawson
05364aa5f0 When running algorithm tests, if two parameters share the same
layer source, ensure that the actual parameter values point
to the same layer
2017-07-07 09:28:19 +10:00
Nyall Dawson
ab06973d6a Don't try to load default styles in processing test layers 2017-07-07 09:28:19 +10:00
Nyall Dawson
8a84e134cc Algorithms don't have to be split to prepare/process/postProcess
Since it's safe to evaluate parameters in background threads
now, it's usually going to be ok to evaluate everything in
the processAlgorithm step.

This keeps the algorithm code as simple as possible, and will
make porting faster.

Note that the prepare/postProcess virtual methods still exist
and can be used when an algorithm MUST do setup/cleanup work
in the main thread.
2017-07-07 09:28:19 +10:00
Nyall Dawson
274d684f64 Fix procesing test layer loading 2017-07-07 09:28:19 +10:00
Nyall Dawson
b917a82662 Better debuging from processing alg tests 2017-07-07 09:28:19 +10:00
Nyall Dawson
d2b9652d4b Fix use of direct map layers as inputs for source parameters 2017-06-29 08:00:47 +10:00
Nyall Dawson
c3e24b76b5 Fix some processing tests where output is not generated or should
not be compared
2017-06-23 12:48:58 +10:00
Nyall Dawson
93b7c2809e Report success or failure after running algs
And auto catch python exceptions and report failure of model
2017-06-23 12:08:54 +10:00
Nyall Dawson
ce42d6c41b Reduce noise in algorithm tests 2017-06-22 05:16:01 +10:00
Nyall Dawson
bdf051a03a Partially port a trial python alg to new API 2017-06-06 07:41:19 +10:00
Nyall Dawson
0c3ad14c79 Adapt more python code to new API 2017-06-06 07:41:19 +10:00
Nyall Dawson
4cb7d18b1c Push parameters into processAlgorithm and related functions 2017-06-06 07:41:19 +10:00
Nyall Dawson
2da85f8771 Temporarily deactivate all processing providers/algorithms
While the processing API is in such a state of flux it's
become unmaintainable to port these algorithms change-by-change.
Instead, disable them all until the API is fixed, and then we
can port them algorithm by algorithm and reactivate each
test in turn.
2017-06-06 07:41:19 +10:00
Alexander Bruy
429e67e0f9 [processing] remove stuff related to R provider 2017-05-02 12:39:26 +03:00
Nyall Dawson
91679b3cbd [processing] Don't use config values for invalid geometry handling in tests 2017-04-26 12:53:35 +10:00
Nyall Dawson
5a6f11d52e Some cleanups 2017-04-07 13:21:28 +10:00
Nyall Dawson
4970bb4cd5 Move more algList functionality to QgsProcessingRegistry 2017-04-07 13:21:28 +10:00
Alexander Bruy
394b4f1a87 fix typo 2017-03-16 17:48:39 +02:00
Alexander Bruy
c603df1aa8 [processing] allow tests for scripts 2017-03-16 17:48:39 +02:00
Juergen E. Fischer
c77172ed3d fix more flake8 warnings 2017-03-05 10:21:24 +01:00
Alexander Bruy
5939ae23e7 Merge pull request #4076 from volaya/remove_processing_providers
[FEATURE][processing] removed otb and lidartools providers

Tagged as feature to not forget mention this in changelog and docs
2017-02-02 10:56:56 +02:00