Commit Graph

27 Commits

Author SHA1 Message Date
Patrik Oldsberg 7037ea5a43 Merge pull request #8594 from goenning/go/add-custom-operators
[TechInsights] ability to add custom operators
2021-12-27 17:44:05 +01:00
goenning d088a484db add import to example
Signed-off-by: goenning <me@goenning.net>
2021-12-27 12:10:12 +00:00
goenning e3b49153b7 add example of custom operator
Signed-off-by: goenning <me@goenning.net>
2021-12-27 12:08:42 +00:00
github-actions[bot] 3d68c45ef7 Version Packages 2021-12-23 12:23:34 +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 d0db4a56f1 update api reports
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
github-actions[bot] 29f2606ed9 Version Packages 2021-12-02 12:35:24 +00:00
jluk-box c6c8b8e53e Minor fixes in tech insights plugins readme
Signed-off-by: Jarek Łukow <jlukow@box.com>
2021-12-01 15:49:03 +01:00
github-actions[bot] ef34f5de7b Version Packages 2021-11-25 12:40:52 +00:00
Fredrik Adelöw e62bf29c1d Merge pull request #8069 from goenning/fix-techinsights-docs
Fix techinsights docs: replaced DefaultTechInsightsBuilder with buildTechInsightsContext
2021-11-22 14:41:26 +01:00
github-actions[bot] 99bf179ccf Version Packages 2021-11-18 11:52:08 +00:00
goenning 2dc6eb8fdd factRefs to factIds
Signed-off-by: goenning <me@goenning.net>
2021-11-17 18:53:05 +00:00
Guilherme Oenning d0c47ec505 fix incorrect class name on module-jsonfc
Signed-off-by: goenning <me@goenning.net>
2021-11-16 11:42:55 +00:00
Jussi Hallila 9c19d6ad01 Tweak formatting of snippets on README.md files.
Signed-off-by: Jussi Hallila <jussi@hallila.com>
2021-10-29 15:20:58 +02:00
Jussi Hallila 5ebfedd9c2 Add new api-report
Update persistence context to not be wrapped into a useless class. Modify the way test databases are created.

Signed-off-by: Jussi Hallila <jussi@hallila.com>
2021-10-29 15:20:58 +02:00
Jussi Hallila 29faa2ace2 Update cli version
Signed-off-by: Jussi Hallila <jussi@hallila.com>
2021-10-29 15:20:58 +02: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