[GeoNode-devel] GNIP-64 Status and Plan

Travis Brundage travislbrundage at gmail.com
Mon Nov 4 20:22:59 PST 2019


Hi all,

Just wanted to write a status report with regards to GNIP-64. I am excited
to hear that help is on the way too :)

Most of what Coop wrote in the GNIP is still accurate. Broadly speaking, I
see this broken down into the following steps:
1. Python library analysis
2. Test suite improvements
3a. Python library updates
3b. GeoNode codebase update
3c. django-osgeo-importer update
4. Testing and release
5. Repeat for Django 2

Coop had already started a spreadsheet detailing the libraries GeoNode uses
and their Python 3 compatibility. I have updated this recently. You can
find it here:
https://docs.google.com/spreadsheets/d/1buUuIeGPL8zfv5xFotfGMpxHt2i8njoCEh4Y4kna3rY/edit#gid=0

>From this you can see a few categories.
1. Some libraries are completely outdated and inactive and require removal
and if needed, replacement.
2. Some libraries do not yet have Python 3 compatibility, but we could
update them for the community. Otherwise, we’ll need to remove and possibly
replace them.
3. Some libraries do not yet have Python 3 compatibility, but the community
is working on it or their github still has activity. We could save these
for last or offer to help their community upgrade.
4. Some libraries do not officially support Python 3 or 3.7 specifically,
but seem to build fine as is in a Python 3.7 environment.
5. Some libraries are GeoNode community’s. :)
6. Some libraries have newer versions that are Python 3+ compatible, but
not backwards compatible with Python 2.7. These need to be delayed until
GeoNode core is updated.
7. The majority thankfully - some libraries are fully Python 2.7 and 3.7+
compatible.

Next is improving GeoNode’s test suite. I don’t have a precise goal here,
but want to improve the speed and coverage of GeoNode’s tests to prepare
for the Python 3 upgrade, so we can more easily identify any functionality
that gets broken. I have already run into a few issues and made another
thread about this.

For upgrading the codebase, I planned to branch off the next release,
2.10.1.

>From what I have researched, I don’t know if there’s a “correct” way to
update a codebase to Python 3, but seems like there are a few strategies.
My plan was to create a new branch and brute force the 2to3.py script, and
hopefully with good test coverage, get a useful coverage report to see what
has broken.

Possibly that is too much and won’t prove fruitful, in which case I would
start a new branch and do it app by app instead. I have not tested 2to3.py
in the wild before, so I don’t know how helpful it is, but from what I’ve
read it is a good starting point usually.

As a side note, it will be helpful to configure your IDE of choice with a
Python 3 interpreter. I use PyCharm, so some instructions for that here:
https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html

In general my plan of attack is:
1. Run Python 2to3 script
2. Clean up anything breaking GeoNode build entirely
3. Run tests for coverage report to see what breaks
4. Clean up until tests pass
5. Check visually in GeoNode that the app seems to function
6. Clean up until interactions work as expected

Simultaneously we’ll need to update the remaining Python libraries. This
will be a bit tricky as some provide Python 3 compatibility on later
versions, but not with Python 2 compatibility. Also, some still do not have
Python 3 compatibility at all, so the work is on us or drop those libraries.

We'll also need to make sure GeoNode's libraries are updated, and it was
planned to do django-osgeo-importer as part of the work too.

If all goes well, we should have a functioning GeoNode running on Python 3.
:)
I think Alessio’s testing document will be very helpful again here:
https://docs.google.com/spreadsheets/d/13aaZ1l_2_SHzdmz9DwExEO_jxwgNuXfMa6oF5eWIv_s/edit#gid=376642658

I don’t know exactly how this work should be merged in (or if it would be),
as I assume development will continue on GeoNode master, so we will need to
resolve changes along the way. This won’t be a problem for a little while
though.

Finally, repeat for Django 2. My hope is this part is easier, as I think
there are less compatibility conflicts there, but we’ll see.

I think that about wraps it up. Let me know your thoughts or if you have
any advice for me, and feel free to message me here or on Gitter to
coordinate on this effort. Thank you all for helping out on this!

Cheers,
Travis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20191104/20c22b36/attachment.html>


More information about the geonode-devel mailing list