Worked On Migration Of Plone Addons To Python 3

I created a new clean buildout from the Plone coredev Github repository using a checkout of the 5.2 branch. I added a local.cfg file to my local repo and added some packages to this file. This packages were checked out within the next run of buildout using the new local.cfg buildout file, extending buildout.cfg.

I created the local.cfg using the pointer from this webpage:
https://github.com/plone/Products.CMFPlone/issues/2184#issuecomment-359445243

I added a further section to the local.cfg for ‘mr.bob’. Thus my local.cfg looks like this:

[buildout]
extends = buildout.cfg

parts += mrbob

always-checkout = true

custom-eggs +=
        collective.dexteritytextindexer
        bobtemplates.plone

        
test-eggs +=
        collective.dexteritytextindexer [test]
        
        
auto-checkout +=
        collective.dexteritytextindexer
        bobtemplates.plone
        
[mrbob]
recipe = zc.recipe.egg
eggs =
    mr.bob
    bobtemplates.plone
        
        
[sources]
collective.dexteritytextindexer = git git://github.com/andreasma/collective.dexteritytextindexer
bobtemplates.plone = git git://github.com/plone/bobtemplates.plone.git

I created a new branch inside the collective.dexterity local repository with ‘git checkout -b python3’ and did on this branch the steps that are described on this website:
https://github.com/plone/Products.CMFPlone/issues/2184

I run sixer and python-modernize on the package and was able to get it running with Plone 5.2 on Python 3.6. I already created a new Plone site from scratch for this.

Then I created a new Plone add-on package using mr.bob and run sixer and python-modernize against the new package. Once this was finished I added the package to the local.cfg buildout script and run buildout again. I was able to start the Plone site with ‘./bin/instance fg’ without issues again. I installed the new addon within the ‘Site Setup’ page of Plone. The new addon had no real content at that time (only the necessary boilerplate / template).

This created the environment to migrate the current state of my Plone addons to the new Plone 5.2 version and Python 3. This migration is necessary because the support for  Python 2, currently used by Plone, ends within a year.

Working In A Calm Environment

It’s interesting how much spare you gain once you withdraw from a busy message environment. This helps to invest more time into more healthy acitivities (like outdoor runners training). It makes it also possible for me to concentrate more on improving my skills on Plone and Python and work on the migration of Plone addons to the next Plone main release, 5.2, running on Python 3.

And it is also interesting to notice the difference between the official speach of people about the volunteer work you have done and the real rating of that work. That helps to reclassify things and justify my direction.

Worked On Migration Of A Plone Addon to Plone 5.2 With Python 3

I started with my work to migrate a first Plone addon to Plone 5.2 on Python 3. I did this work on the addon cioppino.twothumbs. I first applied ‘sixer’ on it and than run ‘python-modernizer’ as described on this page. But I got some errors with the imports afterwards, once I started the Plone instance with ‘fg’. This imports were implicite relative. I changed them to explicite relative or absolute. The addon is running yet in the Plone instance. But there is a remaining issue with the css-file of the addon. I pushed my changes to the new git branch ‘python3’: https://github.com/tdf/cioppino.twothumbs/commits/python3.

Working Further With Plone and Python 3

I created a further buildout for Plone from the Plone coredev Github repository and checked out the 5.2 branch. The buildout went fine and I could create a new Plone site.

I tried out to create a new add-on with bobtemplates and it worked with my new Plone site (on Python 3.6). I was able to install the add-on without errors. I’ll try out some further add-ons with this buildout using my own extension of the core buildout script. I’m curious, if this add-ons will work with my buildout. If they will not run on Python 3 I’ll try to upgrade them.

Change IN GPX File Export

I bought a gps sport watch some month ago and found a free software program to get the activity data out of it.  This program and software project is named ttwatch with regards to the name of the manufacturer of the sport watch: Tom Tom.

This free software is able to get the activity data from the sport watch and convert them into different file formats, e.g. the gpx file format. I compared the gpx output files, created by this software with the ones, written by the free software gpsprune. The output of this two programs have a different order of the attributes latitude and longitude. I read about discussions about the correct order of this two attributes and decided that I would like to follow the order of gpsprune. Thus I created an issue report for the original project and added the necessary changes to a fork that I created on my Github account.

Plone Theming – So Difficult ;-)

The Plone CMS/DMS came with a theming editor, where you could create a new theme and edit themes. You could copy an already on the site available theme or create a theme from scratch. It’s your choice. I used the theme part in the administration interface to copy the Plone default theme ‘Barceloneta’ and save it under a new name.

Plone – New Theme Created From Default Theme

I could edit this new theme with the Plone theme editor (button ‘Modify Theme’.

The Plone Theme Editor

The theme is based on the Diazo theme engine (https://docs.plone.org/external/diazo/docs/index.html#diazo-theme-engine-guide)

Gave Plone 5.2 On Python 3 Another Try

I updated my local copy of the Github repository for Plone buildout.coredev and gave the branch for the Python 3 migration another try. I run the bootstrap-py3.sh script and all packages were updated. Then I started Plone with ‘./bin/wsgi fg’ and created a new Plone site.

I activated the multilingual add-on to make the new Plone site available in different languages. This added a special dialog to the administration page. I opened this dialog and added a second language to the site (in my case German). Plone created different folders for each of the two languages. I gave first the English folder a try and added a first page to it. Because I don’t want to use my time for typing I copied content from the website of The Document Foundation website.

Plone 5.2 on Python 3 – First Page

I published this page and choose it as the default page of the English section. Then I tried out the translation framework of Plone. I made a test with a translation of the page into German.

Plone 5.2 on Python 3 – Using Translation Feature

The dialog shows me the different fields of the English page and I could easily start to write a translation into German. If I had already local or somewhere else a translation of the English text, I could do copy and paste.

Once finished with the translation I saved it and published the page. I set it as the default of the German section. Users with German laguage setting or preference will get this translated page as their entry point now.

Fake News About Expense?

I read in an email on the LibreOffice design list that has been resources allocated to the extensions and templates website for about 25 thousand Euro (from a long time member of the board of The Document Foundation: https://listarchives.libreoffice.org/global/design/msg08869.html). This generates the impression that there has been spent this amount of money to improve the site. But if you look into the accounting legers of The Document Foundation (TDF) (https://wiki.documentfoundation.org/TDF/Ledgers) you will get the real data. TDF spent in 2017 6399,44 Euro and in 2018 642,60 Euro; all in all 7042,04 Euro, which seemed only a bit less than 25 thousand Euro 😉

This TDF resources were used espially to migrate the content of the first LibreOffice extensions and template websites into the new one, for smaller fixes within the code, a professional buildout and maintenance environment and a training of two TDF staff member on the platform and its maintenance (myself wasn’t part of the training session).

The biggest part of the development of the new LibreOffice extensions and templates website was done  during my spare time. I tried to save as much as possible expenses for TDF, because I thought it would help to lower the adminstration expenses of TDF and free more money for the promotion of education and science.

Really Shocked!

I’m doing volunteers work in different roles and areas of the project for about sixteen years yet. I spent a lot and for some longer periods nearly my whole spare time on the project. I suffered from a public accusation  of a destructive communication style. This harmed me very intense. I though this could be a singular ‘event’. But I was tought today that this seemed to be the new behavior of members of the leading body.

I created and maintained the LibreOffice extensions and template website for more than seven years yet. I read today on a public maiing list that the work I had done during my spare time for this period was not even werth to talk to me (even by email). Instead I felt my work devaluated in public. I felt like being in the pillory. I though the methods of the Middle Ages were not such popular anymore. But I had to confess that I was at fault.

This is behavior and communication style is not appropriate for a project, where I want to spent my spare time and do volunteer work. Because the behavior is not a single ‘event’ I stop my work for and within the LibreOffice project as from now.

I’m open for intensive and also critical discussions but not for a behavior and communication style that I wouldn’t accept in the office during my paid work.

Working On A New Python-Script For Extension Evaluation

I started my work on a new Python script to evalute LibreOffice extensions. It’s currently in a very early state and I’m going to use only very limited spare time to update it. I’m going to concentrate on more healthy activities than sitting in front of PC. Thus don’t be surprised if this and other task will not be finished immediately. I’ll adapt my workflow / workload to the favored range of the open source project, particularly it’s only pure volunteer work.