hotfix: compatility libraries#12
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates runtime/CI compatibility (Python 3.12 + dependency pins) and adds UI “inference running” feedback for localization/classification smart inference flows, with accompanying GUI test coverage.
Changes:
- Bump documented/CI Python version to 3.12 and adjust dependency pins.
- Add modal busy/loading dialogs + UI control disabling during inference in Localization and Classification panels/controllers.
- Add/adjust GUI workflow tests for loading-cue behavior and dense description event creation timing.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
requirements.txt |
Pins/extends dependencies (including test deps) for installs/builds. |
README.md |
Updates suggested Conda Python version to 3.12. |
docs/installation.md |
Updates minimum Python requirement to 3.12+. |
.github/workflows/ci.yml |
Switches CI jobs to Python 3.12. |
.github/workflows/release.yml |
Switches release build jobs to Python 3.12. |
.github/workflows/deploy_docs.yml |
Switches docs deploy to Python 3.12. |
annotation_tool/ui/dialogs.py |
Introduces BusyStatusDialog (indeterminate progress UI). |
annotation_tool/ui/localization/__init__.py |
Adds inference-loading UI toggles and busy dialog in localization panel. |
annotation_tool/controllers/localization/localization_editor_controller.py |
Hooks localization smart inference to show/hide loading UI and prevent concurrent runs. |
annotation_tool/ui/classification/__init__.py |
Adds inference-loading UI toggles and busy dialog in classification panel (plus per-group disabling). |
annotation_tool/controllers/classification/inference_manager.py |
Ensures batch inference shows/hides inference-loading UI. |
tests/gui/test_workflow_localization.py |
Adds GUI test asserting localization loading cue disables/enables controls. |
tests/gui/test_workflow_classification.py |
Adds GUI test asserting classification loading cue disables/enables controls. |
tests/gui/test_workflow_dense_description.py |
Adjusts dense add-event test to derive timestamp from player position. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def set_inference_loading(self, is_loading: bool): | ||
| self.btn_smart_infer.setEnabled(not is_loading) | ||
| self.btn_smart_infer.setText("Loading..." if is_loading else "Smart Inference") | ||
| for _conf_btn, accept_btn, reject_btn in self._smart_controls_by_label.values(): | ||
| accept_btn.setEnabled(not is_loading) | ||
| reject_btn.setEnabled(not is_loading) | ||
|
|
||
|
|
There was a problem hiding this comment.
DynamicSingleLabelGroup defines set_inference_loading twice; the second definition overwrites the first, making the code harder to maintain and easy to accidentally diverge later. Remove the duplicate method definition so there is a single source of truth.
| def set_inference_loading(self, is_loading: bool): | |
| self.btn_smart_infer.setEnabled(not is_loading) | |
| self.btn_smart_infer.setText("Loading..." if is_loading else "Smart Inference") | |
| for _conf_btn, accept_btn, reject_btn in self._smart_controls_by_label.values(): | |
| accept_btn.setEnabled(not is_loading) | |
| reject_btn.setEnabled(not is_loading) |
| QLabel, | ||
| QLineEdit, | ||
| QMenu, | ||
| QProgressDialog, |
There was a problem hiding this comment.
QProgressDialog is imported but not used anywhere in this module. Please remove the unused import to avoid confusion and keep the dependency surface minimal.
| QProgressDialog, |
| class BusyStatusDialog(QDialog): | ||
| def __init__(self, title: str, message: str, parent=None) -> None: | ||
| super().__init__(parent) | ||
| self.setWindowTitle(title) | ||
| self.setModal(True) | ||
|
|
||
| layout = QVBoxLayout(self) | ||
|
|
||
| self._label = QLabel(message, self) | ||
| self._label.setWordWrap(True) | ||
| layout.addWidget(self._label) | ||
|
|
||
| self._progress = QProgressBar(self) | ||
| self._progress.setRange(0, 0) | ||
| self._progress.setTextVisible(False) | ||
| layout.addWidget(self._progress) | ||
|
|
||
| self.setMinimumWidth(320) | ||
|
|
There was a problem hiding this comment.
BusyStatusDialog can be dismissed via the window close button / Esc, which would hide the only user-visible feedback while inference is still running and controls remain disabled. Consider disabling the close affordances (e.g., remove the close button via window flags and ignore close/escape events) so the dialog cannot be dismissed while in a busy state.
No description provided.