Sunday, July 24, 2016

The Invoke configuration is tricky

I stumbled over a subtle problem related to my usage of the invoke configuration when defining the blog_root setting.

This setting is defined once for (almost) all my projects in my user preferences, which are in ~/.invoke.py. Except for certain projects which have their own blog. These projects have an invoke.yaml file which overrides this value.

Now I continued my general plan of moving all project settings from the invoke.yaml files to the tasks.py files. I added the following to their tasks.py file:

from unipath import Path
ROOT = Path(__file__).parent
DOCS = ROOT.child('docs').absolute()
ns.configure(dict(blog_root=DOCS))

And that didn’t work as expected. Because Invoke loads first all .py configs and then all .yaml configs, and user preferences override project configuration when they are in the same format.

Tolerating database errors during dumpy

When you run dumpy in a project whose database structure is not in sync with the source code, then the dump normally fails upon the first database error. When you specify –tolerate then it will continue nevertheless. The danger with this is that you might not even see these error messages. So now dumpy repeats them at the end, saying:

There were <count> database errors. The dump in <filename> is not complete.

Lino XL being tested on Travis CI

Hamza submitted a pull request for The Lino Extensions Library which adds a .travis.yml file to the repository. And also a requirements.txt file.

I also had to tell travis-ci.org to watch for it.

I added appy and fuzzy to the requirements.txt file because I believed that this file replaces the information specified by install_requires. Later I removed them again and saw that I was wrong.

Now the build starts on Travis, The Python 2 version passes, but the Py3 version fails

Hamza, I let you investigate this. Can’t you create an account on Travis and have it watch your GitHub repositories as well? Isn’t one CI build enough? Should we stop using drone.io?

Releases on Die Eiche and lino-framework.org

Yet another case of The Lino Daemon. I started a new document Using virtualenv. I made a translation to German. Otherwise nothing special. Except for the following error message:

201607-24 16:44:50 INFO courses_enrolment : Loading 1431 objects to table courses_enrolment...
201607-24 16:45:08 WARNING models : 81.00 * 1 -> can't multiply sequence by non-int of type 'Decimal'

Miscellaneous

There was an import sys missing in the test suite of The Lino Book.