refactor: extract base classes to reduce SDK data integration duplication#1451
Draft
milosdjakovic-vicert wants to merge 15 commits intofeat/KOALA-3744-sdk-data-integrationfrom
Draft
Conversation
Co-authored-by: admir-vicert <admir.ihtijarevic@vicert.com> Co-authored-by: nikola-milev-vicert <nikola.milev@vicert.com>
Co-authored-by: imran-vicert <imran.agic@vicert.com>
Co-authored-by: irfan-vicert <irfan.cajo@vicert.com> Co-authored-by: admir-vicert <admir.ihtijarevic@vicert.com>
Co-authored-by: admir-vicert <admir.ihtijarevic@vicert.com>
Co-authored-by: imran-vicert <imran.agic@vicert.com>
Co-authored-by: nikola-milev-vicert <nikola.milev@vicert.com> Co-authored-by: admir-vicert <admir.ihtijarevic@vicert.com>
Create base class for document effects with shared confidence score validation and document ID validation logic. Simplify ReviewMode enum to use database codes directly.
Create base QuerySet for report templates with shared filtering methods. Simplify SpecialtyReportTemplate manager to use standard Django pattern.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
admir-vicert
approved these changes
Jan 26, 2026
8694ff1 to
b63e4f6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_BaseDocumentEffectbase class for shared validation logic across document effectsBaseReportTemplateQuerySetbase class for common filtering methods across template querysetsmodels.Manager.from_queryset()pattern forSpecialtyReportTemplateto match other template modelsReviewModeenum to eliminate mapping dictionaryChanges
Effects Layer:
_BaseDocumentEffectincanvas_sdk/effects/data_integration/base.pyvalidate_confidence_scores_keysand_validate_document_id_not_emptyto baseData Layer:
BaseReportTemplateQuerySetincanvas_sdk/v1/data/base.pyactive(),inactive(),search(),custom(),builtin()methodsSpecialtyReportTemplatemanager pattern withLabReportTemplateandImagingReportTemplate