Skip to content

Release 0.7.0 - Config Reload

Latest
Compare
Choose a tag to compare
@xsedla1o xsedla1o released this 19 Dec 14:22
· 109 commits to master since this release

With this release, DP³ moves to use the newer version 2 of Pydantic, which is used internally for most data validation needs, be it incoming datapoints or configuration. This also means a bump in the FastAPI version used. You may need to reinstall the requirements for DP³ in your existing installations.

Modules

  • Modules and values derived using on_entity_creation and on_new_<attr> callbacks can now be refreshed after configuration changes using the API.
  • Updated BaseModule class to initialize the logger and a SharedFlag for module refreshing purposes. Modules should now place the loading of configuration into the load_config method.
  • CallbackRegistrar now offers new init and finalize hooks to give module context about snapshot creation.

API

  • Added a new telemetry endpoint to show source validity.
  • Added fulltext filters when querying the latest snapshots.
  • The Control section has two new endpoints, one for refreshing all on_entity_creation callbacks for a particular entity, another for reloading the module configuration as mentioned above.

Links

  • Links have become more expressive, as mirrored links are now available, allowing for easier 1-M relation modelling and having data more accessible in all sides of the relation. (see config)
  • Another addition is allowing links in arrays and sets, which allows M-N relations without using multi-value observations attributes.

Schema Tracking

  • The schema defined by db_entities is now tracked in the database and will prompt users on conflicting changes on platform startup.
  • The required DB changes can be applied using dp3 schema-update and should require no manual interaction with the database.

Internal changes:

  • Snapshooter only links entities for making snapshot when necessary (previously unused relations were loaded regardless).
  • Snapshooter and GarbageCollector link cache collections have been merged into one managed by LinkManager.
  • Links to and from deleted entities are now deleted from master records.
  • Various minor logging changes and other fixes.