FAstAPI is an async framework. Data may be imported and exported, load and save, set and get
asynchronously. Prevent interleaving data operations to corrupt the data. In the previous design
sync and async data access was intermixed leading to data corruption.
The basic data classes DataSequence and DataContainer and the derived classes like Provider and
Measurement now are async. Data access is protected by several async locks.
To support the async design of the data classes the database interface became async.
The energy management is also adapted to the new async design. Optimization is still off-loaded
to another thread, but the prepration for the optimization and the post optimization actions now
follow the async design.
Adapter operations are now also protected by async locks.
Tests were adapted to the async design and new tests were created.
Besides this major fix several other improvements and fixes are included in this PR.
* fix: key_to_dict/list/array only regard data records with key value set.
Before the exclusion of no value data records was only done if the dropna flag was set.
* fix: test for visual result pdf generation
Due to updates in the library the generated charts text was a little bit different.
Adapt the test to create the comaprison pdf in the test data durectory and
update the reference pdf.
* chore: Remove MutableMapping from DataSequence and DataContainer.
Mutable Mapping does not fit to the now async design.
* chore: Add NoDB database backend
This backend implements the full database backend interface but performs
no actual persistence. It is intended for configurations where database
persistence is disabled (`provider=None`).
* chore: Improve measurement data import testing with real world scenarios.
Added two new endpoints to support testing.
* chore: Add mermaid to supported documentation tools
* chore: Add documentation about async design
* chore: Add documentation about generic data handling
Covers the basics of measurement and prediction time series data handling.
* chore: Add empty lines around markdown lists.
* chore: sync pre-commit config to updated package versions
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Add a fixed electricity prediction that supports prices per time window.
The time windows may flexible be defined by day or date.
The prediction documentation is updated to also cover the ElecPriceFixed
provider.
The feature includes several changes that are not directly related to the
electricity price prediction implementation but are necessary to keep
EOS running properly and to test and document the changes.
* feat: add value time windows
Add time windows with an associated float value.
* feat: harden eos measurements endpoints error detection and reporting
Cover more errors that may be raised during endpoint access. Report the
errors including trace information to ease debugging.
* feat: extend server configuration to cover all arguments
Make the argument controlled options also available in server configuration.
* fix: eos config configuration by cli arguments
Move the command line argument handling to config eos so that it is
excuted whenever eos config is rebuild or reset.
* chore: extend measurement endpoint system test
* chore: refactor time windows
Move time windows to configabc as they are only used in configurations.
Also move all tests to test_configabc.
* chore: provide config update errors in eosdash with summarized error text
If there is an update error provide the error text as a summary. On click
provide the full error text.
* chore: force eosdash ip address and port in makefile dev run
Ensure eosdash ip address and port are correctly set for development runs.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>