Skip to content
This repository has been archived by the owner on Jun 4, 2020. It is now read-only.

Migrate plugin from QGIS2 to QGIS3 #88

Merged
merged 34 commits into from
Mar 13, 2019
Merged

Migrate plugin from QGIS2 to QGIS3 #88

merged 34 commits into from
Mar 13, 2019

Conversation

troopa81
Copy link
Contributor

Migrate plugin from QGIS2 to QGIS3

This is related to #69

@troopa81 troopa81 requested review from vmora and lbartoletti March 12, 2019 06:16
@troopa81
Copy link
Contributor Author

@vmora @lbartoletti Could you please take a look about this PR to see if it looks good to you?

Copy link
Collaborator

@lbartoletti lbartoletti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good job.
Some comments. Only a verification if the migration works also on windows (But why wouldn't it work?).

Also in all .py tests you must change
#!/usr/bin/env python2 by #!/usr/bin/env python3

test/create_db_test.sh Outdated Show resolved Hide resolved
test/create_db_test.sh Outdated Show resolved Hide resolved
versioningDB/postgresqlLocal.py Show resolved Hide resolved
plugin.py Show resolved Hide resolved
test/abbreviation_bug_test.py Show resolved Hide resolved
test/abbreviation_bug_test.py Show resolved Hide resolved
@troopa81
Copy link
Contributor Author

Thanks for the review. I have also replaced the python2 strings with python3 e513bec

@vmora
Copy link
Contributor

vmora commented Mar 12, 2019

Good work @troopa81, I suppose it's still compatible with python2 QGIS 2.X (although it was not required) ?

@troopa81
Copy link
Contributor Author

@vmora Not it's not, because api has breaking changes between QGIS2 and QGIS3.

If we want compatibility we need to have ``if```everywhere, which is not really clean and maintenable imho.

This was referenced Mar 12, 2019
@troopa81 troopa81 merged commit 62ce1e9 into master Mar 13, 2019
@Melegy90
Copy link

Has anyone tested this?
I've tried the latest version on master with QGIS 3.4 on Windows.
Postgres 11.
What happens is that when I enable versioning on a layer group, a new layer group with the suffix "_rev_head" is created but without any layers, also on the Database itself no schema is created nor has there been any changes that I could see.

If this is indeed a bug I'd be glad to work on it, just checking with you.

@troopa81
Copy link
Contributor Author

Yes, I tested it on Linux. But I give it a try on Windows 10 with QGIS 3.4.11 and PostGres 10 and it works.

Here is a demo video just for the versioning part on Linux. I get the same thing on Windows.

qgisversioning

If this is indeed a bug I'd be glad to work on it,

It looks like a bug, please let me know if you understand where it happens and how to fix it

@Melegy90
Copy link

@troopa81 Thank you for the heads up. I tested it again but with Postgres 9.6 and it works fine.
I believe the problem has to do with postgres 11 compatibility.

@troopa81
Copy link
Contributor Author

troopa81 commented Sep 3, 2019

with postgres 11 compatibility

Strange, it works on Linux with Postgres 11. Maybe it's Postgres11 AND Windows. I'll give it a try

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants