From 107c615d62ef5068859575d63ded5e59a795da01 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 8 Dec 2023 16:05:27 +0100 Subject: [PATCH 01/19] refactor: Fix Qt flags (#1041) Instead of using global `Qt` or Widget namespaces for enum selection point, enum directly. ## Summary by CodeRabbit - **New Features** - Enhanced the About dialog to support parent window association for better modal behavior. - Advanced tabs, mask control, and advanced window classes now accept a parent argument for improved widget hierarchy management. - Profile selection and color map creation processes have been refined with updated initialization parameters. - Custom load and save dialog conditions and method calls have been updated for consistency with the latest dialog standards. - **Bug Fixes** - Corrected the context menu policy settings for various GUI components to align with updated Qt enumerations. - Adjusted file dialog acceptance checks to use the revised dialog code enumeration. - Resolved issues with incorrect enum usage in searchable combo boxes and list widgets, ensuring proper item filtering and selection behavior. - **Documentation** - Updated comments and docstrings across multiple modules for better clarity and understanding of the codebase. - **Refactor** - Standardized the use of enum values across the application, replacing direct value usage with fully qualified enum names for better code maintainability and readability. - **Style** - Minor stylistic changes in comments and method calls to adhere to the updated coding standards and conventions. Please note that these changes are aimed at improving the user experience and ensuring compatibility with the latest standards and practices in application development. --- package/PartSeg/common_gui/about_dialog.py | 8 +++---- package/PartSeg/common_gui/advanced_tabs.py | 24 +++++++++---------- .../common_gui/algorithms_description.py | 8 +++---- .../PartSeg/common_gui/collapse_checkbox.py | 6 ++--- .../PartSeg/common_gui/colormap_creator.py | 6 ++--- .../PartSeg/common_gui/custom_load_dialog.py | 2 +- .../PartSeg/common_gui/custom_save_dialog.py | 10 ++++---- package/PartSeg/common_gui/error_report.py | 6 ++--- package/PartSeg/common_gui/flow_layout.py | 4 ++-- .../PartSeg/common_gui/image_adjustment.py | 2 +- .../common_gui/multiple_file_widget.py | 16 ++++++------- .../PartSeg/common_gui/napari_image_view.py | 2 +- package/PartSeg/common_gui/numpy_qimage.py | 2 +- package/PartSeg/common_gui/qt_modal.py | 10 ++++---- .../common_gui/searchable_combo_box.py | 8 +++---- .../common_gui/searchable_list_widget.py | 2 +- .../common_gui/select_multiple_files.py | 8 +++---- .../common_gui/show_directory_dialog.py | 2 +- .../PartSeg/common_gui/universal_gui_part.py | 13 +++++----- .../test_PartSeg/test_colormap_create.py | 5 +++- 20 files changed, 74 insertions(+), 70 deletions(-) diff --git a/package/PartSeg/common_gui/about_dialog.py b/package/PartSeg/common_gui/about_dialog.py index 25d503847..8c996b1c6 100644 --- a/package/PartSeg/common_gui/about_dialog.py +++ b/package/PartSeg/common_gui/about_dialog.py @@ -10,8 +10,8 @@ class AboutDialog(QDialog): - def __init__(self): - super().__init__() + def __init__(self, parent=None): + super().__init__(parent=parent) self.setWindowTitle("About PartSeg") text = ( f"PartSeg ({PartSeg.__version__})
" @@ -46,8 +46,8 @@ def __init__(self): self.cite_as.setMarkdown(cite_as_text) ok_but = QPushButton("Ok") ok_but.clicked.connect(self.accept) - text_label.setTextInteractionFlags(Qt.TextSelectableByMouse) - layout = QGridLayout() + text_label.setTextInteractionFlags(Qt.TextInteractionFlag.TextSelectableByMouse) + layout = QGridLayout(self) layout.addWidget(text_label, 0, 0, 1, 3) layout.addWidget(self.change_log, 1, 0, 1, 3) layout.addWidget(QLabel("Cite as:"), 2, 0, 1, 3) diff --git a/package/PartSeg/common_gui/advanced_tabs.py b/package/PartSeg/common_gui/advanced_tabs.py index f7716d082..d7c0f6709 100644 --- a/package/PartSeg/common_gui/advanced_tabs.py +++ b/package/PartSeg/common_gui/advanced_tabs.py @@ -1,6 +1,6 @@ """ -This module contains base for advanced window for PartSeg. -In this moment controlling colormaps tabs and developer PartSegCore +This module contains base for the advanced window for PartSeg. +At this moment controlling colormaps tabs and developer PartSegCore """ import importlib import sys @@ -41,22 +41,22 @@ class DevelopTab(QWidget): """ Widget for developer utilities. Currently only contains button for reload algorithms and - To enable it run program with `--develop` flag. + To enable it run program with a `--develop` flag. - If you would like to use it for developing your own algorithm and modify same of ParsSeg class - please protect this part of code with something like: + If you would like to use it for developing your own algorithm and modify some of the PartSeg class. + Please protect this part of code with something like: >>> if tifffile.tifffile.TiffPage.__module__ != "PartSegImage.image_reader": This is taken from :py:mod:`PartSegImage.image_reader` """ - def __init__(self): - super().__init__() + def __init__(self, parent=None): + super().__init__(parent=parent) # noinspection PyArgumentList self.reload_btn = QPushButton("Reload algorithms", clicked=self.reload_algorithm_action) - layout = QGridLayout() + layout = QGridLayout(self) layout.addWidget(self.reload_btn, 0, 0) layout.setColumnStretch(1, 1) layout.setRowStretch(1, 1) @@ -83,15 +83,15 @@ def reload_algorithm_action(self): class MaskControl(QWidget): - def __init__(self, settings: ViewSettings): - super().__init__() + def __init__(self, settings: ViewSettings, parent=None): + super().__init__(parent=parent) self.settings = settings self.color_picker = QColorDialog() self.color_picker.setWindowFlag(Qt.WindowType.Widget) self.color_picker.setOptions( QColorDialog.ColorDialogOption.DontUseNativeDialog | QColorDialog.ColorDialogOption.NoButtons ) - self.opacity_spin = QDoubleSpinBox() + self.opacity_spin = QDoubleSpinBox(self) self.opacity_spin.setRange(0, 1) self.opacity_spin.setSingleStep(0.1) self.opacity_spin.setDecimals(2) @@ -233,7 +233,7 @@ class AdvancedWindow(QTabWidget): :param image_view_names: passed as second argument to :py:class:`~.PColormapList` """ - def __init__(self, settings: ViewSettings, image_view_names: List[str], reload_list=None, parent=None): + def __init__(self, settings: BaseSettings, image_view_names: List[str], reload_list=None, parent=None): super().__init__(parent) self.color_control = ColorControl(settings, image_view_names) self.settings = settings diff --git a/package/PartSeg/common_gui/algorithms_description.py b/package/PartSeg/common_gui/algorithms_description.py index ca9b5139f..6494678f7 100644 --- a/package/PartSeg/common_gui/algorithms_description.py +++ b/package/PartSeg/common_gui/algorithms_description.py @@ -72,8 +72,8 @@ def _pretty_print(data, indent=2) -> str: class ProfileSelect(QComboBox): - def __init__(self): - super().__init__() + def __init__(self, parent=None): + super().__init__(parent=parent) self._settings = None def _update_choices(self): @@ -189,7 +189,7 @@ def _get_numeric_field(ap: AlgorithmProperty): @classmethod def _get_field_from_value_type(cls, ap: AlgorithmProperty): if issubclass(ap.value_type, Channel): - res = ChannelComboBox() + res = ChannelComboBox(parent=None) res.change_channels_num(10) elif issubclass(ap.value_type, AlgorithmDescribeBase): res = SubAlgorithmWidget(ap) @@ -205,7 +205,7 @@ def _get_field_from_value_type(cls, ap: AlgorithmProperty): elif issubclass(ap.value_type, ROIExtractionProfile): res = ProfileSelect() elif issubclass(ap.value_type, list): - res = QComboBox() + res = QComboBox(parent=None) res.addItems(list(map(str, ap.possible_values))) elif issubclass(ap.value_type, BaseModel): res = FieldsList([cls.from_algorithm_property(x) for x in base_model_to_algorithm_property(ap.value_type)]) diff --git a/package/PartSeg/common_gui/collapse_checkbox.py b/package/PartSeg/common_gui/collapse_checkbox.py index a04597fb7..70c6d9a0c 100644 --- a/package/PartSeg/common_gui/collapse_checkbox.py +++ b/package/PartSeg/common_gui/collapse_checkbox.py @@ -13,8 +13,8 @@ class CollapseCheckbox(QCheckBox): Check box for hide widgets. It is painted as: ▶, {info_text}, line - If triangle is ▶ then widgets are hidden - If triangle is ▼ then widgets are shown + If triangle is ▶ then widgets are hidden. + If triangle is ▼ then widgets are shown. :param info_text: optional text to be show """ @@ -25,7 +25,7 @@ def __init__(self, info_text: str = "", parent: typing.Optional[QWidget] = None) self.stateChanged.connect(self.hide_element) metrics = QFontMetrics(QFont()) - self.text_size = metrics.size(Qt.TextSingleLine, info_text) + self.text_size = metrics.size(Qt.TextFlag.TextSingleLine, info_text) self.info_text = info_text def add_hide_element(self, val: QWidget): diff --git a/package/PartSeg/common_gui/colormap_creator.py b/package/PartSeg/common_gui/colormap_creator.py index 2362a8686..3c8b406fd 100644 --- a/package/PartSeg/common_gui/colormap_creator.py +++ b/package/PartSeg/common_gui/colormap_creator.py @@ -88,9 +88,9 @@ def paintEvent(self, a0: QPaintEvent) -> None: for pos_factor in self.position_list: pos = width * pos_factor point = QPointF(pos + margin, self.height() / 2) - painter.setBrush(QBrush(Qt.black)) + painter.setBrush(QBrush(Qt.GlobalColor.black)) painter.drawEllipse(point, 5, 5) - painter.setBrush(QBrush(Qt.white)) + painter.setBrush(QBrush(Qt.GlobalColor.white)) painter.drawEllipse(point, 3, 3) painter.restore() @@ -495,7 +495,7 @@ def __init__( self.colormap_map = colormap_map self._widget_dict: Dict[str, ChannelPreview] = {} self.scroll_area = QScrollArea() - self.central_widget = QWidget() + self.central_widget = QWidget(self) layout2 = QVBoxLayout() self.grid_layout = QGridLayout() layout2.addLayout(self.grid_layout) diff --git a/package/PartSeg/common_gui/custom_load_dialog.py b/package/PartSeg/common_gui/custom_load_dialog.py index 534592f41..c20dbd1f7 100644 --- a/package/PartSeg/common_gui/custom_load_dialog.py +++ b/package/PartSeg/common_gui/custom_load_dialog.py @@ -149,7 +149,7 @@ def __init__( def accept(self): super().accept() - if self.result() != QFileDialog.Accepted: + if self.result() != QFileDialog.DialogCode.Accepted: return directory = dirname(self.selectedFiles()[0]) self.settings.add_path_history(directory) diff --git a/package/PartSeg/common_gui/custom_save_dialog.py b/package/PartSeg/common_gui/custom_save_dialog.py index 01552ed0b..7164a54af 100644 --- a/package/PartSeg/common_gui/custom_save_dialog.py +++ b/package/PartSeg/common_gui/custom_save_dialog.py @@ -59,12 +59,12 @@ def __init__( parent=None, caption="Save file", history: typing.Optional[typing.List[str]] = None, - file_mode=QFileDialog.AnyFile, + file_mode=QFileDialog.FileMode.AnyFile, ): super().__init__(save_register, caption, parent) self.setFileMode(file_mode) - self.setOption(QFileDialog.DontUseNativeDialog, not system_widget) - self.setAcceptMode(QFileDialog.AcceptSave) + self.setOption(QFileDialog.Option.DontUseNativeDialog, not system_widget) + self.setAcceptMode(QFileDialog.AcceptMode.AcceptSave) self.filterSelected.connect(self.change_filter) self.accepted_native = False self.values = {} @@ -161,7 +161,7 @@ def __init__( base_values: typing.Optional[dict] = None, parent=None, caption="Save file", - file_mode=QFileDialog.AnyFile, + file_mode=QFileDialog.FileMode.AnyFile, ): if default_directory is None: default_directory = str(Path.home()) @@ -183,7 +183,7 @@ def __init__( def accept(self): super().accept() - if self.result() != QDialog.Accepted: + if self.result() != QDialog.DialogCode.Accepted: return directory = os.path.dirname(self.selectedFiles()[0]) self.settings.add_path_history(directory) diff --git a/package/PartSeg/common_gui/error_report.py b/package/PartSeg/common_gui/error_report.py index 345210d93..d56c7420e 100644 --- a/package/PartSeg/common_gui/error_report.py +++ b/package/PartSeg/common_gui/error_report.py @@ -259,9 +259,9 @@ def __init__( else: exception, traceback_summary = exception if isinstance(exception, SegmentationLimitException): - super().__init__(f"{exception}", parent, QListWidgetItem.UserType) + super().__init__(f"{exception}", parent, QListWidgetItem.ItemType.UserType) elif isinstance(exception, Exception): - super().__init__(f"{type(exception)}: {exception}", parent, QListWidgetItem.UserType) + super().__init__(f"{type(exception)}: {exception}", parent, QListWidgetItem.ItemType.UserType) self.setToolTip("Double click for report") self.exception = exception self.additional_info = traceback_summary @@ -357,7 +357,7 @@ class QMessageFromException(QMessageBox): """ - def __init__(self, icon, title, text, exception, standard_buttons=QMessageBox.Ok, parent=None): + def __init__(self, icon, title, text, exception, standard_buttons=QMessageBox.StandardButton.Ok, parent=None): super().__init__(icon, title, text, standard_buttons, parent) self.exception = exception stream = io.StringIO() diff --git a/package/PartSeg/common_gui/flow_layout.py b/package/PartSeg/common_gui/flow_layout.py index c01bf756f..41c2d3aae 100644 --- a/package/PartSeg/common_gui/flow_layout.py +++ b/package/PartSeg/common_gui/flow_layout.py @@ -131,10 +131,10 @@ def doLayout(self, rect, testOnly): wid = item.widget() if wid is not None: space_x = self.spacing() + wid.style().layoutSpacing( - QSizePolicy.PushButton, QSizePolicy.PushButton, Qt.Horizontal + QSizePolicy.ControlType.PushButton, QSizePolicy.ControlType.PushButton, Qt.Orientation.Horizontal ) space_y = self.spacing() + wid.style().layoutSpacing( - QSizePolicy.PushButton, QSizePolicy.PushButton, Qt.Vertical + QSizePolicy.ControlType.PushButton, QSizePolicy.ControlType.PushButton, Qt.Orientation.Vertical ) else: space_x = self.spacing() # + wid.layoutSpacing(QSizePolicy.PushButton, QSizePolicy.PushButton, diff --git a/package/PartSeg/common_gui/image_adjustment.py b/package/PartSeg/common_gui/image_adjustment.py index 442da9423..d543fab27 100644 --- a/package/PartSeg/common_gui/image_adjustment.py +++ b/package/PartSeg/common_gui/image_adjustment.py @@ -22,7 +22,7 @@ def __init__(self, image: Image, transform_dict: Optional[Dict[str, TransformBas for key, val in transform_dict.items(): self.choose.addItem(key) initial_values = val.calculate_initial(image) - form_widget = FormWidget(val.get_fields_per_dimension(image.get_dimension_letters()), initial_values) + form_widget = FormWidget(val.get_fields_per_dimension(list(image.get_dimension_letters())), initial_values) self.stacked.addWidget(form_widget) self.choose.currentIndexChanged.connect(self.stacked.setCurrentIndex) diff --git a/package/PartSeg/common_gui/multiple_file_widget.py b/package/PartSeg/common_gui/multiple_file_widget.py index 658bce3d6..ec956cc09 100644 --- a/package/PartSeg/common_gui/multiple_file_widget.py +++ b/package/PartSeg/common_gui/multiple_file_widget.py @@ -42,7 +42,7 @@ class MultipleFilesTreeWidget(QTreeWidget): def __init__(self, compare, parent=None): super().__init__(parent) self.compare = compare - self.setContextMenuPolicy(Qt.CustomContextMenu) + self.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) self.customContextMenuRequested.connect(self.showContextMenu) def showContextMenu(self, point): @@ -67,7 +67,7 @@ def set_show_compare(self, compare: bool): self.compare = compare def mouseMoveEvent(self, event): # pylint: disable=no-self-use - QApplication.setOverrideCursor(Qt.ArrowCursor) + QApplication.setOverrideCursor(Qt.CursorShape.ArrowCursor) super().mouseMoveEvent(event) @@ -76,14 +76,14 @@ def __init__(self, settings: BaseSettings, parent=None): super().__init__(parent) self.settings = settings self.file_list = QListWidget() - self.file_list.setSelectionMode(QAbstractItemView.ExtendedSelection) + self.file_list.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection) self.cancel_btn = QPushButton("Cancel", clicked=self.reject) self.load_btn = QPushButton("Load", clicked=self.accept) for name_list, method in settings.get_last_files_multiple(): entry = f"{name_list[0]} {method}" item = QListWidgetItem(entry, self.file_list) - item.setData(Qt.UserRole, (name_list, method)) + item.setData(Qt.ItemDataRole.UserRole, (name_list, method)) last_set = {(tuple(x), y) for x, y in settings.get_last_files_multiple()} for name_list, method in settings.get_last_files(): @@ -91,7 +91,7 @@ def __init__(self, settings: BaseSettings, parent=None): continue entry = f"{name_list[0]} {method}" item = QListWidgetItem(entry, self.file_list) - item.setData(Qt.UserRole, (name_list, method)) + item.setData(Qt.ItemDataRole.UserRole, (name_list, method)) layout = QGridLayout() layout.addWidget(QLabel("Select files")) @@ -105,7 +105,7 @@ def __init__(self, settings: BaseSettings, parent=None): ) def get_files(self) -> List[Tuple[List[str], str]]: - return [item.data(Qt.UserRole) for item in self.file_list.selectedItems()] + return [item.data(Qt.ItemDataRole.UserRole) for item in self.file_list.selectedItems()] def accept(self) -> None: self.settings.set_in_profile("multiple_files_dialog_size", (self.size().width(), self.size().height())) @@ -281,7 +281,7 @@ def save_state_action(self, state: ProjectInfoBase, custom_name): except ValueError: metric = QFontMetrics(self.file_view.font()) width = self.file_view.width() - 45 - clipped_text = metric.elidedText(normed_file_path, Qt.ElideLeft, width) + clipped_text = metric.elidedText(normed_file_path, Qt.TextElideMode.ElideLeft, width) item = QTreeWidgetItem(self.file_view, [clipped_text]) item.setToolTip(0, normed_file_path) self.file_list.append(normed_file_path) @@ -382,7 +382,7 @@ class MultipleLoadDialog(CustomLoadDialog): def __init__(self, load_register, history=None): load_register = {key: val for key, val in load_register.items() if not val.partial()} super().__init__(load_register=load_register, history=history) - self.setFileMode(QFileDialog.ExistingFiles) + self.setFileMode(QFileDialog.FileMode.ExistingFiles) def accept(self): self.files_list.extend(self.selectedFiles()) diff --git a/package/PartSeg/common_gui/napari_image_view.py b/package/PartSeg/common_gui/napari_image_view.py index 68b854745..cb02eb08a 100644 --- a/package/PartSeg/common_gui/napari_image_view.py +++ b/package/PartSeg/common_gui/napari_image_view.py @@ -171,7 +171,7 @@ def __init__( self.search_roi_btn.clicked.connect(self._search_component) self.search_roi_btn.setDisabled(True) self.roll_dim_button = QtViewerPushButton(self.viewer, "roll", "Roll dimension", self._rotate_dim) - self.roll_dim_button.setContextMenuPolicy(Qt.CustomContextMenu) + self.roll_dim_button.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) self.roll_dim_button.customContextMenuRequested.connect(self._dim_order_menu) self.mask_chk = QCheckBox() self.mask_chk.setVisible(False) diff --git a/package/PartSeg/common_gui/numpy_qimage.py b/package/PartSeg/common_gui/numpy_qimage.py index 0b3a476bd..dedfe21e8 100644 --- a/package/PartSeg/common_gui/numpy_qimage.py +++ b/package/PartSeg/common_gui/numpy_qimage.py @@ -19,7 +19,7 @@ def __init__(self, image: np.ndarray): image.shape[1], image.shape[0], image.dtype.itemsize * image.shape[1] * image.shape[2], - QImage.Format_RGBA8888, + QImage.Format.Format_RGBA8888, ) self.image = image diff --git a/package/PartSeg/common_gui/qt_modal.py b/package/PartSeg/common_gui/qt_modal.py index e259ad1e2..0ab34b1a0 100644 --- a/package/PartSeg/common_gui/qt_modal.py +++ b/package/PartSeg/common_gui/qt_modal.py @@ -1,6 +1,6 @@ """from napari._qt.dialog.modal """ from qtpy.QtCore import QPoint, QRect, Qt -from qtpy.QtGui import QCursor, QGuiApplication +from qtpy.QtGui import QCursor, QGuiApplication, QKeyEvent from qtpy.QtWidgets import QDialog, QFrame, QVBoxLayout @@ -37,7 +37,7 @@ def __init__(self, parent): super().__init__(parent) self.setObjectName("QtModalPopup") self.setModal(False) # if False, then clicking anywhere else closes it - self.setWindowFlags(Qt.Popup | Qt.FramelessWindowHint) + self.setWindowFlags(Qt.WindowType.Popup | Qt.WindowType.FramelessWindowHint) self.setLayout(QVBoxLayout()) self.frame = QFrame() @@ -121,15 +121,15 @@ def move_to(self, position="top", *, win_ratio=0.9, min_length=0): top = max(min(screen_geometry.bottom() - height, top), screen_geometry.top()) self.setGeometry(left, top, width, height) - def keyPressEvent(self, event): + def keyPressEvent(self, event: QKeyEvent): """Close window on return, else pass event through to super class. Parameters ---------- - event : qtpy.QtCore.QEvent + event : qtpy.QtGui.QKeyEvent Event from the Qt context. """ - if event.key() in (Qt.Key_Return, Qt.Key_Enter): + if event.key() in (Qt.Key.Key_Return, Qt.Key.Key_Enter): self.close() return super().keyPressEvent(event) diff --git a/package/PartSeg/common_gui/searchable_combo_box.py b/package/PartSeg/common_gui/searchable_combo_box.py index 517a13a46..68f32d4d6 100644 --- a/package/PartSeg/common_gui/searchable_combo_box.py +++ b/package/PartSeg/common_gui/searchable_combo_box.py @@ -16,11 +16,11 @@ def __init__(self, parent=None): super().__init__(parent) self.setEditable(True) self.completer_object = QCompleter() - self.completer_object.setCaseSensitivity(Qt.CaseInsensitive) - self.completer_object.setCompletionMode(QCompleter.PopupCompletion) - self.completer_object.setFilterMode(Qt.MatchContains) + self.completer_object.setCaseSensitivity(Qt.CaseSensitivity.CaseInsensitive) + self.completer_object.setCompletionMode(QCompleter.CompletionMode.PopupCompletion) + self.completer_object.setFilterMode(Qt.MatchFlag.MatchContains) self.setCompleter(self.completer_object) - self.setInsertPolicy(QComboBox.NoInsert) + self.setInsertPolicy(QComboBox.InsertPolicy.NoInsert) if parse(QT_VERSION) < parse("5.14.0"): # pragma: no cover self.currentIndexChanged.connect(self._text_activated) diff --git a/package/PartSeg/common_gui/searchable_list_widget.py b/package/PartSeg/common_gui/searchable_list_widget.py index 8fa7785c9..3b1f0dd11 100644 --- a/package/PartSeg/common_gui/searchable_list_widget.py +++ b/package/PartSeg/common_gui/searchable_list_widget.py @@ -22,7 +22,7 @@ def __getattr__(self, item): return super().__getattr__(item) def update_visible(self, text): - items_text = [x.text() for x in self.list_widget.findItems(text, Qt.MatchContains)] + items_text = [x.text() for x in self.list_widget.findItems(text, Qt.MatchFlag.MatchContains)] for index in range(self.list_widget.count()): item = self.item(index) item.setHidden(item.text() not in items_text) diff --git a/package/PartSeg/common_gui/select_multiple_files.py b/package/PartSeg/common_gui/select_multiple_files.py index 37dc118ff..751a00417 100644 --- a/package/PartSeg/common_gui/select_multiple_files.py +++ b/package/PartSeg/common_gui/select_multiple_files.py @@ -38,7 +38,7 @@ def __init__(self, files): discard = QPushButton("Discard", self) discard.clicked.connect(self.close) self.files = QListWidget(self) - self.files.setSelectionMode(QAbstractItemView.ExtendedSelection) + self.files.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection) for file_name in files: self.files.addItem(file_name) for i in range(self.files.count()): @@ -78,7 +78,7 @@ def __init__(self, file_path): class FileListWidget(QListWidget): def __init__(self, parent=None): super().__init__(parent) - self.setContextMenuPolicy(Qt.CustomContextMenu) + self.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) class AddFiles(QWidget): @@ -195,7 +195,7 @@ def find_all(self): self.update_files_list(paths) else: - QMessageBox.warning(self, "No new files", "No new files found", QMessageBox.Ok) + QMessageBox.warning(self, "No new files", "No new files found", QMessageBox.StandardButton.Ok) def update_files_list(self, paths): dialog = AcceptFiles(paths) @@ -209,7 +209,7 @@ def update_files_list(self, paths): def select_files(self): dial = QFileDialog(self, "Select files") dial.setDirectory(self.settings.get(IO_BATCH_DIRECTORY, self.settings.get(OPEN_DIRECTORY, str(Path.home())))) - dial.setFileMode(QFileDialog.ExistingFiles) + dial.setFileMode(QFileDialog.FileMode.ExistingFiles) if dial.exec_(): self.settings.set(IO_BATCH_DIRECTORY, os.path.dirname(str(dial.selectedFiles()[0]))) new_paths = sorted(set(map(str, dial.selectedFiles())) - self.files_to_proceed) diff --git a/package/PartSeg/common_gui/show_directory_dialog.py b/package/PartSeg/common_gui/show_directory_dialog.py index eab940373..3f4dab43d 100644 --- a/package/PartSeg/common_gui/show_directory_dialog.py +++ b/package/PartSeg/common_gui/show_directory_dialog.py @@ -13,7 +13,7 @@ def __init__(self, path_to_directory, additional_text=""): self.path_to_directory = path_to_directory text_label = QLabel(path_to_directory) text_label.setWordWrap(True) - text_label.setTextInteractionFlags(Qt.TextSelectableByMouse) + text_label.setTextInteractionFlags(Qt.TextInteractionFlag.TextSelectableByMouse) open_btn = QPushButton("Open directory") open_btn.clicked.connect(self.open_folder) close_btn = QPushButton("Close") diff --git a/package/PartSeg/common_gui/universal_gui_part.py b/package/PartSeg/common_gui/universal_gui_part.py index 974f9d6a6..3c012db23 100644 --- a/package/PartSeg/common_gui/universal_gui_part.py +++ b/package/PartSeg/common_gui/universal_gui_part.py @@ -141,12 +141,13 @@ def __init__( lab = QLabel(f"{name}:") layout.addWidget(lab) val = QDoubleSpinBox() - val.setButtonSymbols(QAbstractSpinBox.NoButtons) + val.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) val.setRange(*data_range) val.setValue(value * UNIT_SCALE[unit.value]) - val.setAlignment(Qt.AlignRight) + val.setAlignment(Qt.AlignmentFlag.AlignRight) font = val.font() fm = QFontMetrics(font) + # TODO check width attribute val_len = max(fm.width(str(data_range[0])), fm.width(str(data_range[1]))) + fm.width(" " * 8) val.setFixedWidth(val_len) layout.addWidget(val) @@ -171,7 +172,7 @@ def get_unit_str(self): def right_label(text): label = QLabel(text) - label.setAlignment(Qt.AlignVCenter | Qt.AlignRight) + label.setAlignment(Qt.AlignmentFlag.AlignVCenter | Qt.AlignmentFlag.AlignRight) return label @@ -189,7 +190,7 @@ class CustomSpinBox(QSpinBox): def __init__(self, *args, bounds=None, **kwargs): super().__init__(*args, **kwargs) - self.setStepType(QAbstractSpinBox.AdaptiveDecimalStepType) + self.setStepType(QAbstractSpinBox.StepType.AdaptiveDecimalStepType) if bounds is not None: warnings.warn("bounds parameter is deprecated", FutureWarning, stacklevel=2) # pragma: no cover @@ -208,7 +209,7 @@ class CustomDoubleSpinBox(QDoubleSpinBox): def __init__(self, *args, bounds=None, **kwargs): super().__init__(*args, **kwargs) - self.setStepType(QAbstractSpinBox.AdaptiveDecimalStepType) + self.setStepType(QAbstractSpinBox.StepType.AdaptiveDecimalStepType) if bounds is not None: warnings.warn("bounds parameter is deprecated", FutureWarning, stacklevel=2) # pragma: no cover @@ -351,7 +352,7 @@ def __init__(self, lines=5, text="", parent=None): self.lines = lines self.setReadOnly(True) p: QPalette = self.palette() - p.setColor(QPalette.Base, p.color(self.backgroundRole())) + p.setColor(QPalette.ColorRole.Base, p.color(self.backgroundRole())) self.setPalette(p) def height(self): diff --git a/package/tests/test_PartSeg/test_colormap_create.py b/package/tests/test_PartSeg/test_colormap_create.py index 5221ed223..0f373444c 100644 --- a/package/tests/test_PartSeg/test_colormap_create.py +++ b/package/tests/test_PartSeg/test_colormap_create.py @@ -33,8 +33,9 @@ def test_color_conversion(): class TestColormapEdit: - def test_click(self, qtbot: QtBot): + def test_click(self, qtbot: QtBot, qapp): widget = ColormapEdit() + widget.show() qtbot.addWidget(widget) width = widget.width() - 20 with qtbot.waitSignal(widget.double_clicked): @@ -47,6 +48,8 @@ def test_click(self, qtbot: QtBot): with qtbot.assertNotEmitted(widget.double_clicked): qtbot.mouseDClick(widget, Qt.LeftButton, pos=QPoint(30, widget.height() // 2)) assert len(widget.colormap.colors) == 3 + qapp.processEvents() + widget.hide() def test_distribute_evenly(self, qtbot: QtBot): widget = ColormapEdit() From 79b1564a5957540cf3f6800ee1e28d0945253100 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 8 Dec 2023 21:37:36 +0100 Subject: [PATCH 02/19] refactor: Fix qt flags in roi mask code (#1042) ## Summary by CodeRabbit - **Refactor** - Updated event and modifier constants to align with the latest standards in the user interface library. - **Bug Fixes** - Ensured consistent behavior of keyboard and window event handling across the application. --- package/PartSeg/_roi_mask/main_window.py | 40 +++++++++++-------- .../_roi_mask/segmentation_info_dialog.py | 2 +- .../PartSeg/_roi_mask/simple_measurements.py | 6 +-- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/package/PartSeg/_roi_mask/main_window.py b/package/PartSeg/_roi_mask/main_window.py index 13977d4dd..870c30de1 100644 --- a/package/PartSeg/_roi_mask/main_window.py +++ b/package/PartSeg/_roi_mask/main_window.py @@ -211,11 +211,11 @@ def set_image(self, image: Image) -> bool: self, "Not supported", "Time data are currently not supported. Maybe You would like to treat time as z-stack", - QMessageBox.Yes | QMessageBox.No, - QMessageBox.No, + QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No, + QMessageBox.StandardButton.No, ) - if res == QMessageBox.Yes: + if res == QMessageBox.StandardButton.Yes: image = image.swap_time_and_stack() else: return False @@ -314,7 +314,9 @@ def save_segmentation(self): save_location, _selected_filter, save_class, values = dial.get_result() def exception_hook(exception): - QMessageBox.critical(self, "Save error", f"Error on disc operation. Text: {exception}", QMessageBox.Ok) + QMessageBox.critical( + self, "Save error", f"Error on disc operation. Text: {exception}", QMessageBox.StandardButton.Ok + ) raise exception dial = ExecuteFunctionDialog( @@ -326,8 +328,12 @@ def exception_hook(exception): dial.exec_() def save_result(self): - if self.settings.image_path is not None and QMessageBox.Yes == QMessageBox.question( - self, "Copy", "Copy name to clipboard?", QMessageBox.Yes | QMessageBox.No, QMessageBox.Yes + if self.settings.image_path is not None and QMessageBox.StandardButton.Yes == QMessageBox.question( + self, + "Copy", + "Copy name to clipboard?", + QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No, + QMessageBox.StandardButton.Yes, ): clipboard = QGuiApplication.clipboard() clipboard.setText(os.path.splitext(os.path.basename(self.settings.image_path))[0]) @@ -354,17 +360,19 @@ def save_result(self): if conflict: # TODO modify because of long lists conflict_str = "\n".join(conflict) - if QMessageBox.No == QMessageBox.warning( + if QMessageBox.StandardButton.No == QMessageBox.warning( self, "Overwrite", f"Overwrite files:\n {conflict_str}", - QMessageBox.Yes | QMessageBox.No, - QMessageBox.No, + QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No, + QMessageBox.StandardButton.No, ): self.save_result() def exception_hook(exception): - QMessageBox.critical(self, "Save error", f"Error on disc operation. Text: {exception}", QMessageBox.Ok) + QMessageBox.critical( + self, "Save error", f"Error on disc operation. Text: {exception}", QMessageBox.StandardButton.Ok + ) dial = ExecuteFunctionDialog( res.save_class.save, @@ -392,7 +400,7 @@ def leaveEvent(self, _event): class ChosenComponents(QWidget): """ - :type check_box: dict[int, QCheckBox] + :type check_box: dict[int, ComponentCheckBox] """ check_change_signal = Signal() @@ -769,7 +777,7 @@ def __init__(self, settings: StackSettings, parent=None): super().__init__(parent) self._settings = settings self.path = QTextEdit("Path: example image") - self.path.setWordWrapMode(QTextOption.WrapAnywhere) + self.path.setWordWrapMode(QTextOption.WrapMode.WrapAnywhere) self.path.setReadOnly(True) self.setMinimumHeight(20) self.spacing = [QDoubleSpinBox() for _ in range(3)] @@ -785,8 +793,8 @@ def __init__(self, settings: StackSettings, parent=None): self.sync_dirs.stateChanged.connect(self.set_sync_dirs) units_value = self._settings.get("units_value", Units.nm) for el in self.spacing: - el.setAlignment(Qt.AlignRight) - el.setButtonSymbols(QAbstractSpinBox.NoButtons) + el.setAlignment(Qt.AlignmentFlag.AlignRight) + el.setButtonSymbols(QAbstractSpinBox.ButtonSymbols.NoButtons) el.setRange(0, 100000) # noinspection PyUnresolvedReferences el.valueChanged.connect(self.image_spacing_change) @@ -898,7 +906,7 @@ def __init__( # noqa: PLR0915 self.image_view = StackImageView(self.settings, self.channel_control, name="channelcontrol") self.image_view.setMinimumWidth(450) self.info_text = QLabel() - self.info_text.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Preferred) + self.info_text.setSizePolicy(QSizePolicy.Policy.Ignored, QSizePolicy.Policy.Preferred) self.image_view.text_info_change.connect(self.info_text.setText) self.options_panel = Options(self.settings, self.image_view) self.main_menu = MainMenu(self.settings, self) @@ -930,7 +938,7 @@ def __init__( # noqa: PLR0915 view_menu.addAction("Toggle scale bar").triggered.connect(self._toggle_scale_bar) action = view_menu.addAction("Screenshot") action.triggered.connect(self.screenshot(self.image_view)) - action.setShortcut(QKeySequence.Print) + action.setShortcut(QKeySequence.StandardKey.Print) image_menu = menu_bar.addMenu("Image operations") image_menu.addAction("Image adjustment").triggered.connect(self.image_adjust_exec) help_menu = menu_bar.addMenu("Help") diff --git a/package/PartSeg/_roi_mask/segmentation_info_dialog.py b/package/PartSeg/_roi_mask/segmentation_info_dialog.py index abac19ac2..fb708953a 100644 --- a/package/PartSeg/_roi_mask/segmentation_info_dialog.py +++ b/package/PartSeg/_roi_mask/segmentation_info_dialog.py @@ -74,7 +74,7 @@ def set_parameter_action(self): self.set_parameters(parameters.algorithm, parameters.values) def event(self, event: QEvent): - if event.type() == QEvent.WindowActivate: + if event.type() == QEvent.Type.WindowActivate: index = self.components.currentRow() self.components.clear() self.components.addItems(list(map(str, self.get_parameters.keys()))) diff --git a/package/PartSeg/_roi_mask/simple_measurements.py b/package/PartSeg/_roi_mask/simple_measurements.py index 4094e345f..00517c822 100644 --- a/package/PartSeg/_roi_mask/simple_measurements.py +++ b/package/PartSeg/_roi_mask/simple_measurements.py @@ -141,11 +141,11 @@ def refresh_measurements(self): self.measurement_layout.addWidget(chk) def keyPressEvent(self, e: QKeyEvent): - if not e.modifiers() & Qt.ControlModifier: + if not e.modifiers() & Qt.KeyboardModifier.ControlModifier: return selected = self.result_view.selectedRanges() - if e.key() == Qt.Key_C: # copy + if e.key() == Qt.Key.Key_C: # copy s = "" for r in range(selected[0].topRow(), selected[0].bottomRow() + 1): @@ -158,7 +158,7 @@ def keyPressEvent(self, e: QKeyEvent): QApplication.clipboard().setText(s) def event(self, event: QEvent) -> bool: - if event.type() == QEvent.WindowActivate: + if event.type() == QEvent.Type.WindowActivate: if self.settings.image is not None: self.channel_select.change_channels_num(self.settings.image.channels) self.refresh_measurements() From 20eff8929a9dea676e2368feec477606a36795fa Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 8 Dec 2023 23:30:12 +0100 Subject: [PATCH 03/19] refactor: fix qt flags in roi analysis (#1043) ## Summary by CodeRabbit - **Refactor** - Updated Qt library API usage across various components for alignment with the latest Qt framework conventions. - **Bug Fixes** - Ensured optional handling of pipeline results to prevent potential crashes when no result is present. - **Documentation** - No visible changes to end-user documentation in this release. --- .../PartSeg/_roi_analysis/advanced_window.py | 4 +-- .../calculation_pipeline_thread.py | 2 +- package/PartSeg/_roi_analysis/main_window.py | 17 ++++++----- .../_roi_analysis/measurement_widget.py | 4 +-- .../_roi_analysis/prepare_plan_widget.py | 10 +++---- .../PartSeg/_roi_analysis/profile_export.py | 28 +++++++++---------- 6 files changed, 34 insertions(+), 31 deletions(-) diff --git a/package/PartSeg/_roi_analysis/advanced_window.py b/package/PartSeg/_roi_analysis/advanced_window.py index 7fec48bf9..600289d0a 100644 --- a/package/PartSeg/_roi_analysis/advanced_window.py +++ b/package/PartSeg/_roi_analysis/advanced_window.py @@ -100,7 +100,7 @@ def __init__(self, settings: PartSettings): units_value = self._settings.get("units_value", Units.nm) for el in self.spacing: - el.setAlignment(Qt.AlignRight) + el.setAlignment(Qt.AlignmentFlag.AlignRight) el.setButtonSymbols(QAbstractSpinBox.NoButtons) el.setRange(0, 1000000) # noinspection PyUnresolvedReferences @@ -225,7 +225,7 @@ def showEvent(self, _event): self.update_spacing() def event(self, event: QEvent): - if event.type() == QEvent.WindowActivate and self.isVisible(): + if event.type() == QEvent.Type.WindowActivate and self.isVisible(): self.update_spacing() return super().event(event) diff --git a/package/PartSeg/_roi_analysis/calculation_pipeline_thread.py b/package/PartSeg/_roi_analysis/calculation_pipeline_thread.py index 76f6d8f73..2047caae9 100644 --- a/package/PartSeg/_roi_analysis/calculation_pipeline_thread.py +++ b/package/PartSeg/_roi_analysis/calculation_pipeline_thread.py @@ -9,7 +9,7 @@ class CalculatePipelineThread(ProgressTread): - result: PipelineResult + result: typing.Optional[PipelineResult] def __init__(self, image: Image, mask: typing.Union[np.ndarray, None], pipeline: SegmentationPipeline, parent=None): super().__init__(parent=parent) diff --git a/package/PartSeg/_roi_analysis/main_window.py b/package/PartSeg/_roi_analysis/main_window.py index 27dee0093..f44a476f0 100644 --- a/package/PartSeg/_roi_analysis/main_window.py +++ b/package/PartSeg/_roi_analysis/main_window.py @@ -229,19 +229,19 @@ def choose_pipeline(self, text): def update_tooltips(self): for i in range(1, self.choose_profile.count()): - if self.choose_profile.itemData(i, Qt.ToolTipRole) is not None: + if self.choose_profile.itemData(i, Qt.ItemDataRole.ToolTipRole) is not None: continue text = self.choose_profile.itemText(i) profile: ROIExtractionProfile = self._settings.roi_profiles[text] tool_tip_text = str(profile) - self.choose_profile.setItemData(i, tool_tip_text, Qt.ToolTipRole) + self.choose_profile.setItemData(i, tool_tip_text, Qt.ItemDataRole.ToolTipRole) for i in range(1, self.choose_pipe.count()): - if self.choose_pipe.itemData(i, Qt.ToolTipRole) is not None: + if self.choose_pipe.itemData(i, Qt.ItemDataRole.ToolTipRole) is not None: continue text = self.choose_pipe.itemText(i) profile: SegmentationPipeline = self._settings.roi_pipelines[text] tool_tip_text = str(profile) - self.choose_pipe.setItemData(i, tool_tip_text, Qt.ToolTipRole) + self.choose_pipe.setItemData(i, tool_tip_text, Qt.ItemDataRole.ToolTipRole) @staticmethod def update_combo_box(combo_box: QComboBox, dkt: dict): @@ -260,7 +260,10 @@ def update_combo_box(combo_box: QComboBox, dkt: dict): combo_box.addItems(sorted(new_names)) def keyPressEvent(self, event: QKeyEvent): - if event.key() in [Qt.Key_Enter, Qt.Key_Return] and event.modifiers() == Qt.ControlModifier: + if ( + event.key() in [Qt.Key.Key_Enter, Qt.Key.Key_Return] + and event.modifiers() == Qt.KeyboardModifier.ControlModifier + ): self.execute_btn.click() def save_profile(self): @@ -383,7 +386,7 @@ def __init__(self, settings: PartSettings, main_window): self.advanced_btn.clicked.connect(self.advanced_window_show) self.mask_manager_btn.clicked.connect(self.mask_manager) self.batch_processing_btn.clicked.connect(self.batch_window) - self.setFocusPolicy(Qt.StrongFocus) + self.setFocusPolicy(Qt.FocusPolicy.StrongFocus) def resizeEvent(self, event: QResizeEvent): if event.size().width() < 800: @@ -608,7 +611,7 @@ def __init__( # noqa: PLR0915 info_layout = QHBoxLayout() info_layout.addWidget(self.left_stack.selector) info_layout.addWidget(self.options_panel.compare_btn) - info_layout.addWidget(self.info_text, 1, Qt.AlignHCenter) + info_layout.addWidget(self.info_text, 1, Qt.AlignmentFlag.AlignHCenter) image_layout = EqualColumnLayout() image_layout.addWidget(self.left_stack) diff --git a/package/PartSeg/_roi_analysis/measurement_widget.py b/package/PartSeg/_roi_analysis/measurement_widget.py index f6342c1d2..8d515df63 100644 --- a/package/PartSeg/_roi_analysis/measurement_widget.py +++ b/package/PartSeg/_roi_analysis/measurement_widget.py @@ -284,11 +284,11 @@ def append_measurement_result(self): # pragma: no cover raise NotImplementedError def keyPressEvent(self, e: QKeyEvent): - if not e.modifiers() & Qt.ControlModifier: + if not e.modifiers() & Qt.KeyboardModifier.ControlModifier: return selected = self.info_field.selectedRanges() - if e.key() == Qt.Key_C: # copy + if e.key() == Qt.Key.Key_C: # copy s = "" for r in range(selected[0].topRow(), selected[0].bottomRow() + 1): diff --git a/package/PartSeg/_roi_analysis/prepare_plan_widget.py b/package/PartSeg/_roi_analysis/prepare_plan_widget.py index 6cad8fe59..5829520f0 100644 --- a/package/PartSeg/_roi_analysis/prepare_plan_widget.py +++ b/package/PartSeg/_roi_analysis/prepare_plan_widget.py @@ -80,7 +80,7 @@ def __init__(self, mask_names): super().__init__() self.mask_names = mask_names completer = QCompleter(list(mask_names)) - completer.setCaseSensitivity(Qt.CaseInsensitive) + completer.setCaseSensitivity(Qt.CaseSensitivity.CaseInsensitive) self.setWindowTitle("Masks name choose") self.mask1_name = QLineEdit() self.cancel_btn = QPushButton("Cancel") @@ -119,7 +119,7 @@ def __init__(self, mask_names: typing.Iterable[str]): super().__init__() self.mask_names = mask_names completer = QCompleter(list(mask_names)) - completer.setCaseSensitivity(Qt.CaseInsensitive) + completer.setCaseSensitivity(Qt.CaseSensitivity.CaseInsensitive) self.setWindowTitle("Masks name choose") self.mask1_name = QLineEdit() self.mask2_name = QLineEdit() @@ -943,7 +943,7 @@ def __init__(self, parent=None, calculation_plan=None): self.calculation_plan = None self.header().close() self.itemSelectionChanged.connect(self.set_path) - self.setContextMenuPolicy(Qt.CustomContextMenu) + self.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) if calculation_plan is not None: self.set_plan(calculation_plan) @@ -1001,7 +1001,7 @@ def explore_tree(self, up_widget, node_plan, deep=True): widget.setText(0, CalculationPlan.get_el_name(node_plan.operation)) self.setCurrentItem(widget) if isinstance(node_plan.operation, (MeasurementCalculate, ROIExtractionProfile)): - widget.setData(0, Qt.UserRole, node_plan.operation) + widget.setData(0, Qt.ItemDataRole.UserRole, node_plan.operation) if isinstance(node_plan.operation, (MeasurementCalculate, ROIExtractionProfile, MaskCreate)): desc = QTreeWidgetItem(widget) desc.setText(0, "Description") @@ -1120,7 +1120,7 @@ def __init__(self, settings: PartSettings): def _context_menu(self, point): item = self.plan_view.itemAt(point) - data = item.data(0, Qt.UserRole) + data = item.data(0, Qt.ItemDataRole.UserRole) if data is None: return diff --git a/package/PartSeg/_roi_analysis/profile_export.py b/package/PartSeg/_roi_analysis/profile_export.py index 7f569e3a7..b8feea93f 100644 --- a/package/PartSeg/_roi_analysis/profile_export.py +++ b/package/PartSeg/_roi_analysis/profile_export.py @@ -45,7 +45,7 @@ def preview_object(self, ob): class ProfileDictViewer(ObjectPreview): """ - Preview of :py:class"`SegmentationProfile`. + Preview of :py:class:`SegmentationProfile`. Serialized using :py:meth:`ObjectPreview.pretty_print`. """ @@ -66,8 +66,8 @@ def __init__(self, export_dict, viewer, parent=None): for el in sorted(export_dict.keys()): item = QListWidgetItem(el) # noinspection PyTypeChecker - item.setFlags(item.flags() | Qt.ItemIsUserCheckable) - item.setCheckState(Qt.Checked) + item.setFlags(item.flags() | Qt.ItemFlag.ItemIsUserCheckable) + item.setCheckState(Qt.CheckState.Checked) self.list_view.addItem(item) self.checked_num = len(export_dict) @@ -100,7 +100,7 @@ def __init__(self, export_dict, viewer, parent=None): self.setLayout(layout) def checked_change(self, item): - if item.checkState() == Qt.Unchecked: + if item.checkState() == Qt.CheckState.Unchecked: self.checked_num -= 1 else: self.checked_num += 1 @@ -118,14 +118,14 @@ def preview(self): def check_change(self): item = self.list_view.currentItem() # type: QListWidgetItem index = self.list_view.currentRow() - checked = item.checkState() == Qt.Checked + checked = item.checkState() == Qt.CheckState.Checked self.check_state[index] = checked self.export_btn.setEnabled(np.any(self.check_state)) def uncheck_all(self): for index in range(self.list_view.count()): item = self.list_view.item(index) - item.setCheckState(Qt.Unchecked) + item.setCheckState(Qt.CheckState.Unchecked) self.check_state[...] = False self.export_btn.setDisabled(True) self.checked_num = 0 @@ -133,7 +133,7 @@ def uncheck_all(self): def check_all(self): for index in range(self.list_view.count()): item = self.list_view.item(index) - item.setCheckState(Qt.Checked) + item.setCheckState(Qt.CheckState.Checked) self.checked_num = len(self.export_dict) self.check_state[...] = True self.export_btn.setDisabled(False) @@ -142,7 +142,7 @@ def get_export_list(self): res = [] for num in range(self.list_view.count()): item = self.list_view.item(num) - if item.checkState() == Qt.Checked: + if item.checkState() == Qt.CheckState.Checked: res.append(str(item.text())) return res @@ -190,8 +190,8 @@ def __init__( item = QTreeWidgetItem() item.setText(0, name) # noinspection PyTypeChecker - item.setFlags(item.flags() | Qt.ItemIsUserCheckable) - item.setCheckState(0, Qt.Checked) + item.setFlags(item.flags() | Qt.ItemFlag.ItemIsUserCheckable) + item.setCheckState(0, Qt.CheckState.Checked) self.list_view.addTopLevelItem(item) if name in conflicts: group = QButtonGroup() @@ -288,7 +288,7 @@ def preview(self): self.local_viewer.clear() def checked_change(self, item, _): - if item.checkState(0) == Qt.Unchecked: + if item.checkState(0) == Qt.CheckState.Unchecked: self.checked_num -= 1 if self.list_view.itemWidget(item, 1) is not None: self.list_view.itemWidget(item, 1).setDisabled(True) @@ -309,7 +309,7 @@ def get_import_list(self): res = [] for index in range(self.list_view.topLevelItemCount()): item = self.list_view.topLevelItem(index) - if item.checkState(0) == Qt.Checked: + if item.checkState(0) == Qt.CheckState.Checked: chk = self.list_view.itemWidget(item, 2) if chk is not None and typing.cast(QRadioButton, chk).isChecked(): res.append((item.text(0), typing.cast(QLineEdit, self.list_view.itemWidget(item, 3)).text())) @@ -321,13 +321,13 @@ def get_import_list(self): def uncheck_all(self): for index in range(self.list_view.topLevelItemCount()): item = self.list_view.topLevelItem(index) - item.setCheckState(0, Qt.Unchecked) + item.setCheckState(0, Qt.CheckState.Unchecked) self.import_btn.setDisabled(True) self.checked_num = 0 def check_all(self): for index in range(self.list_view.topLevelItemCount()): item = self.list_view.topLevelItem(index) - item.setCheckState(0, Qt.Checked) + item.setCheckState(0, Qt.CheckState.Checked) self.checked_num = len(self.import_dict) self.import_btn.setDisabled(False) From fa5f9cd391a6803caf478514baa4f6e9a82687e8 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 8 Dec 2023 23:49:51 +0100 Subject: [PATCH 04/19] ci: Upload raw coverage information (#1044) For simpler debug upload rav coverage information ## Summary by CodeRabbit - **Chores** - Improved CI/CD pipeline by adding a step to upload coverage reports, enhancing visibility into code quality metrics. --- .github/workflows/base_test_workflow.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/base_test_workflow.yml b/.github/workflows/base_test_workflow.yml index b4628d778..2d6043638 100644 --- a/.github/workflows/base_test_workflow.yml +++ b/.github/workflows/base_test_workflow.yml @@ -97,7 +97,8 @@ jobs: ./report-*.json retention-days: 7 - - uses: actions/upload-artifact@v3 + - name: Upload coverage report ${{ inputs.tox_args }} + uses: actions/upload-artifact@v3 if: ${{ inputs.coverage }} with: name: coverage_report ${{ inputs.tox_args }} @@ -105,6 +106,13 @@ jobs: ./htmlcov retention-days: 7 + - name: Upload coverage raw data + uses: actions/upload-artifact@v3 + with: + name: coverage_raw ${{ inputs.tox_args }} + path: ./coverage.xml + retention-days: 7 + - uses: codecov/codecov-action@v3 if: ${{ inputs.coverage }} with: From 3ecab34b494c4eed77322fd2e27224aea75467c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 10:24:19 +0100 Subject: [PATCH 05/19] build(deps): bump aganders3/headless-gui from 1 to 2 (#1047) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [aganders3/headless-gui](https://github.com/aganders3/headless-gui) from 1 to 2.
Release notes

Sourced from aganders3/headless-gui's releases.

Version 2.0 is not a major change, but it is technically breaking as the default virtual screen size has changed. If you are not relying heavily on the virtual screen size or bit depth you are probably safe to just update. If you want to update and keep the old default, set xvfb-screen-size: "1024x768x16".

What's Changed

Full Changelog: https://github.com/aganders3/headless-gui/compare/v1...v2.0

Version 1.2

What's Changed

New Contributors

Full Changelog: https://github.com/aganders3/headless-gui/compare/v1...v1.2

v1.1

What's Changed

New Contributors

Full Changelog: https://github.com/aganders3/headless-gui/compare/v1...v1.1

Commits
  • 9f7725f Fix printing of screen size in output
  • 7c0bc5d Bump @​babel/traverse from 7.20.1 to 7.23.2 (#8)
  • 946613f Add screen size configuration, update default (#9)
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aganders3/headless-gui&package-manager=github_actions&previous-version=1&new-version=2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/base_test_workflow.yml | 2 +- .github/workflows/test_napari_repo.yml | 2 +- .github/workflows/test_prereleases.yml | 4 ++-- .github/workflows/tests.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/base_test_workflow.yml b/.github/workflows/base_test_workflow.yml index 2d6043638..08fbeb601 100644 --- a/.github/workflows/base_test_workflow.yml +++ b/.github/workflows/base_test_workflow.yml @@ -80,7 +80,7 @@ jobs: pip list - name: Test with tox - uses: aganders3/headless-gui@v1 + uses: aganders3/headless-gui@v2 timeout-minutes: ${{ inputs.timeout }} with: run: python -m tox ${{ inputs.tox_args }} diff --git a/.github/workflows/test_napari_repo.yml b/.github/workflows/test_napari_repo.yml index 409b31c0d..d676c0636 100644 --- a/.github/workflows/test_napari_repo.yml +++ b/.github/workflows/test_napari_repo.yml @@ -61,7 +61,7 @@ jobs: - name: Test with tox # run tests using pip install --pre - uses: aganders3/headless-gui@v1 + uses: aganders3/headless-gui@v2 timeout-minutes: 60 with: run: tox diff --git a/.github/workflows/test_prereleases.yml b/.github/workflows/test_prereleases.yml index 076819453..cc5f44655 100644 --- a/.github/workflows/test_prereleases.yml +++ b/.github/workflows/test_prereleases.yml @@ -71,7 +71,7 @@ jobs: - name: Test with tox linux # run tests using pip install --pre - uses: aganders3/headless-gui@v1 + uses: aganders3/headless-gui@v2 timeout-minutes: 60 with: run: python -m tox -v --pre @@ -127,7 +127,7 @@ jobs: name: bundle path: dist2/ - name: Test bundle - uses: aganders3/headless-gui@v1 + uses: aganders3/headless-gui@v2 timeout-minutes: 60 with: run: dist/PartSeg/PartSeg _test diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2a2541531..f6d1e8c5e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -171,7 +171,7 @@ jobs: run: sed -e "s/{sys_platform}/{platform}/g" tox.ini -i - name: Test with tox - uses: aganders3/headless-gui@v1 + uses: aganders3/headless-gui@v2 with: run: conda run -n test --no-capture-output tox -e py39-PySide2-conda timeout-minutes: 60 From be16d14f3feb7926444a3e25efa4480f92a00e6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 10:26:57 +0100 Subject: [PATCH 06/19] build(deps): bump actions/checkout from 3 to 4 (#1045) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
Release notes

Sourced from actions/checkout's releases.

v4.0.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v4.0.0

v3.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3.5.3...v3.6.0

v3.5.3

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v3.5.3

v3.5.2

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v3.5.1...v3.5.2

v3.5.1

What's Changed

New Contributors

... (truncated)

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/semgrep.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 26c48814b..b65d27d01 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -28,7 +28,7 @@ jobs: steps: # Fetch project source with GitHub Actions Checkout. - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Run the "semgrep ci" command on the command line of the docker image. - run: semgrep ci env: From 7ef0b010fbbaf57140b40487fb0b67a0f65a6d3d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 13:01:06 +0100 Subject: [PATCH 07/19] ci: [pre-commit.ci] pre-commit autoupdate (#1036) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black-pre-commit-mirror: 23.10.1 → 23.11.0](https://github.com/psf/black-pre-commit-mirror/compare/23.10.1...23.11.0) - [github.com/astral-sh/ruff-pre-commit: v0.1.3 → v0.1.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.3...v0.1.7) - [github.com/pre-commit/mirrors-mypy: v1.6.1 → v1.7.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.6.1...v1.7.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 14d1496cb..90ddc860a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: repos: - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.10.1 + rev: 23.11.0 hooks: - id: black pass_filenames: true @@ -25,7 +25,7 @@ repos: - id: setup-cfg-fmt args: ["--include-version-classifiers", "--max-py-version", "3.11"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.3 + rev: v0.1.7 hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade @@ -49,7 +49,7 @@ repos: - mdformat-toc - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.6.1' # Use the sha / tag you want to point at + rev: 'v1.7.1' # Use the sha / tag you want to point at hooks: - id: mypy files: ^package/PartSegImage/.+\.py From 33f108ae118d8a5e070554ffcda7d2e00e1f286e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 13:13:07 +0100 Subject: [PATCH 08/19] build(deps): bump hynek/build-and-inspect-python-package from 1 to 2 (#1050) Bumps [hynek/build-and-inspect-python-package](https://github.com/hynek/build-and-inspect-python-package) from 1 to 2.
Release notes

Sourced from hynek/build-and-inspect-python-package's releases.

v2.0.0

This release switches to actions/upload-artifact v4, which is incompatible with older versions of actions/download-artifact (and vice versa).

  • If you're using download-artifact@v3, do not upgrade.
  • If you want to use download-artifact@v4, you must upgrade.

v1.5.4

Fixed

  • Stop trying to cache. Fixes Error: No file in /home/runner/work/pytest-cpp/pytest-cpp matched to [**/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository #76

v1.5.3

Changed

  • Hopefully nothing, but this release comes from the main branch again.

v1.5.2

Fixed

  • Turns out it made a huge difference. This release is branched directly from v1.5 and only updates the dependencies.

v1.5.1

Changed

  • Updates of the tools we use. Notably this fixes check-wheel-contents on Python 3.12.

  • This shouldn't make any difference, but all management and command running is now done by PDM. #57

v1.5.0

Added

  • Set SOURCE_DATE_EPOCH based on the timestamp of the last commit for build reproducibility. #30
  • The tree output now has ISO timestamps.

Changed

  • Use 3.x version specifier in setup-python for the venv used by our tools. As of writing, that's 3.11.

v1.4.1

Contains only a fix for a deprecation warning.

v1.4

Added

  • The contents listing of the SDist, the contents listing of the wheel, and the package metadata are now conveniently added to the CI run summary. So, you don't have to click through the build logs or download anything to give it a quick glimpse.

... (truncated)

Changelog

Sourced from hynek/build-and-inspect-python-package's changelog.

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hynek/build-and-inspect-python-package&package-manager=github_actions&previous-version=1&new-version=2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f6d1e8c5e..3c76f0e5f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -184,4 +184,4 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: hynek/build-and-inspect-python-package@v1 + - uses: hynek/build-and-inspect-python-package@v2 From c35e623efa08daf398ff7600b58f040109a77513 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Mon, 18 Dec 2023 16:14:23 +0100 Subject: [PATCH 09/19] ci: Run coverage upload in separate steep (#1053) To reduce codecov upload failure impact, move it to a separate job ## Summary by CodeRabbit - **Refactor** - Renamed the workflow to "Base Test Workflow" for clarity. - **Chores** - Updated artifact naming for better identification of coverage reports. - Streamlined the CI process by removing the coverage data upload step and discontinuing the use of a third-party action for codecov. - **New Features** - Introduced a dedicated workflow for handling coverage report uploads. - **Documentation** - No visible changes to end-user documentation. --- .github/workflows/base_test_workflow.yml | 23 +++--------- .github/workflows/upload_coverage.yml | 46 ++++++++++++++++++++++++ setup.cfg | 8 +++-- tox.ini | 12 +++---- 4 files changed, 62 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/upload_coverage.yml diff --git a/.github/workflows/base_test_workflow.yml b/.github/workflows/base_test_workflow.yml index 08fbeb601..b566c423c 100644 --- a/.github/workflows/base_test_workflow.yml +++ b/.github/workflows/base_test_workflow.yml @@ -1,3 +1,5 @@ +name: Base Test Workflow + on: workflow_call: inputs: @@ -97,25 +99,10 @@ jobs: ./report-*.json retention-days: 7 - - name: Upload coverage report ${{ inputs.tox_args }} + - name: Upload coverage data uses: actions/upload-artifact@v3 if: ${{ inputs.coverage }} with: - name: coverage_report ${{ inputs.tox_args }} + name: coverage reports path: | - ./htmlcov - retention-days: 7 - - - name: Upload coverage raw data - uses: actions/upload-artifact@v3 - with: - name: coverage_raw ${{ inputs.tox_args }} - path: ./coverage.xml - retention-days: 7 - - - uses: codecov/codecov-action@v3 - if: ${{ inputs.coverage }} - with: - file: ./coverage.xml - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} + ./.coverage.* diff --git a/.github/workflows/upload_coverage.yml b/.github/workflows/upload_coverage.yml new file mode 100644 index 000000000..dc3ee5cae --- /dev/null +++ b/.github/workflows/upload_coverage.yml @@ -0,0 +1,46 @@ +name: Coverage upload + +on: + workflow_run: + workflows: + - Tests + types: + - completed + +jobs: + upload_coverage: + name: Upload coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + cache-dependency-path: setup.cfg + cache: 'pip' + + - name: Install Dependencies + run: | + pip install --upgrade pip + pip install codecov + + - name: Download coverage data + uses: actions/download-artifact@v3 + with: + name: coverage reports + path: coverage + + - name: combine coverage data + run: | + python -Im coverage combine coverage + python -Im coverage xml -o coverage.xml + + # Report and write to summary. + python -Im coverage report --format=markdown --skip-empty --skip-covered >> $GITHUB_STEP_SUMMARY + + - name: Upload coverage data + uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/setup.cfg b/setup.cfg index 9ec2700f1..cdebd7b39 100644 --- a/setup.cfg +++ b/setup.cfg @@ -79,7 +79,6 @@ package_dir = =package tests_require = pytest - pytest-cov pytest-qt lxml @@ -120,9 +119,9 @@ pyside2 = pyside6 = PySide6 test = + coverage lxml pytest>=7.0.0 - pytest-cov pytest-qt pytest-timeout scikit-image @@ -166,7 +165,10 @@ source = PartSeg PartSegCore PartSegImage -omit = .tox/* +omit = + .tox/* + **/changelog.py + **/version.py parallel = True [coverage:report] diff --git a/tox.ini b/tox.ini index ca93aafa7..aa65f5893 100644 --- a/tox.ini +++ b/tox.ini @@ -63,7 +63,7 @@ extras = test commands = - python -m pytest package/tests --no-cov --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json + python -m pytest package/tests --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json [testenv:py39-PySide2-conda] conda_env=environment.yml @@ -80,14 +80,14 @@ deps = 417: napari==0.4.17 repo: git+https://github.com/napari/napari.git commands = - !repo: python -m pytest -v package/tests/test_PartSeg/test_napari_widgets.py --no-cov --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json - repo: python -m pytest --no-cov --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json + !repo: python -m pytest -v package/tests/test_PartSeg/test_napari_widgets.py --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json + repo: python -m pytest --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json -[testenv:py{38,39,310,311s}-PyQt5-coverage] +[testenv:py{38,39,310,311}-PyQt5-coverage] deps = {[testenv]deps} commands = - python -m pytest --cov-report=xml --cov-report html --cov-append --cov {envsitepackagesdir}/PartSeg --cov {envsitepackagesdir}/PartSegCore --cov {envsitepackagesdir}/PartSegImage --cov package/tests --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json + coverage run -m pytest --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json [testenv:py38-PyQt5-minimal] min_req = 1 @@ -100,7 +100,7 @@ deps = {[base]deps} setuptools_scm[toml]>=3.4 commands = - python -m pytest --cov-report=xml --cov-report html --cov-append --cov {envsitepackagesdir}/PartSeg --cov {envsitepackagesdir}/PartSegCore --cov {envsitepackagesdir}/PartSegImage --cov package/tests --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json + coverage run -m pytest --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json [testenv:py{38,39,310}-{PyQt5, PySide2,PyQt6,PySide6}-azure] deps = From c6ee6c9773e860619c4f3ff680aeafb4f26aa499 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Mon, 18 Dec 2023 17:31:43 +0100 Subject: [PATCH 10/19] ci: Generate local report in `Tests` workflow and use proper script for fetch report (#1054) ## Summary by CodeRabbit - **Chores** - Improved the CI workflow by introducing a new job for preparing coverage data. - Streamlined coverage data handling by leveraging GitHub Actions scripting capabilities for artifact management. --- .github/workflows/tests.yml | 35 ++++++++++++++++++++ .github/workflows/upload_coverage.yml | 47 ++++++++++++--------------- 2 files changed, 56 insertions(+), 26 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3c76f0e5f..3024262bb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -116,6 +116,41 @@ jobs: tox_args: "-e py38-PyQt5-minimal" coverage: true + coverage_prepare: + name: Prepare coverage + runs-on: ubuntu-latest + needs: [test_coverage, test_minimal] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + cache-dependency-path: setup.cfg + cache: 'pip' + - name: Install Dependencies + run: | + pip install --upgrade pip + pip install codecov + + - name: Download coverage data + uses: actions/download-artifact@v3 + with: + name: coverage reports + path: coverage + - name: combine coverage data + run: | + python -Im coverage combine coverage + python -Im coverage xml -o coverage.xml + # Report and write to summary. + python -Im coverage report --format=markdown --skip-empty --skip-covered >> $GITHUB_STEP_SUMMARY + + - name: Upload coverage artifact + uses: actions/upload-artifact@v4 + with: + name: coverage_xml + path: coverage.xml + retention-days: 5 + test_conda: name: Test PartSeg conda runs-on: ubuntu-20.04 diff --git a/.github/workflows/upload_coverage.yml b/.github/workflows/upload_coverage.yml index dc3ee5cae..4d4565034 100644 --- a/.github/workflows/upload_coverage.yml +++ b/.github/workflows/upload_coverage.yml @@ -12,33 +12,28 @@ jobs: name: Upload coverage runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: "3.x" - cache-dependency-path: setup.cfg - cache: 'pip' - - - name: Install Dependencies - run: | - pip install --upgrade pip - pip install codecov - - - name: Download coverage data - uses: actions/download-artifact@v3 + - name: Download Coverage Data + uses: actions/github-script@v6 with: - name: coverage reports - path: coverage - - - name: combine coverage data - run: | - python -Im coverage combine coverage - python -Im coverage xml -o coverage.xml - - # Report and write to summary. - python -Im coverage report --format=markdown --skip-empty --skip-covered >> $GITHUB_STEP_SUMMARY - + script: | + let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.payload.workflow_run.id, + }); + let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { + return artifact.name == "coverage_xml" + })[0]; + let download = await github.rest.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifact.id, + archive_format: 'zip', + }); + let fs = require('fs'); + fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/coverage_xml.zip`, Buffer.from(download.data)); + - name: 'Unzip artifact' + run: unzip coverage_xml.zip - name: Upload coverage data uses: codecov/codecov-action@v3 with: From 2d0c9085a000457cffb1459b9b0fd940a578f739 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Mon, 18 Dec 2023 19:08:08 +0100 Subject: [PATCH 11/19] ci: Move coverage back to main workflow (#1055) ## Summary by CodeRabbit - **New Features** - Integrated coverage data upload to Codecov in the CI workflow. - **Chores** - Ensured CI fails upon errors during coverage data upload. - **Documentation** - Updated CI workflow documentation to reflect new changes. --- .github/workflows/tests.yml | 6 ++++ .github/workflows/upload_coverage.yml | 41 --------------------------- 2 files changed, 6 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/upload_coverage.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3024262bb..be7d50d2f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -151,6 +151,12 @@ jobs: path: coverage.xml retention-days: 5 + - name: Upload coverage data + uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + test_conda: name: Test PartSeg conda runs-on: ubuntu-20.04 diff --git a/.github/workflows/upload_coverage.yml b/.github/workflows/upload_coverage.yml deleted file mode 100644 index 4d4565034..000000000 --- a/.github/workflows/upload_coverage.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Coverage upload - -on: - workflow_run: - workflows: - - Tests - types: - - completed - -jobs: - upload_coverage: - name: Upload coverage - runs-on: ubuntu-latest - steps: - - name: Download Coverage Data - uses: actions/github-script@v6 - with: - script: | - let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: context.payload.workflow_run.id, - }); - let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { - return artifact.name == "coverage_xml" - })[0]; - let download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - let fs = require('fs'); - fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/coverage_xml.zip`, Buffer.from(download.data)); - - name: 'Unzip artifact' - run: unzip coverage_xml.zip - - name: Upload coverage data - uses: codecov/codecov-action@v3 - with: - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} From c92832e29b891ee6022ede311fe4ec7e1ce7cc85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:33:00 +0100 Subject: [PATCH 12/19] build(deps): bump actions/setup-python from 4 to 5 (#1046) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
Release notes

Sourced from actions/setup-python's releases.

v5.0.0

What's Changed

In scope of this release, we update node version runtime from node16 to node20 (actions/setup-python#772). Besides, we update dependencies to the latest versions.

Full Changelog: https://github.com/actions/setup-python/compare/v4.8.0...v5.0.0

v4.8.0

What's Changed

In scope of this release we added support for GraalPy (actions/setup-python#694). You can use this snippet to set up GraalPy:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
  with:
    python-version: 'graalpy-22.3'
- run: python my_script.py

Besides, the release contains such changes as:

New Contributors

Full Changelog: https://github.com/actions/setup-python/compare/v4...v4.8.0

v4.7.1

What's Changed

Full Changelog: https://github.com/actions/setup-python/compare/v4...v4.7.1

v4.7.0

In scope of this release, the support for reading python version from pyproject.toml was added (actions/setup-python#669).

      - name: Setup Python
        uses: actions/setup-python@v4
</tr></table>

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Grzegorz Bokota --- .github/workflows/base_test_workflow.yml | 2 +- .github/workflows/test_napari_repo.yml | 2 +- .github/workflows/test_prereleases.yml | 4 ++-- .github/workflows/upgrade-dependencies.yml | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/base_test_workflow.yml b/.github/workflows/base_test_workflow.yml index b566c423c..dec303b12 100644 --- a/.github/workflows/base_test_workflow.yml +++ b/.github/workflows/base_test_workflow.yml @@ -42,7 +42,7 @@ jobs: runs-on: ${{ inputs.os }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 name: Install Python ${{ inputs.python_version }} with: python-version: ${{ inputs.python_version }} diff --git a/.github/workflows/test_napari_repo.yml b/.github/workflows/test_napari_repo.yml index d676c0636..4607e36fb 100644 --- a/.github/workflows/test_napari_repo.yml +++ b/.github/workflows/test_napari_repo.yml @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} diff --git a/.github/workflows/test_prereleases.yml b/.github/workflows/test_prereleases.yml index cc5f44655..eb8cadfd7 100644 --- a/.github/workflows/test_prereleases.yml +++ b/.github/workflows/test_prereleases.yml @@ -43,7 +43,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} cache: 'pip' @@ -100,7 +100,7 @@ jobs: runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 name: Install Python 3.9 with: python-version: 3.9 diff --git a/.github/workflows/upgrade-dependencies.yml b/.github/workflows/upgrade-dependencies.yml index f9a50855d..a5dbd8658 100644 --- a/.github/workflows/upgrade-dependencies.yml +++ b/.github/workflows/upgrade-dependencies.yml @@ -22,22 +22,22 @@ jobs: ssh-key: ${{ secrets.DEPLOY_KEY }} # START PYTHON DEPENDENCIES - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.8" cache: pip cache-dependency-path: 'setup.cfg' - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.9" cache: pip cache-dependency-path: 'setup.cfg' - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.10" cache: pip cache-dependency-path: 'setup.cfg' - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.11" cache: pip From fd794ef51f1606af59d103c215a9222f8c91b71f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:33:14 +0100 Subject: [PATCH 13/19] build(deps): bump github/codeql-action from 2 to 3 (#1051) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
Release notes

Sourced from github/codeql-action's releases.

CodeQL Bundle v2.15.4

Bundles CodeQL CLI v2.15.4

Includes the following CodeQL language packs from github/codeql@codeql-cli/v2.15.4:

CodeQL Bundle

Bundles CodeQL CLI v2.15.3

Includes the following CodeQL language packs from github/codeql@codeql-cli/v2.15.3:

CodeQL Bundle

Bundles CodeQL CLI v2.15.2

Includes the following CodeQL language packs from github/codeql@codeql-cli/v2.15.2:

... (truncated)

Changelog

Sourced from github/codeql-action's changelog.

Commits
  • 3a9f6a8 update javascript files
  • cc4fead update version in various hardcoded locations
  • 183559c Merge branch 'main' into update-bundle/codeql-bundle-v2.15.4
  • 5b52b36 reintroduce PR check that confirm action can be still be compiled on node16
  • 5b19bef change to node20 for all actions
  • f2d0c2e upgrade node type definitions
  • d651fbc change to node20 for all actions
  • 382a50a Merge pull request #2021 from github/mergeback/v2.22.9-to-main-c0d1daa7
  • 458b422 Update checked-in dependencies
  • 5e0f9db Update changelog and version after v2.22.9
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 22a7fc5ab..130eb0832 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -47,7 +47,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -58,7 +58,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -72,4 +72,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 From fb5720dbc7cef89147f0ed81fcd123100483c1e9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:33:36 +0100 Subject: [PATCH 14/19] ci: [pre-commit.ci] pre-commit autoupdate (#1056) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black-pre-commit-mirror: 23.11.0 → 23.12.1](https://github.com/psf/black-pre-commit-mirror/compare/23.11.0...23.12.1) - [github.com/astral-sh/ruff-pre-commit: v0.1.7 → v0.1.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.7...v0.1.9) - [github.com/pre-commit/mirrors-mypy: v1.7.1 → v1.8.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.7.1...v1.8.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90ddc860a..d91fd7320 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: repos: - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.11.0 + rev: 23.12.1 hooks: - id: black pass_filenames: true @@ -25,7 +25,7 @@ repos: - id: setup-cfg-fmt args: ["--include-version-classifiers", "--max-py-version", "3.11"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.7 + rev: v0.1.9 hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade @@ -49,7 +49,7 @@ repos: - mdformat-toc - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.7.1' # Use the sha / tag you want to point at + rev: 'v1.8.0' # Use the sha / tag you want to point at hooks: - id: mypy files: ^package/PartSegImage/.+\.py From 41ffcfec51fc95368fceb82f969f0294d42c0fa4 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Thu, 4 Jan 2024 14:34:04 +0100 Subject: [PATCH 15/19] test: [Automatic] Constraints upgrades: `imagecodecs`, `imageio`, `ipykernel`, `magicgui`, `pandas`, `pyinstaller`, `qtawesome`, `sentry-sdk`, `tifffile` (#1048) This PR is automatically created and updated by PartSeg GitHub action cron to keep bundle dependencies modules up to date. The updated packages are: * app-model * attrs * babel * coverage * dask * fsspec * imagecodecs * imageio * importlib-metadata * ipykernel * jsonschema-specifications * jupyter-core * lxml * magicgui * pandas * pint * platformdirs * prompt-toolkit * psutil * pydantic-compat * pyinstaller * pyinstaller-hooks-contrib * pytest * pytest-qt * pyzmq * qtawesome * referencing * rpds-py * sentry-sdk * setuptools * tifffile * typing-extensions * tzdata ## Summary by CodeRabbit - **Package Updates** - Upgraded various dependencies across different Python versions to enhance performance and compatibility. - Notable package updates include improvements to `pandas`, `pytest`, `lxml`, and `ipython` among others. Co-authored-by: Czaki --- requirements/constraints_py3.10.txt | 85 ++++++++++++++--------------- requirements/constraints_py3.11.txt | 84 ++++++++++++++-------------- requirements/constraints_py3.8.txt | 65 +++++++++++----------- requirements/constraints_py3.9.txt | 75 ++++++++++++------------- 4 files changed, 149 insertions(+), 160 deletions(-) diff --git a/requirements/constraints_py3.10.txt b/requirements/constraints_py3.10.txt index db6d0c0b4..ed29f2fa5 100644 --- a/requirements/constraints_py3.10.txt +++ b/requirements/constraints_py3.10.txt @@ -8,7 +8,7 @@ alabaster==0.7.13 # via sphinx altgraph==0.17.4 # via pyinstaller -app-model==0.2.2 +app-model==0.2.4 # via napari appdirs==1.4.4 # via @@ -17,11 +17,11 @@ appdirs==1.4.4 # npe2 asttokens==2.4.1 # via stack-data -attrs==23.1.0 +attrs==23.2.0 # via # jsonschema # referencing -babel==2.13.1 +babel==2.14.0 # via sphinx build==1.0.3 # via npe2 @@ -42,13 +42,11 @@ cloudpickle==3.0.0 # via dask comm==0.2.0 # via ipykernel -coverage==7.3.2 - # via - # coverage - # pytest-cov +coverage==7.4.0 + # via PartSeg (setup.cfg) czifile==2019.7.2 # via PartSeg (setup.cfg) -dask==2023.12.0 +dask==2023.12.1 # via # dask # napari @@ -74,7 +72,7 @@ fonticon-fontawesome6==6.4.0 # via PartSeg (setup.cfg) freetype-py==2.4.0 # via vispy -fsspec==2023.12.0 +fsspec==2023.12.2 # via dask h5py==3.10.0 # via PartSeg (setup.cfg) @@ -84,9 +82,9 @@ hsluv==5.0.4 # via vispy idna==3.6 # via requests -imagecodecs==2023.9.18 +imagecodecs==2024.1.1 # via PartSeg (setup.cfg) -imageio==2.33.0 +imageio==2.33.1 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -95,18 +93,18 @@ imageio==2.33.0 # scikit-image imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.0 +importlib-metadata==7.0.1 # via dask in-n-out==0.1.9 # via app-model iniconfig==2.0.0 # via pytest -ipykernel==6.27.1 +ipykernel==6.28.0 # via # PartSeg (setup.cfg) # napari-console # qtconsole -ipython==8.18.1 +ipython==8.19.0 # via # PartSeg (setup.cfg) # ipykernel @@ -119,13 +117,13 @@ jinja2==3.1.2 # sphinx jsonschema==4.20.0 # via napari -jsonschema-specifications==2023.11.2 +jsonschema-specifications==2023.12.1 # via jsonschema jupyter-client==8.6.0 # via # ipykernel # qtconsole -jupyter-core==5.5.0 +jupyter-core==5.5.1 # via # ipykernel # jupyter-client @@ -142,9 +140,9 @@ local-migrator==0.1.9 # nme locket==1.0.0 # via partd -lxml==4.9.3 +lxml==5.0.0 # via PartSeg (setup.cfg) -magicgui==0.8.0 +magicgui==0.8.1 # via # PartSeg (setup.cfg) # napari @@ -224,7 +222,7 @@ packaging==23.2 # sphinx # superqt # vispy -pandas==2.1.3 +pandas==2.1.4 # via # PartSeg (setup.cfg) # napari @@ -243,9 +241,9 @@ pillow==10.1.0 # imageio # napari # scikit-image -pint==0.22 +pint==0.23 # via napari -platformdirs==4.0.0 +platformdirs==4.1.0 # via # jupyter-core # pooch @@ -253,9 +251,9 @@ pluggy==1.3.0 # via pytest pooch==1.8.0 # via scikit-image -prompt-toolkit==3.0.41 +prompt-toolkit==3.0.43 # via ipython -psutil==5.9.6 +psutil==5.9.7 # via # ipykernel # napari @@ -279,6 +277,9 @@ pydantic==1.10.13 # app-model # napari # npe2 + # pydantic-compat +pydantic-compat==0.1.2 + # via app-model pygments==2.17.2 # via # PartSeg (setup.cfg) @@ -288,9 +289,9 @@ pygments==2.17.2 # rich # sphinx # superqt -pyinstaller==6.2.0 +pyinstaller==6.3.0 # via PartSeg (setup.cfg) -pyinstaller-hooks-contrib==2023.10 +pyinstaller-hooks-contrib==2023.11 # via pyinstaller pyopengl==3.1.7 # via napari @@ -318,25 +319,22 @@ pyside2==5.15.2.1 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) -pyside6==6.6.0 ; python_version >= "3.10" +pyside6==6.6.1 ; python_version >= "3.10" # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) -pyside6-addons==6.6.0 +pyside6-addons==6.6.1 # via pyside6 -pyside6-essentials==6.6.0 +pyside6-essentials==6.6.1 # via # pyside6 # pyside6-addons -pytest==7.4.3 +pytest==7.4.4 # via # PartSeg (setup.cfg) - # pytest-cov # pytest-qt # pytest-timeout -pytest-cov==4.1.0 - # via PartSeg (setup.cfg) -pytest-qt==4.2.0 +pytest-qt==4.3.1 # via PartSeg (setup.cfg) pytest-timeout==2.2.0 # via PartSeg (setup.cfg) @@ -351,12 +349,12 @@ pyyaml==6.0.1 # dask # napari # npe2 -pyzmq==25.1.1 +pyzmq==25.1.2 # via # ipykernel # jupyter-client # qtconsole -qtawesome==1.2.3 +qtawesome==1.3.0 # via PartSeg (setup.cfg) qtconsole==5.5.1 # via @@ -371,7 +369,7 @@ qtpy==2.4.1 # qtawesome # qtconsole # superqt -referencing==0.31.1 +referencing==0.32.0 # via # jsonschema # jsonschema-specifications @@ -383,7 +381,7 @@ requests==2.31.0 # sphinx rich==13.7.0 # via npe2 -rpds-py==0.13.2 +rpds-py==0.16.2 # via # jsonschema # referencing @@ -396,13 +394,13 @@ scipy==1.11.4 # PartSeg (setup.cfg) # napari # scikit-image -sentry-sdk==1.38.0 +sentry-sdk==1.39.1 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) shiboken2==5.15.2.1 # via pyside2 -shiboken6==6.6.0 +shiboken6==6.6.1 # via # pyside6 # pyside6-addons @@ -441,7 +439,7 @@ superqt==0.6.1 # napari sympy==1.12 # via PartSeg (setup.cfg) -tifffile==2023.9.26 +tifffile==2023.12.9 # via # PartSeg (setup.cfg) # czifile @@ -451,7 +449,6 @@ tifffile==2023.9.26 tomli==2.0.1 # via # build - # coverage # npe2 # pyproject-hooks # pytest @@ -481,7 +478,7 @@ traitlets==5.14.0 # qtconsole typer==0.9.0 # via npe2 -typing-extensions==4.8.0 +typing-extensions==4.9.0 # via # app-model # magicgui @@ -491,7 +488,7 @@ typing-extensions==4.8.0 # pydantic # superqt # typer -tzdata==2023.3 +tzdata==2023.4 # via pandas urllib3==2.1.0 # via @@ -514,5 +511,5 @@ zipp==3.17.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -setuptools==69.0.2 +setuptools==69.0.3 # via pyinstaller diff --git a/requirements/constraints_py3.11.txt b/requirements/constraints_py3.11.txt index 50e6c2bbd..2750e73c5 100644 --- a/requirements/constraints_py3.11.txt +++ b/requirements/constraints_py3.11.txt @@ -8,7 +8,7 @@ alabaster==0.7.13 # via sphinx altgraph==0.17.4 # via pyinstaller -app-model==0.2.2 +app-model==0.2.4 # via napari appdirs==1.4.4 # via @@ -17,11 +17,11 @@ appdirs==1.4.4 # npe2 asttokens==2.4.1 # via stack-data -attrs==23.1.0 +attrs==23.2.0 # via # jsonschema # referencing -babel==2.13.1 +babel==2.14.0 # via sphinx build==1.0.3 # via npe2 @@ -42,13 +42,11 @@ cloudpickle==3.0.0 # via dask comm==0.2.0 # via ipykernel -coverage==7.3.2 - # via - # coverage - # pytest-cov +coverage==7.4.0 + # via PartSeg (setup.cfg) czifile==2019.7.2 # via PartSeg (setup.cfg) -dask==2023.12.0 +dask==2023.12.1 # via # dask # napari @@ -70,7 +68,7 @@ fonticon-fontawesome6==6.4.0 # via PartSeg (setup.cfg) freetype-py==2.4.0 # via vispy -fsspec==2023.12.0 +fsspec==2023.12.2 # via dask h5py==3.10.0 # via PartSeg (setup.cfg) @@ -80,9 +78,9 @@ hsluv==5.0.4 # via vispy idna==3.6 # via requests -imagecodecs==2023.9.18 +imagecodecs==2024.1.1 # via PartSeg (setup.cfg) -imageio==2.33.0 +imageio==2.33.1 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -91,18 +89,18 @@ imageio==2.33.0 # scikit-image imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.0 +importlib-metadata==7.0.1 # via dask in-n-out==0.1.9 # via app-model iniconfig==2.0.0 # via pytest -ipykernel==6.27.1 +ipykernel==6.28.0 # via # PartSeg (setup.cfg) # napari-console # qtconsole -ipython==8.18.1 +ipython==8.19.0 # via # PartSeg (setup.cfg) # ipykernel @@ -115,13 +113,13 @@ jinja2==3.1.2 # sphinx jsonschema==4.20.0 # via napari -jsonschema-specifications==2023.11.2 +jsonschema-specifications==2023.12.1 # via jsonschema jupyter-client==8.6.0 # via # ipykernel # qtconsole -jupyter-core==5.5.0 +jupyter-core==5.5.1 # via # ipykernel # jupyter-client @@ -138,9 +136,9 @@ local-migrator==0.1.9 # nme locket==1.0.0 # via partd -lxml==4.9.3 +lxml==5.0.0 # via PartSeg (setup.cfg) -magicgui==0.8.0 +magicgui==0.8.1 # via # PartSeg (setup.cfg) # napari @@ -220,7 +218,7 @@ packaging==23.2 # sphinx # superqt # vispy -pandas==2.1.3 +pandas==2.1.4 # via # PartSeg (setup.cfg) # napari @@ -239,9 +237,9 @@ pillow==10.1.0 # imageio # napari # scikit-image -pint==0.22 +pint==0.23 # via napari -platformdirs==4.0.0 +platformdirs==4.1.0 # via # jupyter-core # pooch @@ -249,9 +247,9 @@ pluggy==1.3.0 # via pytest pooch==1.8.0 # via scikit-image -prompt-toolkit==3.0.41 +prompt-toolkit==3.0.43 # via ipython -psutil==5.9.6 +psutil==5.9.7 # via # ipykernel # napari @@ -275,6 +273,9 @@ pydantic==1.10.13 # app-model # napari # npe2 + # pydantic-compat +pydantic-compat==0.1.2 + # via app-model pygments==2.17.2 # via # PartSeg (setup.cfg) @@ -284,9 +285,9 @@ pygments==2.17.2 # rich # sphinx # superqt -pyinstaller==6.2.0 +pyinstaller==6.3.0 # via PartSeg (setup.cfg) -pyinstaller-hooks-contrib==2023.10 +pyinstaller-hooks-contrib==2023.11 # via pyinstaller pyopengl==3.1.7 # via napari @@ -314,25 +315,22 @@ pyside2==5.13.2 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) -pyside6==6.6.0 ; python_version >= "3.10" +pyside6==6.6.1 ; python_version >= "3.10" # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) -pyside6-addons==6.6.0 +pyside6-addons==6.6.1 # via pyside6 -pyside6-essentials==6.6.0 +pyside6-essentials==6.6.1 # via # pyside6 # pyside6-addons -pytest==7.4.3 +pytest==7.4.4 # via # PartSeg (setup.cfg) - # pytest-cov # pytest-qt # pytest-timeout -pytest-cov==4.1.0 - # via PartSeg (setup.cfg) -pytest-qt==4.2.0 +pytest-qt==4.3.1 # via PartSeg (setup.cfg) pytest-timeout==2.2.0 # via PartSeg (setup.cfg) @@ -347,12 +345,12 @@ pyyaml==6.0.1 # dask # napari # npe2 -pyzmq==25.1.1 +pyzmq==25.1.2 # via # ipykernel # jupyter-client # qtconsole -qtawesome==1.2.3 +qtawesome==1.3.0 # via PartSeg (setup.cfg) qtconsole==5.5.1 # via @@ -367,7 +365,7 @@ qtpy==2.4.1 # qtawesome # qtconsole # superqt -referencing==0.31.1 +referencing==0.32.0 # via # jsonschema # jsonschema-specifications @@ -379,7 +377,7 @@ requests==2.31.0 # sphinx rich==13.7.0 # via npe2 -rpds-py==0.13.2 +rpds-py==0.16.2 # via # jsonschema # referencing @@ -392,13 +390,13 @@ scipy==1.11.4 # PartSeg (setup.cfg) # napari # scikit-image -sentry-sdk==1.38.0 +sentry-sdk==1.39.1 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) shiboken2==5.13.2 # via pyside2 -shiboken6==6.6.0 +shiboken6==6.6.1 # via # pyside6 # pyside6-addons @@ -437,7 +435,7 @@ superqt==0.6.1 # napari sympy==1.12 # via PartSeg (setup.cfg) -tifffile==2023.9.26 +tifffile==2023.12.9 # via # PartSeg (setup.cfg) # czifile @@ -470,7 +468,7 @@ traitlets==5.14.0 # qtconsole typer==0.9.0 # via npe2 -typing-extensions==4.8.0 +typing-extensions==4.9.0 # via # app-model # magicgui @@ -480,7 +478,7 @@ typing-extensions==4.8.0 # pydantic # superqt # typer -tzdata==2023.3 +tzdata==2023.4 # via pandas urllib3==2.1.0 # via @@ -503,5 +501,5 @@ zipp==3.17.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -setuptools==69.0.2 +setuptools==69.0.3 # via pyinstaller diff --git a/requirements/constraints_py3.8.txt b/requirements/constraints_py3.8.txt index 7f2c8b6e5..350e979d2 100644 --- a/requirements/constraints_py3.8.txt +++ b/requirements/constraints_py3.8.txt @@ -8,7 +8,7 @@ alabaster==0.7.13 # via sphinx altgraph==0.17.4 # via pyinstaller -app-model==0.2.2 +app-model==0.2.4 # via napari appdirs==1.4.4 # via @@ -17,11 +17,11 @@ appdirs==1.4.4 # npe2 asttokens==2.4.1 # via stack-data -attrs==23.1.0 +attrs==23.2.0 # via # jsonschema # referencing -babel==2.13.1 +babel==2.14.0 # via sphinx backcall==0.2.0 # via ipython @@ -44,10 +44,8 @@ cloudpickle==3.0.0 # via dask comm==0.2.0 # via ipykernel -coverage==7.3.2 - # via - # coverage - # pytest-cov +coverage==7.4.0 + # via PartSeg (setup.cfg) czifile==2019.7.2 # via PartSeg (setup.cfg) dask==2023.5.0 @@ -74,7 +72,7 @@ fonticon-fontawesome6==6.4.0 # via PartSeg (setup.cfg) freetype-py==2.4.0 # via vispy -fsspec==2023.12.0 +fsspec==2023.12.2 # via dask h5py==3.10.0 # via PartSeg (setup.cfg) @@ -86,7 +84,7 @@ idna==3.6 # via requests imagecodecs==2023.3.16 # via PartSeg (setup.cfg) -imageio==2.33.0 +imageio==2.33.1 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -95,7 +93,7 @@ imageio==2.33.0 # scikit-image imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.0 +importlib-metadata==7.0.1 # via # build # dask @@ -110,7 +108,7 @@ in-n-out==0.1.9 # via app-model iniconfig==2.0.0 # via pytest -ipykernel==6.27.1 +ipykernel==6.28.0 # via # PartSeg (setup.cfg) # napari-console @@ -128,13 +126,13 @@ jinja2==3.1.2 # sphinx jsonschema==4.20.0 # via napari -jsonschema-specifications==2023.11.2 +jsonschema-specifications==2023.12.1 # via jsonschema jupyter-client==8.6.0 # via # ipykernel # qtconsole -jupyter-core==5.5.0 +jupyter-core==5.5.1 # via # ipykernel # jupyter-client @@ -151,9 +149,9 @@ local-migrator==0.1.9 # nme locket==1.0.0 # via partd -lxml==4.9.3 +lxml==5.0.0 # via PartSeg (setup.cfg) -magicgui==0.8.0 +magicgui==0.8.1 # via # PartSeg (setup.cfg) # napari @@ -259,7 +257,7 @@ pint==0.21.1 # via napari pkgutil-resolve-name==1.3.10 # via jsonschema -platformdirs==4.0.0 +platformdirs==4.1.0 # via # jupyter-core # pooch @@ -267,9 +265,9 @@ pluggy==1.3.0 # via pytest pooch==1.8.0 # via scikit-image -prompt-toolkit==3.0.41 +prompt-toolkit==3.0.43 # via ipython -psutil==5.9.6 +psutil==5.9.7 # via # ipykernel # napari @@ -293,6 +291,9 @@ pydantic==1.10.13 # app-model # napari # npe2 + # pydantic-compat +pydantic-compat==0.1.2 + # via app-model pygments==2.17.2 # via # PartSeg (setup.cfg) @@ -302,9 +303,9 @@ pygments==2.17.2 # rich # sphinx # superqt -pyinstaller==6.2.0 +pyinstaller==6.3.0 # via PartSeg (setup.cfg) -pyinstaller-hooks-contrib==2023.10 +pyinstaller-hooks-contrib==2023.11 # via pyinstaller pyopengl==3.1.7 # via napari @@ -342,15 +343,12 @@ pyside6-essentials==6.3.1 # via # pyside6 # pyside6-addons -pytest==7.4.3 +pytest==7.4.4 # via # PartSeg (setup.cfg) - # pytest-cov # pytest-qt # pytest-timeout -pytest-cov==4.1.0 - # via PartSeg (setup.cfg) -pytest-qt==4.2.0 +pytest-qt==4.3.1 # via PartSeg (setup.cfg) pytest-timeout==2.2.0 # via PartSeg (setup.cfg) @@ -369,12 +367,12 @@ pyyaml==6.0.1 # dask # napari # npe2 -pyzmq==25.1.1 +pyzmq==25.1.2 # via # ipykernel # jupyter-client # qtconsole -qtawesome==1.2.3 +qtawesome==1.3.0 # via PartSeg (setup.cfg) qtconsole==5.5.1 # via @@ -389,7 +387,7 @@ qtpy==2.4.1 # qtawesome # qtconsole # superqt -referencing==0.31.1 +referencing==0.32.0 # via # jsonschema # jsonschema-specifications @@ -401,7 +399,7 @@ requests==2.31.0 # sphinx rich==13.7.0 # via npe2 -rpds-py==0.13.2 +rpds-py==0.16.2 # via # jsonschema # referencing @@ -414,7 +412,7 @@ scipy==1.10.1 # PartSeg (setup.cfg) # napari # scikit-image -sentry-sdk==1.38.0 +sentry-sdk==1.39.1 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -469,7 +467,6 @@ tifffile==2023.7.10 tomli==2.0.1 # via # build - # coverage # npe2 # pyproject-hooks # pytest @@ -499,7 +496,7 @@ traitlets==5.14.0 # qtconsole typer==0.9.0 # via npe2 -typing-extensions==4.8.0 +typing-extensions==4.9.0 # via # app-model # ipython @@ -510,7 +507,7 @@ typing-extensions==4.8.0 # rich # superqt # typer -tzdata==2023.3 +tzdata==2023.4 # via pandas urllib3==2.1.0 # via @@ -535,5 +532,5 @@ zipp==3.17.0 # importlib-resources # The following packages are considered to be unsafe in a requirements file: -setuptools==69.0.2 +setuptools==69.0.3 # via pyinstaller diff --git a/requirements/constraints_py3.9.txt b/requirements/constraints_py3.9.txt index 8d3f44005..623ddbf9c 100644 --- a/requirements/constraints_py3.9.txt +++ b/requirements/constraints_py3.9.txt @@ -8,7 +8,7 @@ alabaster==0.7.13 # via sphinx altgraph==0.17.4 # via pyinstaller -app-model==0.2.2 +app-model==0.2.4 # via napari appdirs==1.4.4 # via @@ -17,11 +17,11 @@ appdirs==1.4.4 # npe2 asttokens==2.4.1 # via stack-data -attrs==23.1.0 +attrs==23.2.0 # via # jsonschema # referencing -babel==2.13.1 +babel==2.14.0 # via sphinx build==1.0.3 # via npe2 @@ -42,13 +42,11 @@ cloudpickle==3.0.0 # via dask comm==0.2.0 # via ipykernel -coverage==7.3.2 - # via - # coverage - # pytest-cov +coverage==7.4.0 + # via PartSeg (setup.cfg) czifile==2019.7.2 # via PartSeg (setup.cfg) -dask==2023.12.0 +dask==2023.12.1 # via # dask # napari @@ -74,7 +72,7 @@ fonticon-fontawesome6==6.4.0 # via PartSeg (setup.cfg) freetype-py==2.4.0 # via vispy -fsspec==2023.12.0 +fsspec==2023.12.2 # via dask h5py==3.10.0 # via PartSeg (setup.cfg) @@ -84,9 +82,9 @@ hsluv==5.0.4 # via vispy idna==3.6 # via requests -imagecodecs==2023.9.18 +imagecodecs==2024.1.1 # via PartSeg (setup.cfg) -imageio==2.33.0 +imageio==2.33.1 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -95,7 +93,7 @@ imageio==2.33.0 # scikit-image imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.0 +importlib-metadata==7.0.1 # via # build # dask @@ -106,7 +104,7 @@ in-n-out==0.1.9 # via app-model iniconfig==2.0.0 # via pytest -ipykernel==6.27.1 +ipykernel==6.28.0 # via # PartSeg (setup.cfg) # napari-console @@ -124,13 +122,13 @@ jinja2==3.1.2 # sphinx jsonschema==4.20.0 # via napari -jsonschema-specifications==2023.11.2 +jsonschema-specifications==2023.12.1 # via jsonschema jupyter-client==8.6.0 # via # ipykernel # qtconsole -jupyter-core==5.5.0 +jupyter-core==5.5.1 # via # ipykernel # jupyter-client @@ -147,9 +145,9 @@ local-migrator==0.1.9 # nme locket==1.0.0 # via partd -lxml==4.9.3 +lxml==5.0.0 # via PartSeg (setup.cfg) -magicgui==0.8.0 +magicgui==0.8.1 # via # PartSeg (setup.cfg) # napari @@ -229,7 +227,7 @@ packaging==23.2 # sphinx # superqt # vispy -pandas==2.1.3 +pandas==2.1.4 # via # PartSeg (setup.cfg) # napari @@ -248,9 +246,9 @@ pillow==10.1.0 # imageio # napari # scikit-image -pint==0.22 +pint==0.23 # via napari -platformdirs==4.0.0 +platformdirs==4.1.0 # via # jupyter-core # pooch @@ -258,9 +256,9 @@ pluggy==1.3.0 # via pytest pooch==1.8.0 # via scikit-image -prompt-toolkit==3.0.41 +prompt-toolkit==3.0.43 # via ipython -psutil==5.9.6 +psutil==5.9.7 # via # ipykernel # napari @@ -284,6 +282,9 @@ pydantic==1.10.13 # app-model # napari # npe2 + # pydantic-compat +pydantic-compat==0.1.2 + # via app-model pygments==2.17.2 # via # PartSeg (setup.cfg) @@ -293,9 +294,9 @@ pygments==2.17.2 # rich # sphinx # superqt -pyinstaller==6.2.0 +pyinstaller==6.3.0 # via PartSeg (setup.cfg) -pyinstaller-hooks-contrib==2023.10 +pyinstaller-hooks-contrib==2023.11 # via pyinstaller pyopengl==3.1.7 # via napari @@ -333,15 +334,12 @@ pyside6-essentials==6.3.1 # via # pyside6 # pyside6-addons -pytest==7.4.3 +pytest==7.4.4 # via # PartSeg (setup.cfg) - # pytest-cov # pytest-qt # pytest-timeout -pytest-cov==4.1.0 - # via PartSeg (setup.cfg) -pytest-qt==4.2.0 +pytest-qt==4.3.1 # via PartSeg (setup.cfg) pytest-timeout==2.2.0 # via PartSeg (setup.cfg) @@ -356,12 +354,12 @@ pyyaml==6.0.1 # dask # napari # npe2 -pyzmq==25.1.1 +pyzmq==25.1.2 # via # ipykernel # jupyter-client # qtconsole -qtawesome==1.2.3 +qtawesome==1.3.0 # via PartSeg (setup.cfg) qtconsole==5.5.1 # via @@ -376,7 +374,7 @@ qtpy==2.4.1 # qtawesome # qtconsole # superqt -referencing==0.31.1 +referencing==0.32.0 # via # jsonschema # jsonschema-specifications @@ -388,7 +386,7 @@ requests==2.31.0 # sphinx rich==13.7.0 # via npe2 -rpds-py==0.13.2 +rpds-py==0.16.2 # via # jsonschema # referencing @@ -401,7 +399,7 @@ scipy==1.11.4 # PartSeg (setup.cfg) # napari # scikit-image -sentry-sdk==1.38.0 +sentry-sdk==1.39.1 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -446,7 +444,7 @@ superqt==0.6.1 # napari sympy==1.12 # via PartSeg (setup.cfg) -tifffile==2023.9.26 +tifffile==2023.12.9 # via # PartSeg (setup.cfg) # czifile @@ -456,7 +454,6 @@ tifffile==2023.9.26 tomli==2.0.1 # via # build - # coverage # npe2 # pyproject-hooks # pytest @@ -486,7 +483,7 @@ traitlets==5.14.0 # qtconsole typer==0.9.0 # via npe2 -typing-extensions==4.8.0 +typing-extensions==4.9.0 # via # app-model # ipython @@ -497,7 +494,7 @@ typing-extensions==4.8.0 # pydantic # superqt # typer -tzdata==2023.3 +tzdata==2023.4 # via pandas urllib3==2.1.0 # via @@ -520,5 +517,5 @@ zipp==3.17.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -setuptools==69.0.2 +setuptools==69.0.3 # via pyinstaller From b003a95733d955d5515cfe51cae537184d3f8f53 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:21:20 +0100 Subject: [PATCH 16/19] ci: [pre-commit.ci] pre-commit autoupdate (#1059) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.1.13](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.9...v0.1.13) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Grzegorz Bokota --- .pre-commit-config.yaml | 2 +- package/tests/test_PartSegCore/test_io.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d91fd7320..fc10a5186 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: - id: setup-cfg-fmt args: ["--include-version-classifiers", "--max-py-version", "3.11"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.9 + rev: v0.1.14 hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade diff --git a/package/tests/test_PartSegCore/test_io.py b/package/tests/test_PartSegCore/test_io.py index effe75e44..b61be80b2 100644 --- a/package/tests/test_PartSegCore/test_io.py +++ b/package/tests/test_PartSegCore/test_io.py @@ -234,7 +234,7 @@ def perform_roi_info_history_test( alt2[alt2 > 0] = i + 5 roi_info2 = ROIInfo( roi=project.roi_info.roi, - annotations={i: f"a{i}_{j}" for j in range(1, 5)}, + annotations={j: f"a{i}_{j}" for j in range(1, 5)}, alternative={f"test{i}": alt2}, ) history.append( @@ -257,7 +257,7 @@ def perform_roi_info_history_test( assert set(roi_info3.alternative) == {f"test{i}"} assert np.all(roi_info3.alternative[f"test{i}"][alt1 > 0] == i + 5) assert np.all(roi_info3.alternative[f"test{i}"][alt1 == 0] == 0) - assert roi_info3.annotations == {i: f"a{i}_{j}" for j in range(1, 5)} + assert roi_info3.annotations == {j: f"a{i}_{j}" for j in range(1, 5)} assert proj2.history[i].roi_extraction_parameters == {"algorithm_name": f"task_{i}", "values": {"a": 1}} From 51f8a371fa4b86cedac8f1a46e9c95f4a2834e9f Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Mon, 22 Jan 2024 18:51:44 +0100 Subject: [PATCH 17/19] docs: Allow to use newer release of build docs dependencies (#1057) ## Summary by CodeRabbit - **Documentation** - Updated documentation build process to support Python 3.11 and Ubuntu 22.04. - Improved documentation dependencies for better compatibility and performance. --- .github/workflows/upgrade-dependencies.yml | 1 + .readthedocs.yml | 11 +- azure-pipelines.yml | 2 +- .../PartSeg/common_gui/universal_gui_part.py | 2 +- requirements/constraints_py3.11_docs.txt | 482 ++++++++++++++++++ setup.cfg | 6 +- tox.ini | 2 +- 7 files changed, 495 insertions(+), 11 deletions(-) create mode 100644 requirements/constraints_py3.11_docs.txt diff --git a/.github/workflows/upgrade-dependencies.yml b/.github/workflows/upgrade-dependencies.yml index a5dbd8658..3e8ba7541 100644 --- a/.github/workflows/upgrade-dependencies.yml +++ b/.github/workflows/upgrade-dependencies.yml @@ -53,6 +53,7 @@ jobs: python${pyv} -m pip install -U pip pip-tools python${pyv} -m piptools compile --upgrade -o requirements/constraints_py${pyv}.txt setup.cfg requirements/version_denylist.txt ${flags} done + python3.11 -m piptools compile --upgrade -o requirements/constraints_py3.11_docs.txt setup.cfg requirements/version_denylist.txt --allow-unsafe --strip-extras --extra docs --extra pyqt6 # END PYTHON DEPENDENCIES - name: Check updated packages diff --git a/.readthedocs.yml b/.readthedocs.yml index 07f499679..3c20789fb 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -17,15 +17,16 @@ sphinx: formats: all build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: - python: "3.9" + python: "3.11" # Optionally set the version of Python and requirements required to build your docs python: install: - - requirements: requirements/constraints_py3.9.txt - - requirements: requirements/requirements_dev.txt + - requirements: requirements/constraints_py3.11_docs.txt - method: pip - path: .[docs] + path: . + extra_requirements: + - docs diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 44c68fdca..eb9d61640 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -74,7 +74,7 @@ stages: variables: pip_cache_dir: $(Pipeline.Workspace)/.pip steps: - - {task: UsePythonVersion@0, inputs: {versionSpec: '3.9', architecture: x64}} + - {task: UsePythonVersion@0, inputs: {versionSpec: '3.11', architecture: x64}} - template: .azure-pipelines/pip_cache.yaml parameters: key: doc | requirements/constraints_py3.9.txt | "$(PY)" diff --git a/package/PartSeg/common_gui/universal_gui_part.py b/package/PartSeg/common_gui/universal_gui_part.py index 3c012db23..4de04142b 100644 --- a/package/PartSeg/common_gui/universal_gui_part.py +++ b/package/PartSeg/common_gui/universal_gui_part.py @@ -83,7 +83,7 @@ class EnumComboBox(QEnumComboBox): For proper showing labels overload the ``__str__`` function of given :py:class:`enum.Enum` """ - def __init__(self, enum: type(EnumType), parent=None): + def __init__(self, enum, parent=None): warnings.warn( "EnumComboBox is deprecated, use superqt.QEnumComboBox instead", category=DeprecationWarning, stacklevel=2 ) diff --git a/requirements/constraints_py3.11_docs.txt b/requirements/constraints_py3.11_docs.txt new file mode 100644 index 000000000..7b6519e7e --- /dev/null +++ b/requirements/constraints_py3.11_docs.txt @@ -0,0 +1,482 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --extra=docs --extra=pyqt6 --output-file=requirements/constraints_py3.11_docs.txt --strip-extras requirements/version_denylist.txt setup.cfg +# +alabaster==0.7.16 + # via sphinx +app-model==0.2.4 + # via napari +appdirs==1.4.4 + # via + # PartSeg (setup.cfg) + # napari + # npe2 +asttokens==2.4.1 + # via stack-data +attrs==23.2.0 + # via + # jsonschema + # referencing +autodoc-pydantic==1.9.0 + # via PartSeg (setup.cfg) +babel==2.14.0 + # via sphinx +build==1.0.3 + # via npe2 +cachey==0.2.1 + # via napari +certifi==2023.11.17 + # via + # napari + # requests + # sentry-sdk +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via + # dask + # typer +cloudpickle==3.0.0 + # via dask +comm==0.2.1 + # via ipykernel +czifile==2019.7.2 + # via PartSeg (setup.cfg) +dask==2024.1.0 + # via + # dask + # napari +debugpy==1.8.0 + # via ipykernel +decorator==5.1.1 + # via ipython +defusedxml==0.7.1 + # via PartSeg (setup.cfg) +docstring-parser==0.15 + # via magicgui +docutils==0.20.1 + # via + # sphinx + # sphinx-qt-documentation +et-xmlfile==1.1.0 + # via openpyxl +executing==2.0.1 + # via stack-data +fonticon-fontawesome6==6.4.0 + # via PartSeg (setup.cfg) +freetype-py==2.4.0 + # via vispy +fsspec==2023.12.2 + # via dask +h5py==3.10.0 + # via PartSeg (setup.cfg) +heapdict==1.0.1 + # via cachey +hsluv==5.0.4 + # via vispy +idna==3.6 + # via requests +imagecodecs==2024.1.1 + # via PartSeg (setup.cfg) +imageio==2.33.1 + # via + # -r requirements/version_denylist.txt + # PartSeg (setup.cfg) + # napari + # napari-svg + # scikit-image +imagesize==1.4.1 + # via sphinx +importlib-metadata==7.0.1 + # via dask +in-n-out==0.1.9 + # via app-model +ipykernel==6.29.0 + # via + # PartSeg (setup.cfg) + # napari-console + # qtconsole +ipython==8.20.0 + # via + # PartSeg (setup.cfg) + # ipykernel + # napari-console +jedi==0.19.1 + # via ipython +jinja2==3.1.3 + # via + # numpydoc + # sphinx +jsonschema==4.21.1 + # via napari +jsonschema-specifications==2023.12.1 + # via jsonschema +jupyter-client==8.6.0 + # via + # ipykernel + # qtconsole +jupyter-core==5.7.1 + # via + # ipykernel + # jupyter-client + # qtconsole +kiwisolver==1.4.5 + # via vispy +lazy-loader==0.3 + # via + # napari + # scikit-image +local-migrator==0.1.9 + # via + # PartSeg (setup.cfg) + # nme +locket==1.0.0 + # via partd +magicgui==0.8.1 + # via + # PartSeg (setup.cfg) + # napari +mahotas==1.4.13 + # via PartSeg (setup.cfg) +markdown-it-py==3.0.0 + # via rich +markupsafe==2.1.4 + # via jinja2 +matplotlib-inline==0.1.6 + # via + # ipykernel + # ipython +mdurl==0.1.2 + # via markdown-it-py +mpmath==1.3.0 + # via sympy +mypy-extensions==1.0.0 + # via psygnal +napari==0.4.19rc3 + # via PartSeg (setup.cfg) +napari-console==0.0.9 + # via napari +napari-plugin-engine==0.2.0 + # via + # napari + # napari-svg +napari-svg==0.1.10 + # via napari +nest-asyncio==1.6.0 + # via ipykernel +networkx==3.2.1 + # via scikit-image +nme==0.1.8 + # via PartSeg (setup.cfg) +npe2==0.7.3 + # via + # -r requirements/version_denylist.txt + # napari +numpy==1.26.3 + # via + # PartSeg (setup.cfg) + # czifile + # dask + # h5py + # imagecodecs + # imageio + # mahotas + # napari + # napari-svg + # oiffile + # pandas + # partsegcore-compiled-backend + # scikit-image + # scipy + # tifffile + # vispy +numpydoc==1.6.0 + # via napari +oiffile==2023.8.30 + # via PartSeg (setup.cfg) +openpyxl==3.1.2 + # via PartSeg (setup.cfg) +packaging==23.2 + # via + # PartSeg (setup.cfg) + # build + # dask + # ipykernel + # local-migrator + # pooch + # qtconsole + # qtpy + # scikit-image + # sphinx + # superqt + # vispy +pandas==2.2.0 + # via + # PartSeg (setup.cfg) + # napari +parso==0.8.3 + # via jedi +partd==1.4.1 + # via dask +partsegcore-compiled-backend==0.15.2 + # via PartSeg (setup.cfg) +partsegdata==0.10.0 + # via PartSeg (setup.cfg) +pexpect==4.9.0 + # via ipython +pillow==10.2.0 + # via + # imageio + # napari + # scikit-image +pint==0.23 + # via napari +platformdirs==4.1.0 + # via + # jupyter-core + # pooch +pooch==1.8.0 + # via scikit-image +prompt-toolkit==3.0.43 + # via ipython +psutil==5.9.8 + # via + # ipykernel + # napari +psygnal==0.9.5 + # via + # PartSeg (setup.cfg) + # app-model + # magicgui + # napari + # npe2 +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.2 + # via stack-data +pyconify==0.1.6 + # via superqt +pydantic==1.10.14 + # via + # -r requirements/version_denylist.txt + # PartSeg (setup.cfg) + # app-model + # autodoc-pydantic + # napari + # npe2 + # pydantic-compat +pydantic-compat==0.1.2 + # via app-model +pygments==2.17.2 + # via + # PartSeg (setup.cfg) + # ipython + # napari + # qtconsole + # rich + # sphinx + # superqt +pyopengl==3.1.7 + # via napari +pyproject-hooks==1.0.0 + # via build +pyqt5==5.15.10 + # via -r requirements/version_denylist.txt +pyqt5-qt5==5.15.2 + # via pyqt5 +pyqt5-sip==12.13.0 + # via + # -r requirements/version_denylist.txt + # pyqt5 +pyqt6==6.6.1 + # via PartSeg (setup.cfg) +pyqt6-qt6==6.6.1 + # via pyqt6 +pyqt6-sip==13.6.0 + # via pyqt6 +pyside2==5.13.2 + # via -r requirements/version_denylist.txt +pyside6==6.6.1 ; python_version >= "3.10" + # via -r requirements/version_denylist.txt +pyside6-addons==6.6.1 + # via pyside6 +pyside6-essentials==6.6.1 + # via + # pyside6 + # pyside6-addons +python-dateutil==2.8.2 + # via + # jupyter-client + # pandas +pytz==2023.3.post1 + # via pandas +pyyaml==6.0.1 + # via + # dask + # napari + # npe2 +pyzmq==25.1.2 + # via + # ipykernel + # jupyter-client + # qtconsole +qtawesome==1.3.0 + # via PartSeg (setup.cfg) +qtconsole==5.5.1 + # via + # PartSeg (setup.cfg) + # napari-console +qtpy==2.4.1 + # via + # PartSeg (setup.cfg) + # magicgui + # napari + # napari-console + # qtawesome + # qtconsole + # superqt +referencing==0.32.1 + # via + # jsonschema + # jsonschema-specifications +requests==2.31.0 + # via + # PartSeg (setup.cfg) + # pooch + # pyconify + # sphinx +rich==13.7.0 + # via npe2 +rpds-py==0.17.1 + # via + # jsonschema + # referencing +scikit-image==0.22.0 + # via + # napari + # scikit-image +scipy==1.12.0 + # via + # PartSeg (setup.cfg) + # napari + # scikit-image +sentry-sdk==1.39.2 + # via + # -r requirements/version_denylist.txt + # PartSeg (setup.cfg) +shiboken2==5.13.2 + # via pyside2 +shiboken6==6.6.1 + # via + # pyside6 + # pyside6-addons + # pyside6-essentials +simpleitk==2.3.1 + # via PartSeg (setup.cfg) +six==1.16.0 + # via + # PartSeg (setup.cfg) + # asttokens + # python-dateutil +snowballstemmer==2.2.0 + # via sphinx +sphinx==7.2.6 + # via + # PartSeg (setup.cfg) + # autodoc-pydantic + # numpydoc + # sphinx-autodoc-typehints + # sphinx-qt-documentation +sphinx-autodoc-typehints==1.25.2 + # via PartSeg (setup.cfg) +sphinx-qt-documentation==0.4.1 + # via PartSeg (setup.cfg) +sphinxcontrib-applehelp==1.0.8 + # via sphinx +sphinxcontrib-devhelp==1.0.6 + # via sphinx +sphinxcontrib-htmlhelp==2.0.5 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.7 + # via sphinx +sphinxcontrib-serializinghtml==1.1.10 + # via sphinx +stack-data==0.6.3 + # via ipython +superqt==0.6.1 + # via + # PartSeg (setup.cfg) + # magicgui + # napari +sympy==1.12 + # via PartSeg (setup.cfg) +tabulate==0.9.0 + # via numpydoc +tifffile==2023.12.9 + # via + # PartSeg (setup.cfg) + # czifile + # napari + # oiffile + # scikit-image +tomli-w==1.0.0 + # via npe2 +toolz==0.12.0 + # via + # dask + # napari + # partd +tornado==6.4 + # via + # ipykernel + # jupyter-client +tqdm==4.66.1 + # via napari +traceback-with-variables==2.0.4 + # via PartSeg (setup.cfg) +traitlets==5.14.1 + # via + # comm + # ipykernel + # ipython + # jupyter-client + # jupyter-core + # matplotlib-inline + # qtconsole +typer==0.9.0 + # via npe2 +typing-extensions==4.9.0 + # via + # app-model + # magicgui + # napari + # pint + # psygnal + # pydantic + # superqt + # typer +tzdata==2023.4 + # via pandas +urllib3==2.1.0 + # via + # requests + # sentry-sdk +vispy==0.14.1 + # via + # PartSeg (setup.cfg) + # napari + # napari-svg +wcwidth==0.2.13 + # via prompt-toolkit +wrapt==1.16.0 + # via napari +xlrd==2.0.1 + # via PartSeg (setup.cfg) +xlsxwriter==3.1.9 + # via PartSeg (setup.cfg) +zipp==3.17.0 + # via importlib-metadata diff --git a/setup.cfg b/setup.cfg index cdebd7b39..21a86175a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -98,10 +98,10 @@ all = PyOpenGL-accelerate>=3.1.5 PyQt5!=5.15.0,>=5.12.3 docs = - autodoc-pydantic==1.7.2 + autodoc-pydantic sphinx!=3.0.0,!=3.5.0 - sphinx-autodoc-typehints==1.18.3 - sphinx-qt-documentation==0.4 + sphinx-autodoc-typehints + sphinx-qt-documentation pyinstaller = %(all)s PyInstaller diff --git a/tox.ini b/tox.ini index aa65f5893..8daedc412 100644 --- a/tox.ini +++ b/tox.ini @@ -122,7 +122,7 @@ commands = [testenv:docs] deps = {[testenv]deps} - -rrequirements/constraints_py3.9.txt + -rrequirements/constraints_py3.11_docs.txt allowlist_externals = make tar From a004be5133c519fcaad82eace07e09a6cfd381d0 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Tue, 23 Jan 2024 01:47:00 +0100 Subject: [PATCH 18/19] test: [Automatic] Constraints upgrades: `ipykernel`, `numpy`, `pandas`, `partsegcore-compiled-backend`, `pydantic`, `scipy`, `sentry-sdk` (#1058) This PR is automatically created and updated by PartSeg GitHub action cron to keep bundle dependencies modules up to date. The updated packages are: * alabaster * comm * dask * ipykernel * jinja2 * jsonschema * jupyter-core * lxml * markupsafe * nest-asyncio * numpy * pandas * partsegcore-compiled-backend * pillow * psutil * pydantic * pyinstaller-hooks-contrib * referencing * rpds-py * scipy * sentry-sdk * sphinxcontrib-applehelp * sphinxcontrib-devhelp * sphinxcontrib-htmlhelp * sphinxcontrib-qthelp * sphinxcontrib-serializinghtml * traitlets * wcwidth ## Summary by CodeRabbit - **Documentation** - Updated software dependencies across various Python versions for enhanced compatibility and performance. - **New Features** - Upgraded key packages to their latest versions, ensuring users benefit from the latest improvements and features. - **Bug Fixes** - Addressed potential security vulnerabilities and bugs by updating outdated packages. Please note that these updates may improve performance, security, and stability of the application. Users are encouraged to update to the latest version to take advantage of these improvements. --------- Co-authored-by: Czaki --- requirements/constraints_py3.10.txt | 63 +++++++++++++++-------------- requirements/constraints_py3.11.txt | 63 +++++++++++++++-------------- requirements/constraints_py3.8.txt | 40 +++++++++--------- requirements/constraints_py3.9.txt | 62 +++++++++++++++------------- 4 files changed, 121 insertions(+), 107 deletions(-) diff --git a/requirements/constraints_py3.10.txt b/requirements/constraints_py3.10.txt index ed29f2fa5..9400dc0be 100644 --- a/requirements/constraints_py3.10.txt +++ b/requirements/constraints_py3.10.txt @@ -4,7 +4,7 @@ # # pip-compile --allow-unsafe --extra=pyinstaller --extra=pyqt5 --extra=pyqt6 --extra=pyside2 --extra=pyside6 --extra=test --output-file=requirements/constraints_py3.10.txt --strip-extras requirements/version_denylist.txt setup.cfg # -alabaster==0.7.13 +alabaster==0.7.16 # via sphinx altgraph==0.17.4 # via pyinstaller @@ -40,13 +40,13 @@ click==8.1.7 # typer cloudpickle==3.0.0 # via dask -comm==0.2.0 +comm==0.2.1 # via ipykernel coverage==7.4.0 # via PartSeg (setup.cfg) czifile==2019.7.2 # via PartSeg (setup.cfg) -dask==2023.12.1 +dask==2024.1.0 # via # dask # napari @@ -99,23 +99,23 @@ in-n-out==0.1.9 # via app-model iniconfig==2.0.0 # via pytest -ipykernel==6.28.0 +ipykernel==6.29.0 # via # PartSeg (setup.cfg) # napari-console # qtconsole -ipython==8.19.0 +ipython==8.20.0 # via # PartSeg (setup.cfg) # ipykernel # napari-console jedi==0.19.1 # via ipython -jinja2==3.1.2 +jinja2==3.1.3 # via # numpydoc # sphinx -jsonschema==4.20.0 +jsonschema==4.21.1 # via napari jsonschema-specifications==2023.12.1 # via jsonschema @@ -123,7 +123,7 @@ jupyter-client==8.6.0 # via # ipykernel # qtconsole -jupyter-core==5.5.1 +jupyter-core==5.7.1 # via # ipykernel # jupyter-client @@ -140,7 +140,7 @@ local-migrator==0.1.9 # nme locket==1.0.0 # via partd -lxml==5.0.0 +lxml==5.1.0 # via PartSeg (setup.cfg) magicgui==0.8.1 # via @@ -150,7 +150,7 @@ mahotas==1.4.13 # via PartSeg (setup.cfg) markdown-it-py==3.0.0 # via rich -markupsafe==2.1.3 +markupsafe==2.1.4 # via jinja2 matplotlib-inline==0.1.6 # via @@ -172,7 +172,7 @@ napari-plugin-engine==0.2.0 # napari-svg napari-svg==0.1.10 # via napari -nest-asyncio==1.5.8 +nest-asyncio==1.6.0 # via ipykernel networkx==3.2.1 # via scikit-image @@ -182,7 +182,7 @@ npe2==0.7.3 # via # -r requirements/version_denylist.txt # napari -numpy==1.26.2 +numpy==1.26.3 # via # PartSeg (setup.cfg) # czifile @@ -215,6 +215,7 @@ packaging==23.2 # local-migrator # pooch # pyinstaller + # pyinstaller-hooks-contrib # pytest # qtconsole # qtpy @@ -222,7 +223,7 @@ packaging==23.2 # sphinx # superqt # vispy -pandas==2.1.4 +pandas==2.2.0 # via # PartSeg (setup.cfg) # napari @@ -230,13 +231,13 @@ parso==0.8.3 # via jedi partd==1.4.1 # via dask -partsegcore-compiled-backend==0.15.1 +partsegcore-compiled-backend==0.15.2 # via PartSeg (setup.cfg) partsegdata==0.10.0 # via PartSeg (setup.cfg) pexpect==4.9.0 # via ipython -pillow==10.1.0 +pillow==10.2.0 # via # imageio # napari @@ -253,7 +254,7 @@ pooch==1.8.0 # via scikit-image prompt-toolkit==3.0.43 # via ipython -psutil==5.9.7 +psutil==5.9.8 # via # ipykernel # napari @@ -270,7 +271,7 @@ pure-eval==0.2.2 # via stack-data pyconify==0.1.6 # via superqt -pydantic==1.10.13 +pydantic==1.10.14 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -291,7 +292,7 @@ pygments==2.17.2 # superqt pyinstaller==6.3.0 # via PartSeg (setup.cfg) -pyinstaller-hooks-contrib==2023.11 +pyinstaller-hooks-contrib==2024.0 # via pyinstaller pyopengl==3.1.7 # via napari @@ -369,7 +370,7 @@ qtpy==2.4.1 # qtawesome # qtconsole # superqt -referencing==0.32.0 +referencing==0.32.1 # via # jsonschema # jsonschema-specifications @@ -381,7 +382,7 @@ requests==2.31.0 # sphinx rich==13.7.0 # via npe2 -rpds-py==0.16.2 +rpds-py==0.17.1 # via # jsonschema # referencing @@ -389,12 +390,12 @@ scikit-image==0.22.0 # via # PartSeg (setup.cfg) # napari -scipy==1.11.4 +scipy==1.12.0 # via # PartSeg (setup.cfg) # napari # scikit-image -sentry-sdk==1.39.1 +sentry-sdk==1.39.2 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -418,17 +419,17 @@ sphinx==4.5.0 # via # napari # numpydoc -sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-applehelp==1.0.8 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==1.0.6 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.0.5 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==1.0.7 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==1.1.10 # via sphinx stack-data==0.6.3 # via ipython @@ -467,7 +468,7 @@ tqdm==4.66.1 # via napari traceback-with-variables==2.0.4 # via PartSeg (setup.cfg) -traitlets==5.14.0 +traitlets==5.14.1 # via # comm # ipykernel @@ -499,7 +500,7 @@ vispy==0.12.2 # PartSeg (setup.cfg) # napari # napari-svg -wcwidth==0.2.12 +wcwidth==0.2.13 # via prompt-toolkit wrapt==1.16.0 # via napari @@ -512,4 +513,6 @@ zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: setuptools==69.0.3 - # via pyinstaller + # via + # pyinstaller + # pyinstaller-hooks-contrib diff --git a/requirements/constraints_py3.11.txt b/requirements/constraints_py3.11.txt index 2750e73c5..a90e0a8ad 100644 --- a/requirements/constraints_py3.11.txt +++ b/requirements/constraints_py3.11.txt @@ -4,7 +4,7 @@ # # pip-compile --allow-unsafe --extra=pyinstaller --extra=pyqt5 --extra=pyqt6 --extra=pyside2 --extra=pyside6 --extra=test --output-file=requirements/constraints_py3.11.txt --strip-extras requirements/version_denylist.txt setup.cfg # -alabaster==0.7.13 +alabaster==0.7.16 # via sphinx altgraph==0.17.4 # via pyinstaller @@ -40,13 +40,13 @@ click==8.1.7 # typer cloudpickle==3.0.0 # via dask -comm==0.2.0 +comm==0.2.1 # via ipykernel coverage==7.4.0 # via PartSeg (setup.cfg) czifile==2019.7.2 # via PartSeg (setup.cfg) -dask==2023.12.1 +dask==2024.1.0 # via # dask # napari @@ -95,23 +95,23 @@ in-n-out==0.1.9 # via app-model iniconfig==2.0.0 # via pytest -ipykernel==6.28.0 +ipykernel==6.29.0 # via # PartSeg (setup.cfg) # napari-console # qtconsole -ipython==8.19.0 +ipython==8.20.0 # via # PartSeg (setup.cfg) # ipykernel # napari-console jedi==0.19.1 # via ipython -jinja2==3.1.2 +jinja2==3.1.3 # via # numpydoc # sphinx -jsonschema==4.20.0 +jsonschema==4.21.1 # via napari jsonschema-specifications==2023.12.1 # via jsonschema @@ -119,7 +119,7 @@ jupyter-client==8.6.0 # via # ipykernel # qtconsole -jupyter-core==5.5.1 +jupyter-core==5.7.1 # via # ipykernel # jupyter-client @@ -136,7 +136,7 @@ local-migrator==0.1.9 # nme locket==1.0.0 # via partd -lxml==5.0.0 +lxml==5.1.0 # via PartSeg (setup.cfg) magicgui==0.8.1 # via @@ -146,7 +146,7 @@ mahotas==1.4.13 # via PartSeg (setup.cfg) markdown-it-py==3.0.0 # via rich -markupsafe==2.1.3 +markupsafe==2.1.4 # via jinja2 matplotlib-inline==0.1.6 # via @@ -168,7 +168,7 @@ napari-plugin-engine==0.2.0 # napari-svg napari-svg==0.1.10 # via napari -nest-asyncio==1.5.8 +nest-asyncio==1.6.0 # via ipykernel networkx==3.2.1 # via scikit-image @@ -178,7 +178,7 @@ npe2==0.7.3 # via # -r requirements/version_denylist.txt # napari -numpy==1.26.2 +numpy==1.26.3 # via # PartSeg (setup.cfg) # czifile @@ -211,6 +211,7 @@ packaging==23.2 # local-migrator # pooch # pyinstaller + # pyinstaller-hooks-contrib # pytest # qtconsole # qtpy @@ -218,7 +219,7 @@ packaging==23.2 # sphinx # superqt # vispy -pandas==2.1.4 +pandas==2.2.0 # via # PartSeg (setup.cfg) # napari @@ -226,13 +227,13 @@ parso==0.8.3 # via jedi partd==1.4.1 # via dask -partsegcore-compiled-backend==0.15.1 +partsegcore-compiled-backend==0.15.2 # via PartSeg (setup.cfg) partsegdata==0.10.0 # via PartSeg (setup.cfg) pexpect==4.9.0 # via ipython -pillow==10.1.0 +pillow==10.2.0 # via # imageio # napari @@ -249,7 +250,7 @@ pooch==1.8.0 # via scikit-image prompt-toolkit==3.0.43 # via ipython -psutil==5.9.7 +psutil==5.9.8 # via # ipykernel # napari @@ -266,7 +267,7 @@ pure-eval==0.2.2 # via stack-data pyconify==0.1.6 # via superqt -pydantic==1.10.13 +pydantic==1.10.14 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -287,7 +288,7 @@ pygments==2.17.2 # superqt pyinstaller==6.3.0 # via PartSeg (setup.cfg) -pyinstaller-hooks-contrib==2023.11 +pyinstaller-hooks-contrib==2024.0 # via pyinstaller pyopengl==3.1.7 # via napari @@ -365,7 +366,7 @@ qtpy==2.4.1 # qtawesome # qtconsole # superqt -referencing==0.32.0 +referencing==0.32.1 # via # jsonschema # jsonschema-specifications @@ -377,7 +378,7 @@ requests==2.31.0 # sphinx rich==13.7.0 # via npe2 -rpds-py==0.16.2 +rpds-py==0.17.1 # via # jsonschema # referencing @@ -385,12 +386,12 @@ scikit-image==0.22.0 # via # PartSeg (setup.cfg) # napari -scipy==1.11.4 +scipy==1.12.0 # via # PartSeg (setup.cfg) # napari # scikit-image -sentry-sdk==1.39.1 +sentry-sdk==1.39.2 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -414,17 +415,17 @@ sphinx==4.5.0 # via # napari # numpydoc -sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-applehelp==1.0.8 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==1.0.6 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.0.5 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==1.0.7 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==1.1.10 # via sphinx stack-data==0.6.3 # via ipython @@ -457,7 +458,7 @@ tqdm==4.66.1 # via napari traceback-with-variables==2.0.4 # via PartSeg (setup.cfg) -traitlets==5.14.0 +traitlets==5.14.1 # via # comm # ipykernel @@ -489,7 +490,7 @@ vispy==0.12.2 # PartSeg (setup.cfg) # napari # napari-svg -wcwidth==0.2.12 +wcwidth==0.2.13 # via prompt-toolkit wrapt==1.16.0 # via napari @@ -502,4 +503,6 @@ zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: setuptools==69.0.3 - # via pyinstaller + # via + # pyinstaller + # pyinstaller-hooks-contrib diff --git a/requirements/constraints_py3.8.txt b/requirements/constraints_py3.8.txt index 350e979d2..ab1b43ff6 100644 --- a/requirements/constraints_py3.8.txt +++ b/requirements/constraints_py3.8.txt @@ -42,7 +42,7 @@ click==8.1.7 # typer cloudpickle==3.0.0 # via dask -comm==0.2.0 +comm==0.2.1 # via ipykernel coverage==7.4.0 # via PartSeg (setup.cfg) @@ -99,6 +99,7 @@ importlib-metadata==7.0.1 # dask # jupyter-client # pyinstaller + # pyinstaller-hooks-contrib # sphinx importlib-resources==6.1.1 # via @@ -108,7 +109,7 @@ in-n-out==0.1.9 # via app-model iniconfig==2.0.0 # via pytest -ipykernel==6.28.0 +ipykernel==6.29.0 # via # PartSeg (setup.cfg) # napari-console @@ -120,11 +121,11 @@ ipython==8.12.3 # napari-console jedi==0.19.1 # via ipython -jinja2==3.1.2 +jinja2==3.1.3 # via # numpydoc # sphinx -jsonschema==4.20.0 +jsonschema==4.21.1 # via napari jsonschema-specifications==2023.12.1 # via jsonschema @@ -132,7 +133,7 @@ jupyter-client==8.6.0 # via # ipykernel # qtconsole -jupyter-core==5.5.1 +jupyter-core==5.7.1 # via # ipykernel # jupyter-client @@ -149,7 +150,7 @@ local-migrator==0.1.9 # nme locket==1.0.0 # via partd -lxml==5.0.0 +lxml==5.1.0 # via PartSeg (setup.cfg) magicgui==0.8.1 # via @@ -159,7 +160,7 @@ mahotas==1.4.13 # via PartSeg (setup.cfg) markdown-it-py==3.0.0 # via rich -markupsafe==2.1.3 +markupsafe==2.1.4 # via jinja2 matplotlib-inline==0.1.6 # via @@ -181,7 +182,7 @@ napari-plugin-engine==0.2.0 # napari-svg napari-svg==0.1.10 # via napari -nest-asyncio==1.5.8 +nest-asyncio==1.6.0 # via ipykernel networkx==3.1 # via scikit-image @@ -225,6 +226,7 @@ packaging==23.2 # local-migrator # pooch # pyinstaller + # pyinstaller-hooks-contrib # pytest # qtconsole # qtpy @@ -248,7 +250,7 @@ pexpect==4.9.0 # via ipython pickleshare==0.7.5 # via ipython -pillow==10.1.0 +pillow==10.2.0 # via # imageio # napari @@ -267,7 +269,7 @@ pooch==1.8.0 # via scikit-image prompt-toolkit==3.0.43 # via ipython -psutil==5.9.7 +psutil==5.9.8 # via # ipykernel # napari @@ -284,7 +286,7 @@ pure-eval==0.2.2 # via stack-data pyconify==0.1.6 # via superqt -pydantic==1.10.13 +pydantic==1.10.14 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -305,7 +307,7 @@ pygments==2.17.2 # superqt pyinstaller==6.3.0 # via PartSeg (setup.cfg) -pyinstaller-hooks-contrib==2023.11 +pyinstaller-hooks-contrib==2024.0 # via pyinstaller pyopengl==3.1.7 # via napari @@ -387,7 +389,7 @@ qtpy==2.4.1 # qtawesome # qtconsole # superqt -referencing==0.32.0 +referencing==0.32.1 # via # jsonschema # jsonschema-specifications @@ -399,7 +401,7 @@ requests==2.31.0 # sphinx rich==13.7.0 # via npe2 -rpds-py==0.16.2 +rpds-py==0.17.1 # via # jsonschema # referencing @@ -412,7 +414,7 @@ scipy==1.10.1 # PartSeg (setup.cfg) # napari # scikit-image -sentry-sdk==1.39.1 +sentry-sdk==1.39.2 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -485,7 +487,7 @@ tqdm==4.66.1 # via napari traceback-with-variables==2.0.4 # via PartSeg (setup.cfg) -traitlets==5.14.0 +traitlets==5.14.1 # via # comm # ipykernel @@ -518,7 +520,7 @@ vispy==0.12.2 # PartSeg (setup.cfg) # napari # napari-svg -wcwidth==0.2.12 +wcwidth==0.2.13 # via prompt-toolkit wrapt==1.16.0 # via napari @@ -533,4 +535,6 @@ zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: setuptools==69.0.3 - # via pyinstaller + # via + # pyinstaller + # pyinstaller-hooks-contrib diff --git a/requirements/constraints_py3.9.txt b/requirements/constraints_py3.9.txt index 623ddbf9c..6e5706fb1 100644 --- a/requirements/constraints_py3.9.txt +++ b/requirements/constraints_py3.9.txt @@ -4,7 +4,7 @@ # # pip-compile --allow-unsafe --extra=pyinstaller --extra=pyqt5 --extra=pyqt6 --extra=pyside2 --extra=pyside6 --extra=test --output-file=requirements/constraints_py3.9.txt --strip-extras requirements/version_denylist.txt setup.cfg # -alabaster==0.7.13 +alabaster==0.7.16 # via sphinx altgraph==0.17.4 # via pyinstaller @@ -40,13 +40,13 @@ click==8.1.7 # typer cloudpickle==3.0.0 # via dask -comm==0.2.0 +comm==0.2.1 # via ipykernel coverage==7.4.0 # via PartSeg (setup.cfg) czifile==2019.7.2 # via PartSeg (setup.cfg) -dask==2023.12.1 +dask==2024.1.0 # via # dask # napari @@ -99,12 +99,13 @@ importlib-metadata==7.0.1 # dask # jupyter-client # pyinstaller + # pyinstaller-hooks-contrib # sphinx in-n-out==0.1.9 # via app-model iniconfig==2.0.0 # via pytest -ipykernel==6.28.0 +ipykernel==6.29.0 # via # PartSeg (setup.cfg) # napari-console @@ -116,11 +117,11 @@ ipython==8.18.1 # napari-console jedi==0.19.1 # via ipython -jinja2==3.1.2 +jinja2==3.1.3 # via # numpydoc # sphinx -jsonschema==4.20.0 +jsonschema==4.21.1 # via napari jsonschema-specifications==2023.12.1 # via jsonschema @@ -128,7 +129,7 @@ jupyter-client==8.6.0 # via # ipykernel # qtconsole -jupyter-core==5.5.1 +jupyter-core==5.7.1 # via # ipykernel # jupyter-client @@ -145,7 +146,7 @@ local-migrator==0.1.9 # nme locket==1.0.0 # via partd -lxml==5.0.0 +lxml==5.1.0 # via PartSeg (setup.cfg) magicgui==0.8.1 # via @@ -155,7 +156,7 @@ mahotas==1.4.13 # via PartSeg (setup.cfg) markdown-it-py==3.0.0 # via rich -markupsafe==2.1.3 +markupsafe==2.1.4 # via jinja2 matplotlib-inline==0.1.6 # via @@ -177,7 +178,7 @@ napari-plugin-engine==0.2.0 # napari-svg napari-svg==0.1.10 # via napari -nest-asyncio==1.5.8 +nest-asyncio==1.6.0 # via ipykernel networkx==3.2.1 # via scikit-image @@ -187,7 +188,7 @@ npe2==0.7.3 # via # -r requirements/version_denylist.txt # napari -numpy==1.26.2 +numpy==1.26.3 # via # PartSeg (setup.cfg) # czifile @@ -220,6 +221,7 @@ packaging==23.2 # local-migrator # pooch # pyinstaller + # pyinstaller-hooks-contrib # pytest # qtconsole # qtpy @@ -227,7 +229,7 @@ packaging==23.2 # sphinx # superqt # vispy -pandas==2.1.4 +pandas==2.2.0 # via # PartSeg (setup.cfg) # napari @@ -235,13 +237,13 @@ parso==0.8.3 # via jedi partd==1.4.1 # via dask -partsegcore-compiled-backend==0.15.1 +partsegcore-compiled-backend==0.15.2 # via PartSeg (setup.cfg) partsegdata==0.10.0 # via PartSeg (setup.cfg) pexpect==4.9.0 # via ipython -pillow==10.1.0 +pillow==10.2.0 # via # imageio # napari @@ -258,7 +260,7 @@ pooch==1.8.0 # via scikit-image prompt-toolkit==3.0.43 # via ipython -psutil==5.9.7 +psutil==5.9.8 # via # ipykernel # napari @@ -275,7 +277,7 @@ pure-eval==0.2.2 # via stack-data pyconify==0.1.6 # via superqt -pydantic==1.10.13 +pydantic==1.10.14 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -296,7 +298,7 @@ pygments==2.17.2 # superqt pyinstaller==6.3.0 # via PartSeg (setup.cfg) -pyinstaller-hooks-contrib==2023.11 +pyinstaller-hooks-contrib==2024.0 # via pyinstaller pyopengl==3.1.7 # via napari @@ -374,7 +376,7 @@ qtpy==2.4.1 # qtawesome # qtconsole # superqt -referencing==0.32.0 +referencing==0.32.1 # via # jsonschema # jsonschema-specifications @@ -386,7 +388,7 @@ requests==2.31.0 # sphinx rich==13.7.0 # via npe2 -rpds-py==0.16.2 +rpds-py==0.17.1 # via # jsonschema # referencing @@ -394,12 +396,12 @@ scikit-image==0.22.0 # via # PartSeg (setup.cfg) # napari -scipy==1.11.4 +scipy==1.12.0 # via # PartSeg (setup.cfg) # napari # scikit-image -sentry-sdk==1.39.1 +sentry-sdk==1.39.2 # via # -r requirements/version_denylist.txt # PartSeg (setup.cfg) @@ -423,17 +425,17 @@ sphinx==4.5.0 # via # napari # numpydoc -sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-applehelp==1.0.8 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==1.0.6 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.0.5 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==1.0.7 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==1.1.10 # via sphinx stack-data==0.6.3 # via ipython @@ -472,7 +474,7 @@ tqdm==4.66.1 # via napari traceback-with-variables==2.0.4 # via PartSeg (setup.cfg) -traitlets==5.14.0 +traitlets==5.14.1 # via # comm # ipykernel @@ -505,7 +507,7 @@ vispy==0.12.2 # PartSeg (setup.cfg) # napari # napari-svg -wcwidth==0.2.12 +wcwidth==0.2.13 # via prompt-toolkit wrapt==1.16.0 # via napari @@ -518,4 +520,6 @@ zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: setuptools==69.0.3 - # via pyinstaller + # via + # pyinstaller + # pyinstaller-hooks-contrib From de43a4f75b6bffef950e5bfc21346bf5e09f72f8 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Thu, 25 Jan 2024 10:53:16 +0100 Subject: [PATCH 19/19] ci: Update `actions/upload-artifact` and `actions/download-artifact` from 3 to 4 (#1062) ## Summary by CodeRabbit - **Chores** - Updated versions of GitHub Actions for improved artifact handling and coverage reporting. --- .github/workflows/base_test_workflow.yml | 10 +++++----- .github/workflows/test_napari_repo.yml | 4 ++-- .github/workflows/test_prereleases.yml | 8 ++++---- .github/workflows/tests.yml | 15 ++++++++------- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/base_test_workflow.yml b/.github/workflows/base_test_workflow.yml index dec303b12..a77ab2706 100644 --- a/.github/workflows/base_test_workflow.yml +++ b/.github/workflows/base_test_workflow.yml @@ -71,7 +71,7 @@ jobs: - name: Download test data if: ${{ inputs.test_data }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: test_data path: test_data @@ -92,17 +92,17 @@ jobs: BACKEND: ${{ inputs.qt_backend }} PIP_CONSTRAINT: requirements/constraints_py${{ inputs.python_version }}.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: upload pytest timing reports as json + name: timing-report-${{ inputs.os }}-py-${{ inputs.python_version }}-${{ inputs.napari }}-${{ inputs.qt_backend }}-${{ inputs.coverage }} path: | ./report-*.json retention-days: 7 - name: Upload coverage data - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ inputs.coverage }} with: - name: coverage reports + name: cov-reports-${{ inputs.os }}-py-${{ inputs.python_version }}-${{ inputs.napari }}-${{ inputs.qt_backend }} path: | ./.coverage.* diff --git a/.github/workflows/test_napari_repo.yml b/.github/workflows/test_napari_repo.yml index 4607e36fb..1c38781aa 100644 --- a/.github/workflows/test_napari_repo.yml +++ b/.github/workflows/test_napari_repo.yml @@ -15,7 +15,7 @@ jobs: - shell: bash run: bash build_utils/download_data.sh - name: Upload test data - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test_data path: test_data @@ -54,7 +54,7 @@ jobs: pip install setuptools tox tox-gh-actions - name: Download test data - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: test_data path: test_data diff --git a/.github/workflows/test_prereleases.yml b/.github/workflows/test_prereleases.yml index eb8cadfd7..dfbe0b68f 100644 --- a/.github/workflows/test_prereleases.yml +++ b/.github/workflows/test_prereleases.yml @@ -23,7 +23,7 @@ jobs: - shell: bash run: bash build_utils/download_data.sh - name: Upload test data - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test_data path: test_data @@ -59,7 +59,7 @@ jobs: - uses: tlambert03/setup-qt-libs@v1 - name: Download test data - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: test_data path: test_data @@ -115,14 +115,14 @@ jobs: pip-sync pip install . - name: upload requirements - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: requirements path: requirements.txt - name: Run PyInstaller run: python build_utils/create_and_pack_executable.py - name: Upload bundle - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: bundle path: dist2/ diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index be7d50d2f..2d0d85b3f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: - shell: bash run: bash build_utils/download_data.sh - name: Upload test data - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test_data path: test_data @@ -102,8 +102,8 @@ jobs: uses: ./.github/workflows/base_test_workflow.yml with: test_data: True - python_version: "3.8" - tox_args: "-e py38-PyQt5-coverage" + python_version: "3.10" + tox_args: "-e py310-PyQt5-coverage" coverage: true test_minimal: @@ -133,10 +133,11 @@ jobs: pip install codecov - name: Download coverage data - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: coverage reports + pattern: cov-reports-* path: coverage + merge-multiple: true - name: combine coverage data run: | python -Im coverage combine coverage @@ -176,7 +177,7 @@ jobs: - uses: tlambert03/setup-qt-libs@v1 - name: Download test data - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: test_data path: test_data @@ -201,7 +202,7 @@ jobs: run: bash build_utils/create_environment_yml.sh - name: Upload environment file - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: environment path: environment.yml