-
Notifications
You must be signed in to change notification settings - Fork 21
Conversation
…ws; views are written on every call
##pcur.execute("SELECT * FROM epanet_mybranch_rev_2.junctions") | ||
##assert( len(pcur.fetchall()) == 2 ) | ||
##pcur.execute("SELECT * FROM epanet_mybranch_rev_2.pipes") | ||
##assert( len(pcur.fetchall()) == 1 ) |
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.
delete commented out lines (makes for easier review)
+1 for merge, ping me when you have rebased. |
New checks on schema name validity
I guess I introduced conflicts with the rebase. Sorry.
I removed some of the prints but I left the commented out print results in the tests I've added just so that asserts are clearer.
Good point; I used to be a Scheme programmer, so I like lists ;-)
Good point. Done.
For now we'll stick with that. If there really are issues then we'll fix them later, if you don't mind.
Could be. In fact all of this could have been done right in versioning.py. That's how I did it until a few days ago. I decided to keep a function in versioning_base for tests, but really all of that is QGIS specific IMO : select_str goes in the 'table=' parameter and where_str goes into 'sql='. I could understand the need to test when a schema + view was created, but now just filtering a PG layer doesn't warrant much testing IMO. What you are suggesting amounts to building the select_str in versioning and have versioning_base provide the where_str. I don't think you'll have strong feelings about my not changing anything for now. I added a bit of code in versioning.checkout_pg to check for valid schema names. Supplying names with illegal chars either popped a "ProgammingError" or made QGIS crash (reported by our users). Please note that in the case of letters I only allow lowercase. I know the PG naming rules allow for uppercase letters too, but I'm not sure quoting is handled properly. If this is OK with you, I've rebased and the code is ready to integrate. Next step : I'd like to have your (and Oslandia's) feelings about the docs branch, because that will be our next contribution to the plugin. As you may have seen, I have started a reST documentation that is built dynamically on ReadTheDocs (http://eha-qgis-versioning.readthedocs.org/en/docs/). For now, the doc is built on eHA's RTD out of our fork's 'docs' branch. What I think should be done is to build the master branch of the main GH code repository. How do you feel about this ? Are you OK with a RTD site based on reST files ? The final product would be a 'help' button in the plugin menu bar (already there) pointing to the documentation site. |
No problem.
I strongly disagree on that point.
No problem.
Lowercase + underscore for schema, tables and attributes names is indeed what you want to have in your DB.
Yes. |
The branch has conflicts, so not ready to integrate. |
We are ready to integrate the code of our new comparison mode functionality on history revisions.
Changes in versioning_base.py :
Tests were :
Changes in the UI :
Small change of behaviour : the plugin operates the same way it has in the past, but we now retrieve all historization fields irrespective of branch in the attributes table; the reason is that a user might be interested to know that a feature on branch X shown also has a history in another branch.
If all is fine for you I will rebase before you proceed.
Thank you