This PR cleans up the KLibs CLI code and fixes a few bugs, but also makes the klibs CLI interface much faster to use by ensuring SDL2 and other external dependencies don't need to be loaded unless actually running an experiment. This means that klibs -h shows the help text near-instantly instead of having noticeable lag, and functions like klibs export and klibs db-rebuild are notably more responsive.
Apart from ensuring the main CLI only loads slower dependencies during actual runtime, the other main architectural change here is that the CLI code for handling and prompting users about a missing database has been moved to cli.py, meaning that all user-facing CLI functionality are now contained in cli.py and __main__.py.
Merge Checklist
[x] the PR has been reviewed and all comments are resolved
PR Description
This PR cleans up the KLibs CLI code and fixes a few bugs, but also makes the klibs CLI interface much faster to use by ensuring SDL2 and other external dependencies don't need to be loaded unless actually running an experiment. This means that
klibs -h
shows the help text near-instantly instead of having noticeable lag, and functions likeklibs export
andklibs db-rebuild
are notably more responsive.Apart from ensuring the main CLI only loads slower dependencies during actual runtime, the other main architectural change here is that the CLI code for handling and prompting users about a missing database has been moved to
cli.py
, meaning that all user-facing CLI functionality are now contained incli.py
and__main__.py
.Merge Checklist
closes #<issue-number>
to automatically close an issue