Wednesday, March 23, 2016¶
More report optimization¶
The JobsOverview
report was failing
after yesterday’s internal optimizations. It took me yet another hour
to repair it. But the result is cool: we no longer need the
JobsOverview/Default.odt
template, and the functional spec
(jobs : The Jobs plugin) now also tests the content of this
report.
Yet another example of why a developer should be paid per month (or per hour), but not per ticket.
Importing legacy data into Lino Welfare¶
During a phone metting with Wilfried I understood a few more things. We must import only disbursement orders, nothing else. And Wilfried now gave me a complete list of the accounts (budgetary articles) to import.
I adapted cpas2lino
. Here is some doctest snippet which I
used for basic temporary tests before committing.
>>> from lino import startup
>>> startup('lino_welfare.projects.eupen.settings.doctests')
>>> from lino_welfare.modlib.welfare.management.commands.cpas2lino \
... import wanted_accounts
>>> for obj in wanted_accounts():
... obj.full_clean()
... # obj.save()
... print(obj)
(832/330/03B) Heizölzulage (durch Staat bezuschusst)
(832/330/05) Sozio-kulturelle Beteiligung (Allgemein)
...
(832-4653/03) Erstatt. an Staat von Einn. 832/-3343/21
Just as a reminder to myself, here are the commands to run on the server:
$ go testlino
$ a
$ time python manage.py run ../cpas_eupen/snapshot/restore.py
$ python manage.py run create_journals.py
$ cat delete_ledger.sql | python manage.py dbshell
$ time python manage.py cpas2lino /mnt/oeshz_home_server/ANWPROG/TIM/CPAS
Letsencrypt sends erroneous expiration notices¶
I received yet another email from expiry@letsencrypt.org:
Let's Encrypt certificate expiration notice
Hello,
Your certificate (or certificates) for the names listed below will
expire in 9 days (on 01 Apr 16 19:39 +0000). Please make sure to
renew your certificate before then, or visitors to your website
will encounter errors.
...
For any questions or support, please visit
https://community.letsencrypt.org/. Unfortunately, we can't
provide support by email.
If you are receiving this email in error, unsubscribe at
http://mandrillapp.com/track/unsub.php?...
Regards,
The Let's Encrypt Team
I started to receive these reminders about three months after my first installation on that server. After the first mail I ran letsencrypt-auto renew successfully. When I run it now, I get:
$ letsencrypt-auto renew
Updating letsencrypt and virtual environment dependencies...
...
The following certs are not due for renewal yet:
... (a list of all certificates on that server)
No renewals were attempted.
Maximum recursion depth exceeded while calling a Python object¶
While investigating for #844 I tried to do a dump and a restore in The Châtelet variant of Lino Welfare in the hope of reproducing the problem.
I got another problem instead. When trying to reload the data, I had
an AttributeError: module object has no attribute
OverlapGroups
on this line of the restore.py
file
if overlap_group: overlap_group = settings.SITE.modules.isip.OverlapGroups.get_by_value(overlap_group)
This was because the following line was missing in
lino_welfare.modlib.isip.models
:
from .choicelists import *
So I had to do an upgrade in CPAS de Châtelet before even investigating more about #844.
TODO: Automatically run double dump test (fab ddt
) for all demo
projects.