-
-
Notifications
You must be signed in to change notification settings - Fork 367
GSOC 2018 Making pgRoutingLayer plugin compatible with QGIS 3 and adding additional GUI support
- Proposal
- Branch
-
Timeline
- Community Bonding Period (April 23 to May 13, 2018)
- Official Coding Period Phase 1 (May 14 to June 10, 2018)
- First evaluation period (June 11 to June 15, 2018)
- Official Coding Period Phase 2 (June 11 to July 8, 2018)
- Second evaluation period (July 9 to July 13, 2018)
- Official Coding Period Phase 3 (July 9 to August 5, 2018)
- Final evaluation period (August 6 to August 14, 2018)
- Reports
- References
- Name : Aasheesh Tiwari
- Country: India
-
Schools & Degrees :
-
Masters : Geoinformatics and Natural Resources Engineering
- School : Indian Institute of Technology, Bombay
- Department: Centre of Studies in Resources Engineering
-
Bachelors : Computer Science Engineering
- School : Lakshmi Narain College of Technology, Bhopal
- Department: Department of Computer Science Engineering
-
Masters : Geoinformatics and Natural Resources Engineering
-
Contacts :
- Email : aasheesht50@gmail.com
The new version of QGIS has introduced an API break. The key changes in QGIS 3.0 are as follows:
- Updated from Qt4 to Qt5
- Updated from PyQt4 to PyQt5
- Updated from Python 2.7 to Python 3.0
- QGIS API is improved , many classes have been deprecated or renamed.
The above changes have implications that the pgRoutingLayer plugin is no longer compatible with QGIS 3.0 . For my GSoC project I propose to accomodate these changes in pgRoutingLayer plugin code and also make use of the new features introduced in QGIS 3.0 to improve the functionality of plugin’s GUI. Also I propose to add functionality for the proposed stable functions of following families:
- Astar : pgr_astarCost , pgr_astarCostMatrix
- Bidirectional astar : pgr_bdAstarCost , pgr_bdAstarCostMatrix
- Bidirectional Dijkstra : pgr_bdDijkstraCost , pgr_bdDijkstraCostMatrix
- Flow
The current state of the pgRouting is not compatible with the new version of QGIS. The plugin is written in python 2 . It uses PyQt4 as python binding for Qt4 . There are proposed stable functions scheduled for the next major release. Current plugin has no functionality for these functions.Also there is no test coverage for the plugin code.
https://github.com/pgRouting/pgRoutingLayer/tree/gsoc/python3
These are the things I did while applying for GSoC
- Documented the pgRoutingLayer plugin code.
- Refreshed object oriented programming concepts.
- Refreshed SQL concepts.
- Read , documented and ran the pgRouting code on my machine.
- Read pygis cookbook and made a sample plugin.
- Studied the basics of Qt , PyQt .
- Studied about unit tests and wrote few tests for sample plugin.
- Read QGIS-api break , Qt5 , PyQt5 documentations.
- Read articles about porting QGIS plugins.
- Setup QGIS 3.0 environment on my machine.
Following tasks are planned to be done during 23rd April to 14th may.
- Get in touch with the community, mentors, and introduce my project to them and receive early feedback.
- Set up wiki page to maintain weekly progress and other information of the project.
- Study the PyQGIS cookbook and other resources to better understand the pgRouting code.
- Study the differences between Qt4 and Qt5 and maintain a list of these differences which are relevant to pgRouting code.
- Study the differences between PyQt4 and PyQt5 and maintain a list of differences specific to pgRouting code.
- Study the QGIS Api-break documentation and create a list of changes required in pgRouting code .
- Study the signatures and documentation of proposed functions.
Write Unit test for following files
-
Unit test for QGIS environment
-
init.py
-
pgRoutingLayer_utils.py
Write unit test and test the following files: updated **
-
** Instead of writing tests prior to migration, decided to write it after migration. **
-
Change one file using python 2to3 as well as qgis2to3 and discuss the differences.
-
All function files
-
Remove wildcard imports from every file to make it compatible with qgis2to3.
-
Use qgis2to3 and proposed method (mentioned in proposal) to port files to python3.
-
Remove translational errors.
- Buffer period ( for resolving errors and making small python scripts for Qt migration )
- Prepare work for Phase 1 submission along with a brief Phase 1 report.
- Prepare Pre-Phase 2 synopsis .
- Deliver a working code which is compatible in python 2.7 and 3.
- Evaluation of first phase work.
- Discussion of phase 2 strategy.
- Make changes as suggested in feedback.
- PyQt5 changes.
- Use qgisAPIfinder to get API differences and analyse the results.
- Start API changes.
** Decided to manually read the document and apply changes **
- API changes to pgRoutingLayer.py
- API changes to function files ( files that do not use dbConnection.py)
- API changes to rest of function files.
- Changes to dbConnection and PostGIs files.
- Resolve errors and any issues which may arise.
- Prepare work for Phase 2 submission along with a brief Phase 2 report.
- Deliver a working code compatible with Qgis 3.0.
- Mentors evaluate me and I evaluate the mentors .
- Discuss with mentors further refactoring and additional features to be added.
- Work on the feedback provided after the second evaluation
- Finalize the transition.(if remaining) .
- Documentation
- Write test and test the code.
- Code functionality for proposed functions.
- Prepare for final delivery.
- Wrap up my projects and submit final evaluation of my mentors.