------------------
**THIS VERSION BREAKS BACKWARDS COMPATIBILITY.** The compatibility is probably violated in several places, but the most
important change is probably a major change of how the test report html files are rendered. This will likely cause
the web interface of existing installations to be unusable
Fixes
- The "setup" and "teardown" script previously still used the old script system. Now they also use the camera class.
- The tests now also use the Camera class which is passed to them by the test runner and not the old method
- When using the "--mock" option, the "flash" command will not attempt to actually flash anything, the code is just
skipped
- The "flash" step of the build process now properly replicates the main process command line options "mock" and
"verbose" when invoking the "flash" command in a sub shell.
- Getting the most recent build is now based on the filesystem creation date of the folder and not the json report file
which may not exists yet at the moment of inquiry (This was a bug before)
- When the flashing process during a build fails, the build is not discarded but saved as a report nonetheless. The
test suite is still executed.
- A build script is not promised to be existing on the assumption that it "should" alone. The script manager now
actually checks if the script file exists.
Changes
- Added additional methods to be implemented for the interface "camera.AbstractCamera": "supports_prop", "set_prop" and
"get_prop" which can be used to manipulate internal properties of the camera.
- Added "camera.InternalDictMixin" which is a mixin, which implements the management of camera internal props by using
a central dict. Provides default implementations for the relevant abstract methods of
"camera.AbstractCamera"
- The "frame" command now uses the UfoCamera class to retrieve it's images.
- Added the module "noise.py" to the default list of camera tests. It is supposed to contain all those test cases which
are in some way concerned with the calculation of noise characteristics for the camera.
- Added "tests.noise.CalculateDarkPhotonTransferCurve" which sweeps different values for the cameras exposure time
and then calculates the noise for each one, plotting those results at the end.
- Added "tests.noise.MeasureNoiseMixin" which can be used for easy access to a method which wraps the measurement of
camera noise by taking two independent frames and then calculating the variance of the frame difference
- Changed the way the jinja template environment is managed: It is now also part of the main config singleton. And
a filter hook applies to the loaders which are registerd to this environment, allowing plugins to register custom
template folders.
- Changed the test report and the test context to now also have fields sensor, hardware and firmware version.
- Added a really convenient "--mock" option to the main ufotest command of the CLI. This will register a filter which
makes all subsequent code use the MockCamera class instead of the default UfoCamera class. By using this simple
option it should for example be possible to use every camera class compatible test case with the mock camera as well
from the command line.
- Added "ci recompile" command to the CLI. This command will render the test report html files again using the
information within the report.json file. This command exists for the case that config changes for the web interface
have been made. On default these would not be reflected within the static test report html files.
- Added "util.HTMLTemplateMixin" a mixin class which provides a default implementation of the "to_html" method.
- During a build, the cloned repository itself is now also completely copied into the build archive folder. This is
necessary to retrieve the scripts from that version later on.
- The test report template now creates a table of contents of sorts which consists of links that point to the
corresponding section of the html page with the detailed report about each test case
- Added a new test case "loaded_scripts" which checks if all scripts are indeed loaded as a build version from the
remote repository.
- Added a new test case "scripts_syntax" which checks the syntax of all loaded scripts.
- Extended the abstract base class AbstractScript with a default method "check_syntax" which can be overwritten by the
specific subclass implementations to implement custom syntax check routines for the corresponding script types. Did
this to enable it being used in the "scripts_syntax" test case. Already implemented it for the BashScript type. Also
this is optional with a default implementation.
- The home page now shows an additional widget for the disk usage of ufotest. Two fields: one for the used disk space
and one for the remaining available disk space on the host PC. This change was prompted by the fact, that now the
entire source repo is saved for every build. This *could* explode the disk usage rapidly so better to keep an eye on
it.
- Added a custom jinja filter "format_byte_size" which converts an integer amount of bytes into a pretty formatted
string of another byte related unit.
Hooks
- Added the action hook "pre_command_frame" which is called at the start of the "frame" CLI command.
- Added filter hook "camera_class" which will be used to retrieve the AbstractCamera subclass to use to interface with
the actual camera hardware.
- Added filter hook "home_recent_count" for the int amount of recent tests and builds to be displayed on the home page
of the web interface.
- Added filter hook "home_template" which allows to change the jinja template which is being used to display the home
page.
- Added filter hook "home_status_summary" which allows to modify the individual data fields which are displayed
in the summary box of the homepage
- Added filter hook "template_loaders" which allows to register custom plugin template files for jinja2 templates, so
that they will be appropriately discovered by the main system. Only if this is used, the plugin templates can extend
the native ufotest templates, which they should!
- Added action hook "modify_template_environment" which can be used to modify the main jinja Environment instance which
is used to render all the templates. This allows a plugin for example to define custom template globals and filters.
Web Interface
- Added "FontAwesome" to the static assets. This is a CSS/JS library for adding Icon support to a web site. These icons
are supposed to be used for the web interface of ufotest.
- Added "CodeMirror" to the static assets. This is a JS library which essentially adds a code editor widget, which can
be used to edit code of various languages complete with syntax highlighting... This will be used to implement the
TOML config file editor for the web interface.
- Added a new nav item "Config" which directs to a page where the config file can be viewed, edited and
then saved.
- Added actual content for the home page. The home page now displays some summary information about the ufotest
software itself, the hardware and the firmware for the currently connected camera. The information about the camera
is derived from the details of the most recent test report. Additionally, the home page will display lists of the
most recent test and build reports.
- Completely switched from plain CSS files to using SCSS for the static stylesheet assets of the web interface. These
will not be compiled in time though. They should be compiled during development so that the installable version of
ufotest can be shipped with the compiled CSS versions of those files.
Documentation
- Added "plugin.rst": In the future this should contain a minimal tutorial for how to setup a ufotest plugin.
- Extended "hooks.rst"
- Docstrings for "testing.TestRunner"
- Docstrings for "camera.AbstractCamera"
- Docstrings for "camera.MockCamera"
- Docstrings for "camera.UfoCamera"
TODO
----
Bugs:
Features:
- Add a widget to the home screen which shows how many GB the whole system is using.
- Make the builds be able to fail with a build error and properly highlight this in the ui!
- A command which lists the currently active plugins
- Change the default URL for pcitool installation
- Config file flash ID
- helpful error message when forgetting the ".git" for any repository url
- helpful error message when the wrong branch is specified for the CI repo or generally an error when the clone
process fails!
- Add information about the test suite to the builds list page.
- Better output for the "flash" command.
- Parameter for test cases encoded in their names. Could do it by colon separation or smth.
- Automatic generation of "datasheet" with some special characteristics...