Thursday, August 18, 2016

A new newbie

Welcome to Rauno who answered to our job offer on talendidkoju.ee. He is a Python beginner and will start as a volunteer. Unlike Grigorij or James he has the advantage of living close to me. We won’t meet during the next weeks because I will be in Belgium, but meanwhile I made two optimizations to the Dive into Lino: I splitted More about your developer environment and Run the Lino test suite into two separate pages and moved The LETS tutorial out of the “Your first application” section to “Get acquaintaned”.

Miscellaneous

Oops, the code snippets I added yesterday to The Lino Polls tutorial worked only yesterday. Fixed.

A button too much

Oops, we now have a button in the team variant of Lino Noi as well. We don’t want it there. It was meant only for Lino Care users. A side effect of #1134.

By “the button” I mean of course the TakeAuthorship action. This action is visible only for users having the AuthorshipTaker role.

The problem comes because I made OfficeOperator inherit from AuthorshipTaker. I must remove it there (not all office operators are authorship takers), and then, in lino_welfare.modlib.welfare.roles, add AuthorshipTaker to all roles which inherit from OfficeOperator.

The problem went undiscovered because this situation was not covered by our test suite. Now it is covered in tickets (Ticket management in Noi).

The Polls tutorial and Django 1.10

Hamza wrote about the The Lino Polls tutorial tutorial:

Working with the original value of demo_fixtures which is [‘std’, ‘demo’, ‘demo2’] throws an error with Django 1.10 because the fixtures std and demo2 don’t exist for the polls project. To avoid this, I have added demo_fixtures = [‘demo’].

The default value for demo_sites

As a continuation of Hamza’s observation and to make things more clear, I changed the default value for demo_sites from [‘std’, ‘demo’, ‘demo2’] to [].

This caused Using mldbc with different variants of a same language to break. I fixed it by adding a demo_sites there.

About single-directory tutorials

I also noted that the Using mldbc with different variants of a same language tutorial (and several others) also still uses the obsolete and unpedagogical “call_command” approach for loading its demo fixture. But we cannot I replace this by the newer Sheller approach because this doesn’t work in documents that are being tested using run_django_manage_test. The Sheller approach does not work in my so-called “single-directory tutorials” because Django creates a temporary test database while a manage.py initdb_demo command called from sheller would run in the cached demo database. Very subtle. I think the only good solution to this would be to convert these single-directory tutorials to demo projects. One advantage of single-directory tutorials this the (apparent) simplicity because everything is in one directory. This advantage would get lost. To be meditated. Not urgent. Ticket #1138.

Three new tickets

  • Lino Garden : a Lino for managing Lino sites on SAAP server. The host provider would register every customer into this as a user, and the end-users can themselves select thei application, specify installation options, initialize their database, make backups, launch upgrades. Ticket #1053

  • A document with control questions in order evaluate how far a newbie or core team candidate is. Ticket #1142.

  • Get Lino applications to run from PyPI. It seems that this is currently not possible because some templates are not included with the source dists. This will also require us to use testpypi and to formalize the release procedure. Ticket #1142.