Commit Graph

15 Commits

Author SHA1 Message Date
Fredrik Adelöw aaab1e34da Fix linting errors after #13392
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2022-08-30 13:44:09 +02:00
goenning 60ec1a959b simplify error handling
Signed-off-by: goenning <me@goenning.net>
2022-01-11 15:14:52 +00:00
goenning a60eb0f0dd add checks bulk operation
Signed-off-by: goenning <me@goenning.net>
2022-01-11 15:14:52 +00:00
goenning 273c9aa1ca fix unit test
Signed-off-by: goenning <me@goenning.net>
2021-12-23 11:03:06 +00:00
goenning fc6530ea19 fix unit test name
Signed-off-by: goenning <me@goenning.net>
2021-12-23 10:49:44 +00:00
goenning 8d00dc427c ability to add custom operators
Signed-off-by: goenning <me@goenning.net>
2021-12-23 10:49:44 +00:00
Jacob Wejendorp 8814c893e3 feat: add logging when skipping checks
Signed-off-by: Jacob Wejendorp <jwe@tradeshift.com>
2021-12-17 11:59:29 +01:00
Jacob Wejendorp 91c353da3a Apply suggestions from code review
Co-authored-by: Marley <55280588+marleypowell@users.noreply.github.com>
Signed-off-by: Jacob Wejendorp <jwe@tradeshift.com>
2021-12-17 11:53:50 +01:00
Jacob Wejendorp b8d7602cfa test: add tests for JsonRulesEngineFactChecker changes
Signed-off-by: Jacob Wejendorp <jwe@tradeshift.com>
2021-12-16 15:52:17 +01:00
Jacob Wejendorp c88d8339a3 fix: allow partial evaluation of checks in jsonfc factchecker
This change should fix the entity check endpoint when some facts are
missing, e.g. the retriever has not run yet.

Signed-off-by: Jacob Wejendorp <jwe@tradeshift.com>
2021-12-16 15:27:47 +01:00
Jussi Hallila 2b3e959ef4 Modifications after PR review
* Change entity filter to be an actual entity filter instead of a list of kinds or types
* Modify/simplify types a little bit
* Split common type libs to one for node and one isomorphic
* Remove unnecessary items from FactChecker interface to simplify execution loop.

Needs still matching README.md changes.

Signed-off-by: Jussi Hallila <jussi@hallila.com>
2021-10-29 15:20:58 +02:00
Jussi Hallila df000b9596 Address various code review comments.
Signed-off-by: Jussi Hallila <jussi@hallila.com>
2021-10-29 15:20:58 +02:00
Jussi Hallila b427f4ba0b Modify validation to have a more user friendly API
* Adding a container type to be returned from validate function
* Modifying JsonRulesEngineFactChecker to throw with error information if check addition fails on validation

Signed-off-by: Jussi Hallila <jussi@hallila.com>
2021-10-29 15:20:58 +02:00
Jussi Hallila b2363f3e3b Add explicit type information to checks
Types can be used to:
* Determine which check logic to run
* Determine the correct persistence option to use
* Choose correct ser/deser logic for the check
* Determine correct components to render on the frontend

Modify router API to be post for better usability. The API might end up doing writes if caching etc. is added in later as well.

Modify CheckRegistry & FactChecker to return persisted check when it is registered.

Signed-off-by: Jussi Hallila <jussi@hallila.com>
2021-10-29 15:20:58 +02:00
Jussi Hallila 75fc6ac85b Implement Tech Insights backend
* Add common types and interfaces for Tech Insights. Exposing components needed to use and modify tech-insights-backend module and to implement individual Fact Retrievers, Fact Checkers and their persistence options.

* Implement a framework to run fact retrievers and store fact data into the database. Add migration scripts to create a new database for `tech_insights`.

* Create a default implementation of a FactChecker enabling users to construct checks and run them and generate scorecards based on checks.

* To be able to use tech insights in your application you need to implement `FactRetriever`s to retrieve and return data for facts and register them to the tech-insights-backend. If you want to use fact checking functionality, you need to create `check`s and register them to an implementation of a `FactChecker`.

For more information see documentation on the README.md files of the respective packages.

Signed-off-by: Jussi Hallila <jussi@hallila.com>
2021-10-29 15:20:58 +02:00