Python expressions support #267
Open
JanCaha wants to merge 2 commits intoQGIS-Contribution:masterfrom
Open
Conversation
Contributor
|
Hello @JanCaha, Thanks for your interest and sorry about the delay, I wanted to finish #259 before everything else and I was on vacations during summer. I recommend you rebase from master to get the latest quality updates. Expressions support is a nice addition and requested in #203. To approve your submission, I've have to ask you make the necessary changes to comply with the contributing guidelines please? It's all about tests and docstrings. Thanks! |
Author
|
No problem with adding docstrings and tests ;) But there is the question of security... Should that be somehow adressed? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for handling python expressions, which are so far not supported by the plugin. The expressions should be stored in python_expressions folder under collection, to separate them from other stuff. The expressions are copied into user folder python/expressions.
I see this PR more as a discussion start, about how this should be handled.
There is a potential security issue as the python files with expressions are run (or evaluated) to make the expression available for QGIS. Which can be used to slip malicious code to the user. I am not sure, how this should be handled. Any tips for solutions, would be welcomed. Even thought I still think this is a valuable functionality for users.