Thursday, May 27, 2021

End-user help pages

I added a documentation entry about makehelp. The generation process itself seems now good, but the next step and the most exciting work here is still to do: have it generate some useful content into help pages. I am full of ideas, but find no time to realize them.

Review the notification framework

Sharif and I continued to work on lino.modlib.notify and #4174 (Improve serviceWorker).

I pushed my changes in lino, xl, ug and book.

This sprint on the notification framework seems to come to its end. The biggest change is that we now use the Push API instead of websockets (django-channels and awsgi) for implementing desktop notifications. The lino.modlib.notify.use_websockets plugin parameter is still there but setting it to True means that you enter unmaintained areas. lino.modlib.notify.use_websockets

The notification messages are now being created in a subprocess. Thanks to Sharif who did this fully alone. It’s only a few lines of code thanks to Python’s multiprocessing module, but you stilled need to find out how to use it.

The Subscription model now has allow_cascaded_delete for its user field.

In order to test whether ChangeNotifier works, the demo2 fixture for lino.modlib.comments now also calls after_ui_save.

In notify: Notification framework we added a snippet that shows these messages.

send_notification() now logs what it does. The subject of a push notification must be the title of the Lino site.

The lino_xl.lib.groups plugin was saying that it wants to install lino.modlib.comments, which was nonsense.

New Site parameter lino.core.site.Site.use_multiprocessing because the demo fixtures now also create notifications for the demo comments. And the subprocess didn’t execute correctly during pm prep.

TODO: Is there some way to say in pm prep that it should wait for all subprocess to finish?

TODO: After releasing to Jane, observe whether notifications are correctly done.

Using Docker

How to build a Docker image that allows you to ssh into it:

$ go hg
$ cd projects/ansible
$ docker build -t newserver -f Newserver ~/.ssh
$ docker run -it newserver /bin/bash