I split the function into two. Calling env_string() will return the
string we generate with the versions of the various modules we depend
on. Calling print_env() will print this string.
I need env_string() so we can set the environment as a tooltip in the
header.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This Label supports setting a prefix that is applied to the displayed
string and setting a font size in pixels.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is a wrapper around the sqlite3.Connection objct that adds some
nice functionality to make working with SQL easier.
I defined the following magic methods:
* __enter__() to manually begin a transaction
* __exit__() to commit or rollback a manual transaction
* __call__() to execute a SQL statement with either positional or
keyword arguments.
Additionally:
* I define a "CASEFOLD" function that can be used in queries
to lowercase unicode text when searching.
* I set foreign_keys = ON so foreign keys checking is always enabled
* I provide an executemany() function for running running the same
statement multiple times with different arguments.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We can put all our icons into a single resource bundle that gets loaded
and only exists for our app.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I'm going to put all of the main source code into a single subdirectory
under emmental/ and separate out tests into a separate tests/ directory.
Additionally, I have switched over to pytest for running tests to give
me better output (with color!)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>