Repository navigation
Move the background services out of Controller, and the import and export results into AnnotationIoController - #235
Merged
Merged
Conversation
…port results into AnnotationIoController IoServices owns the six background services (import, export, image folder loading, predictions, model names, connection check), their reusable progress dialogs and the failure handling. Controller only says what to do with the results. What happens after an import or export (when the annotations count as saved, which folder is remembered, the error report, the operation that waited for the export) moves into AnnotationIoController, covered by new unit tests. The view updates go through its Operations, in the same order as before.
Each step clicked Predict and waited until the service had succeeded. Until the click restarted it, the service still held the previous step's result, so the check could pass early and read the previous status message.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #235 +/- ##
============================================
+ Coverage 90.43% 90.47% +0.03%
- Complexity 2407 2408 +1
============================================
Files 141 142 +1
Lines 8983 9019 +36
Branches 862 862
============================================
+ Hits 8124 8160 +36
- Misses 445 446 +1
+ Partials 414 413 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
SonarCloud (S3398): the result handlers are only used by ServiceResultHandlers and restartEditHistory only by AnnotationIoOperations, so their code now lives there.
|
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.



Moves the background services out of
Controller, and the handling of import and export results intoAnnotationIoController. Behavior is unchanged.1.
IoServicesstartImport/startExportstart imports and exports.Controller: a smallResultHandlersimplementation that says what to do with each result. Its service getters stay, delegating, since the UI tests use them.2. Import and export results in
AnnotationIoControlleronExportFinishedandonImportFinisheddecide:Operationsmethods (showStatus,isRestoringAutosave,onAnnotationsImported), in the same order as before: model update, autosave restore notice, view, dialogs, remembered folder.AnnotationIoControllerTestcover a successful export, an export with errors, a successful import, an import without valid annotations, an import with invalid entries, and restoring an autosave (including the call order).Controllergoes from 1,519 to 1,461 lines.Separate commit:
TorchServeClientTestwaits for a new prediction resultLitServeClientTestruns one prediction per test and isn't affected.The full suite (352 tests) passes locally apart from that race, which the second commit fixes.