= Full support of Python 3 in GRASS GIS = || Title: || '''Full support of Python 3 in GRASS GIS''' || ||Student Name: || Sanjeet Bhatti || ||Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation] || || Mentor Name: || Anna Petrášová and Luca Delucchi || || GSoC proposal: ||[https://docs.google.com/document/d/18kD6I7adTKmtXpGOKr4A8hf1pBcf0LNU7jiiRoi9wJ8 View proposal] || || Link to code: || [https://github.com/sanjeetbhatti/FullSupportPython3 Code Repository] || == Abstract == The current GRASS GIS version has partial support for Python 3. This project aims to update core GRASS components for Python 3 and update all the python modules, libraries and components like script package, python/ctypes, pygrass, temporal, wxGUI, etc. At the end of this project, GRASS GIS will be compatible with both the versions of python, i.e Python 2.7 and Python 3 with its GUI having support for wxPython 4. == Timeline == {{{#!th style="background: #ddd" rowspan=2 '''Time Period''' }}} {{{#!th style="background: #ddd" colspan=2 '''Milestones''' }}} |----------------------- {{{#!th Tasks }}} {{{#!th Status }}} |----------------------- {{{#!td April 23 - May 14 \\ ''Community Bonding'' }}} {{{#!td - Introduction to Community - Create Wiki page - Set up code repository - Add links to community wiki pages - Set up development environment - Discussion with community members and mentors about the design of the project - Get familiar with the testing framework - Update current tests of the python script library, adjust them to work with Python3 - Get familiar with the overall working of GRASS GIS and understand Python dependencies in the system - Read documentation - Practice fixing bugs }}} {{{#!td {{{#!html Done
Done
Done
Done
Done
Done
Done
Done
Done
Done
Done }}} }}} |----------------------- {{{#!td May 14 - May 20 \\ ''Week 1'' }}} {{{#!td - Dealing with Unicode & binary data (encoding and decoding). - Setting up the foundation for porting the main libraries and components }}} {{{#!td }}} |----------------------- {{{#!td May 21 - May 27 \\ ''Week 2'' }}} {{{#!td Porting script package module and its dependencies }}} {{{#!td }}} |----------------------- {{{#!td May 28 - June 3 \\ ''Week 3'' }}} {{{#!td Porting temporal module and its dependencies }}} {{{#!td }}} |----------------------- {{{#!td June 4 - June 10 \\ ''Week 4'' }}} {{{#!td - Finish pending work for this phase, if any. - Preparing and testing the changes for the evaluation }}} {{{#!td }}} |----------------------- {{{#!td style="background: #ddd" July 11 - July 15 \\ ''Evaluation 1'' }}} {{{#!td style="background: #ddd" - Evaluation of work done in the previous phase - Next phase discussions }}} {{{#!td }}} |----------------------- {{{#!td June 11 - June 17 \\ ''Week 5'' }}} {{{#!td - Incorporate any changes, as necessary, from the discussions and feedback - Finish porting remaining libs, components and scripts }}} {{{#!td }}} |----------------------- {{{#!td June 18 - June 24 \\ ''Week 6'' }}} {{{#!td Work on porting ctypes module }}} {{{#!td }}} |----------------------- {{{#!td June 25 - July 1 \\ ''Week 7'' }}} {{{#!td - Porting pygrass module and its dependencies - Porting other libs and their dependencies }}} {{{#!td }}} |----------------------- {{{#!td July 2 - July 8 \\ ''Week 8'' }}} {{{#!td - Finish pending work for this phase, if any. - Preparing and testing the changes for the evaluation }}} {{{#!td }}} |----------------------- {{{#!td style="background: #ddd" July 9 - July 13 \\ ''Evaluation 2'' }}} {{{#!td style="background: #ddd" - Evaluation of work done in the previous phase - Next phase discussions }}} {{{#!td }}} |----------------------- {{{#!td July 9 - July 29 \\ ''Week 9-11'' }}} {{{#!td - Based on the feedback, make necessary changes - Writing additional classes in wrap.py for updating wxGUI to be compatible with both wxPython 3 and 4. - Finish porting to Python 3 - Fixing all deprecated messages - Testing the changes. }}} {{{#!td }}} |----------------------- {{{#!td July 30 - August 5 \\ ''Week 12'' }}} {{{#!td - Preparing and testing all the changes - Writing documentation for the final evaluation }}} {{{#!td }}} |----------------------- {{{#!td style="background: #ddd" August 6 - August 14 \\ ''Evaluation 3 (Final)'' }}} {{{#!td style="background: #ddd" - Final code submission - Evaluation of final submission }}} {{{#!td }}} == Community Bonding Period Report == During the Community Bonding Period I performed the following activities: '''Introduction to Community'''\\ I wrote an introductory email to the SoC mailing list and grass-dev mailing list and gave a description about my project and shared my wiki page, public repository, and project proposal links. '''Create Wiki page'''\\ I requested the write access to setup a project wiki page. Then, I created my wiki page detailing the project description, containing link to my GSoC application, a detailed timeline, link to my public repository where all my commits and progress can be followed. '''Set up code repository'''\\ I have setup my code repository on github for tracking the applied changesets. '''Set up development environment'''\\ I setup my development environment (Ubuntu 18.04) for two Python versions (Python 2.7.x and Python 3.6.x) for which I am using virtual environments. This was done because I need to make sure that when I update any code it should be compatible with both the versions. '''Add links to community wiki pages'''\\ I added my project links to the OSGeo's Google Summer of Code 2018 Accepted students wiki page and trac wiki page: https://wiki.osgeo.org/wiki/Google_Summer_of_Code_2018_Accepted and https://trac.osgeo.org/grass/wiki/GSoC. '''Discussion with community members and mentors about the design of the project'''\\ I got in touch with my mentors to discuss the right approach to test the code and submit files. '''Get familiar with the testing framework'''\\ I followed the wiki page to get familiar with the testing framework(https://grasswiki.osgeo.org/wiki/GRASS_and_Python). I also followed the grass Python Scripting tutorials from this link: https://github.com/wenzeslaus/python-grass-addon '''Update current tests of the python script library, adjust them to work with Python3'''\\ I updated the code in the python script library to make it work on Python3 and submitted the patch files for those. I used the standard North Carolina dataset that uses the basic version of the dataset. (https://grass.osgeo.org/download/sample-data/) I have looked through the summary reports for the current tests of GRASS which is going to be useful when I will update tests for the libraries in the system. (http://fatra.cnr.ncsu.edu/grassgistests/summary_report/) '''Get familiar with the overall working of GRASS GIS and understand Python dependencies in the system'''\\ I went through the GRASS wiki pages to get familiar with the working of the system (https://grass.osgeo.org/grass75/manuals/libpython/) and looked through the source code. Also, I found the code dependencies that I will be working with throughout the coding period. '''Read documentation'''\\ I read some documentation related to GSoC guidelines about working throughout the GSoC period. I also read GRASS GIS Python library documentation: (https://grass.osgeo.org/grass75/manuals/libpython/) '''Practice fixing bugs'''\\ I wrote a bug fix related to wxPython(https://trac.osgeo.org/grass/ticket/3510) during Pre-bonding period and submitted the patch file. == Weekly reports ==