-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logical operators to processing algos #374
Add logical operators to processing algos #374
Conversation
Nice addition, the multi key was indeed missing from the Processing toolbox. Have you already tried this other approach ? |
Hi @Gustry im working with @chrstnbwnkl , just my 2c:) I considered that multi k/v UI before in another plugin, I think I just couldn’t make it work easily and quickly gave up😅 would be a much better approach. What do you think about having this as an initial implementation and move to the nicer version in a follow-up PR? The reason I’m asking is we’d like the functionality in a release soonish, so we can use it for a project. We can commit to the follow-up PR as well actually in Feb. |
quick update @Gustry : we have no more deadline on this, so we can take our time. if you want we'll implement it including a friendlier UI as you suggested? |
Hi, sorry for the long delay. Yes, I was expecting your answer ;-)
The thing is as soon as we publish something in the QGIS Processing algorithm for INPUTS or OUTPUTS, we can't change it until the next QuickOSM API break (that I would like to happen as late as possible), because Procesing is a kind of API for the plugin. It's used by custom Python scripts and by Processing models. Removing or updating INPUTS/OUTPUTS will make a pain for model creator. When QGIS core developers are doing similar things in QGIS core Processing algorithms, they need to hide legacy parameters to keep existing models/python scripts etc working. Let me try your PR first ;-) |
We'll have a look how much pain it is to stay backwards-compatible (if possible, would need to have a deeper look). if not, we'll just publish the PR branch on our internal qgis repo and call it smth else so clients don't get confused;) |
A quick look in your PR, it seems really not difficult to keep it backward compatible if the table is added. |
Hi, sorry for the late review. I just fixed the lint and pushed to your branch. The feature seems OK. With these input widgets, difficult to make something very user-friendly. But it's ok ;-) Can you expand the help on the parameter and on the algorithm ? I guess most users won't be sure how to use this new field. Thanks |
AFAIK, except in the I mean there are keys |
Sorry for letting this go stale again for so long... I checked tags of an .osm file I had lying around and you're right indeed: tags where values include a comma are almost exclusively |
I don't know if this request will have any possibility of development... but as far as I'm concerned I found this limitation to be of no small importance. In any case, thanks for this incredibly useful plugin. |
2ac7fc0
to
4d0bc54
Compare
@chrstnbwnkl I just rebased your PR, fix the conflict and pushed the branch again. CI failing tests are not related to this PR it seems. I will have a look on the master branch first. |
What a nice surprise 😄 still there remains the question of how to act on users including commas in their query strings IIRC |
afb9b8f
to
477f670
Compare
4d0bc54
to
2878a6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very sorry for the late review ... I forgot about it :/
It's summer, I want to release a new version... Thanks for your contribution !
First, thanks for this amazingly helpful plugin!
This PR adds logical operators as parameters to the processing algorithms. The issue was that using multiple keys/values did not work properly in the processing algorithms, so they could only be used for simple queries with one k/v pair each. I have added a string parameter that one can add comma separated 'AND'/'OR's to that will be used to combine multiple keys and values into one query.
I have further added one test, and one existing test needed a small adjustment, because there was a misplaced positional argument that now conflicted with this new feature.