From 8c3adb2182107eb212ff0814f3a43874df407fd3 Mon Sep 17 00:00:00 2001 From: JackEAllen Date: Thu, 22 Feb 2024 12:58:47 +0000 Subject: [PATCH 01/18] Create Pre-Release Issue Template --- .github/ISSUE_TEMPLATE/release.md | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/release.md diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md new file mode 100644 index 00000000000..7cd5dd59bd7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release.md @@ -0,0 +1,86 @@ +--- + +name: Pre-Release Issue Template for Developers +about: For Developers Only - Should be used when Preparing for a release to make sure no tasks are missed during the build-up for a release +title: 'FOR DEVELOPERS: Mantid Imaging [V.V.V] Pre-Release' +labels: 'Release 🚀' +assignees: '' + +--- + +## Description + +As part of preparations for the release of Mantid Imaging version [**VERSION***], the following tasks need to be completed. + + +## High Priority Bugs + +- [ ] [High priority bugs](https://github.com/mantidproject/mantidimaging/issues?) + + +## Create release branch +- [ ] Create branch from main named release-x.x.x +- [ ] Check that branch protection rules are being applied + + +## Version Update PR + + +**PR:** +- [ ] `CITATION.cff` + - Version: `version: "V.V.V"` + - Release Date: `date-released: YYYY-MM-DD` +- [ ] `docs/_templates/versioning.html` + - Version: Under `

{{ _('Versions') }}

` +- [ ] `docs/conf.py` + - Release Date: + - Version: `release = 'V.V.V'` (alpha/beta/rc) + - Version: `smv_tag_whitelist = r'^(2.3.0|2.4.0|2.5.0|2.6.0|2.7.0)$'` +- [ ] `docs/index.rst` + - Year: update year within Citation if out of date + - Version: update version within Citation + + +## Authors PR (if required) + + +**PR:** +- [ ] `CITATION.cff` +- [ ] `docs/conf.py` +- [ ] `docs/index.rst` + + +## Release Notes PR + + +**PR:** +- [ ] Compile Release Notes using the following command `python setup.py release_notes` - Copy output and place in new file `docs/release_notes/` +- [ ] Add newest version under "next": `docs/release_notes/index.rst` +- [ ] Delete all release notes within: `docs/release_notes/next/` + + +## Create Release + +- [ ] Create release from tag (See internal docs for how to do this) + + +## Move IDAaas to Stable Branch + +- [ ] IDAaaS - move stable branch (See internal docs for how to do this) + + +## Update Versions on Main + +- [ ] Versions on main + - Tag commit as alpha for next release (e.g. after releasing V.V) + - Once merged checkout main and run `git describe ` to check if the tag is part of the history (See internal docs for additional info) + + +## Windows NSIS Installer + - [ ] Build Windows NSIS Installer (See internal docs for how to do this) + + +### Additional Info + + + From ab10dd5f3cdba2716b6c46d317f32045f45c0a52 Mon Sep 17 00:00:00 2001 From: ashmeigh Date: Mon, 26 Feb 2024 09:13:35 +0000 Subject: [PATCH 02/18] click table colour and change colour --- .../next/feature-2046-ROI_Colors _table | 1 + .../gui/windows/spectrum_viewer/presenter.py | 2 +- .../gui/windows/spectrum_viewer/spectrum_widget.py | 6 +++--- mantidimaging/gui/windows/spectrum_viewer/view.py | 14 +++++++++++--- 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 docs/release_notes/next/feature-2046-ROI_Colors _table diff --git a/docs/release_notes/next/feature-2046-ROI_Colors _table b/docs/release_notes/next/feature-2046-ROI_Colors _table new file mode 100644 index 00000000000..aee4c69e6fa --- /dev/null +++ b/docs/release_notes/next/feature-2046-ROI_Colors _table @@ -0,0 +1 @@ +#2046 : Enhancement: Implement Click Dialog for Changing ROI Colors in Table diff --git a/mantidimaging/gui/windows/spectrum_viewer/presenter.py b/mantidimaging/gui/windows/spectrum_viewer/presenter.py index 2b77a9aea23..a6946db0f92 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/presenter.py +++ b/mantidimaging/gui/windows/spectrum_viewer/presenter.py @@ -241,7 +241,7 @@ def change_roi_colour(self, roi_name: str, new_colour: tuple) -> None: """ if roi_name in self.view.spectrum_widget.roi_dict: self.view.spectrum_widget.roi_dict[roi_name].colour = new_colour - self.view.update_roi_color_in_table(roi_name, new_colour) + self.view.update_roi_color(roi_name, new_colour) def add_rits_roi(self) -> None: roi_name = ROI_RITS diff --git a/mantidimaging/gui/windows/spectrum_viewer/spectrum_widget.py b/mantidimaging/gui/windows/spectrum_viewer/spectrum_widget.py index d9f3e8902ca..aae1afbdf56 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/spectrum_widget.py +++ b/mantidimaging/gui/windows/spectrum_viewer/spectrum_widget.py @@ -43,9 +43,9 @@ def __init__(self, name: str, sensible_roi: SensibleROI, *args, **kwargs): self.roi.setAcceptedMouseButtons(Qt.MouseButton.LeftButton) self.menu = QMenu() - change_color_action = QAction("Change ROI Colour", self) - change_color_action.triggered.connect(self.onChangeColor) - self.menu.addAction(change_color_action) + self.change_color_action = QAction("Change ROI Colour", self) + self.change_color_action.triggered.connect(self.onChangeColor) + self.menu.addAction(self.change_color_action) def onChangeColor(self): current_color = QColor(*self._colour) diff --git a/mantidimaging/gui/windows/spectrum_viewer/view.py b/mantidimaging/gui/windows/spectrum_viewer/view.py index 2d875c3b47a..e24da73d5c2 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/view.py +++ b/mantidimaging/gui/windows/spectrum_viewer/view.py @@ -108,6 +108,7 @@ def __init__(self, main_window: 'MainWindowView'): self.tableView.setSelectionBehavior(QAbstractItemView.SelectRows) self.tableView.setSelectionMode(QAbstractItemView.SingleSelection) self.tableView.setAlternatingRowColors(True) + self.tableView.clicked.connect(self.handle_table_click) # Roi Prop table self.roi_table_properties = ["Top", "Bottom", "Left", "Right"] @@ -340,10 +341,18 @@ def set_new_roi(self) -> None: spinbox.setEnabled(True) self.set_roi_properties() - def update_roi_color_in_table(self, roi_name: str, new_color: tuple): + def handle_table_click(self, index): + if index.isValid() and index.column() == 1: + roi_name = self.roi_table_model.index(index.row(), 0).data() + self.set_spectum_roi_color(roi_name) + + def set_spectum_roi_color(self, roi_name: str) -> None: + spectrum_roi = self.spectrum_widget.roi_dict[roi_name] + spectrum_roi.change_color_action.trigger() + + def update_roi_color(self, roi_name: str, new_color: tuple) -> None: """ Finds ROI by name in table and updates colour. - @param roi_name: Name of the ROI to update. @param new_color: The new color for the ROI in (R, G, B) format. """ @@ -354,7 +363,6 @@ def update_roi_color_in_table(self, roi_name: str, new_color: tuple): def find_row_for_roi(self, roi_name: str) -> Optional[int]: """ Returns row index for ROI name, or None if not found. - @param roi_name: Name ROI find. @return: Row index ROI or None. """ From 028f127f89bb971aead93267ff8abaf779dfb5db Mon Sep 17 00:00:00 2001 From: Mike Sullivan Date: Thu, 22 Feb 2024 11:28:24 +0000 Subject: [PATCH 03/18] Spectrum Viewer ROI visibility fix --- .../gui/windows/spectrum_viewer/presenter.py | 1 + .../spectrum_viewer/spectrum_widget.py | 5 +++- .../gui/windows/spectrum_viewer/view.py | 29 ++++++++++++++----- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/mantidimaging/gui/windows/spectrum_viewer/presenter.py b/mantidimaging/gui/windows/spectrum_viewer/presenter.py index a6946db0f92..73df17444d3 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/presenter.py +++ b/mantidimaging/gui/windows/spectrum_viewer/presenter.py @@ -138,6 +138,7 @@ def handle_roi_moved(self, force_new_spectrums: bool = False) -> None: def handle_roi_clicked(self, roi) -> None: self.view.current_roi = roi.name + self.view.last_clicked_roi = roi.name self.view.set_roi_properties() def redraw_spectrum(self, name: str) -> None: diff --git a/mantidimaging/gui/windows/spectrum_viewer/spectrum_widget.py b/mantidimaging/gui/windows/spectrum_viewer/spectrum_widget.py index aae1afbdf56..6d901f56449 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/spectrum_widget.py +++ b/mantidimaging/gui/windows/spectrum_viewer/spectrum_widget.py @@ -87,6 +87,9 @@ def adjust_spec_roi(self, roi: SensibleROI) -> None: self.setPos((roi.left, roi.top)) self.setSize((roi.width, roi.height)) + def rename_roi(self, new_name: str) -> None: + self._name = new_name + class SpectrumWidget(QWidget): """ @@ -256,6 +259,7 @@ def rename_roi(self, old_name: str, new_name: str) -> None: if old_name in self.roi_dict.keys() and new_name not in self.roi_dict.keys(): self.roi_dict[new_name] = self.roi_dict.pop(old_name) self.spectrum_data_dict[new_name] = self.spectrum_data_dict.pop(old_name) + self.roi_dict[new_name].rename_roi(new_name) class SpectrumPlotWidget(GraphicsLayoutWidget): @@ -263,7 +267,6 @@ class SpectrumPlotWidget(GraphicsLayoutWidget): spectrum: PlotItem range_control: LinearRegionItem - roi_dict: dict[Optional[str], ROI] range_changed = pyqtSignal(object) diff --git a/mantidimaging/gui/windows/spectrum_viewer/view.py b/mantidimaging/gui/windows/spectrum_viewer/view.py index e24da73d5c2..9565001d10b 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/view.py +++ b/mantidimaging/gui/windows/spectrum_viewer/view.py @@ -51,6 +51,8 @@ class SpectrumViewerWindowView(BaseMainWindowView): spectrum_widget: SpectrumWidget + number_roi_properties_procced: int = 0 + def __init__(self, main_window: 'MainWindowView'): super().__init__(None, 'gui/ui/spectrum_viewer.ui') @@ -64,6 +66,7 @@ def __init__(self, main_window: 'MainWindowView'): self.selected_row_data: Optional[list] = None self.roiPropertiesSpinBoxes: dict[str, QSpinBox] = {} self.roiPropertiesLabels: dict[str, QLabel] = {} + self.old_table_names: list = [] self.presenter = SpectrumViewerWindowPresenter(self, main_window) @@ -179,19 +182,20 @@ def on_data_in_table_change() -> None: If the visibility of an ROI has changed, update the visibility of the ROI in the spectrum widget. """ selected_row_data = self.roi_table_model.row_data(self.selected_row) - if selected_row_data[0].lower() not in ["", " ", "all"] and selected_row_data[0] != self.current_roi: if selected_row_data[0] in self.presenter.get_roi_names(): - selected_row_data[0] = self.current_roi - return + selected_row_data[0] = self.old_table_names[self.selected_row] + self.current_roi = selected_row_data[0] + self.last_clicked_roi = self.current_roi else: self.presenter.rename_roi(self.current_roi, selected_row_data[0]) self.current_roi = selected_row_data[0] - return + self.last_clicked_roi = self.current_roi + self.set_roi_properties() else: - selected_row_data[0] = self.current_roi + selected_row_data[0] = self.old_table_names[self.selected_row] - selected_row_data[0] = self.current_roi + self.set_old_table_names() self.on_visibility_change() return @@ -215,7 +219,10 @@ def on_visibility_change(self) -> None: When the visibility of an ROI is changed, update the visibility of the ROI in the spectrum widget """ if self.presenter.export_mode == ExportMode.ROI_MODE: - self.current_roi = self.last_clicked_roi + if self.current_roi in self.old_table_names and self.last_clicked_roi in self.old_table_names: + pass + else: + self.current_roi = self.last_clicked_roi if self.roi_table_model.rowCount() == 0: self.disable_roi_properties() if not self.roi_table_model.rowCount() == 0: @@ -403,6 +410,7 @@ def add_roi_table_row(self, name: str, colour: tuple[int, int, int]): self.tableView.selectRow(self.selected_row) self.current_roi = name self.removeBtn.setEnabled(True) + self.set_old_table_names() def remove_roi(self) -> None: """ @@ -500,3 +508,10 @@ def disable_roi_properties(self): def get_roi_properties_spinboxes(self): return self.roiPropertiesSpinBoxes + + def set_old_table_names(self): + self.old_table_names = self.presenter.get_roi_names() + if 'all' in self.old_table_names: + self.old_table_names.remove('all') + if 'rits_roi' in self.old_table_names: + self.old_table_names.remove('rits_roi') From 789b2771f349085ad76db33d183969adc4b56836 Mon Sep 17 00:00:00 2001 From: JackEAllen Date: Fri, 23 Feb 2024 15:37:54 +0000 Subject: [PATCH 04/18] Rename Sample Log to Sample / Spectra Log in Load Dialog Window --- mantidimaging/gui/ui/image_load_dialog.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mantidimaging/gui/ui/image_load_dialog.ui b/mantidimaging/gui/ui/image_load_dialog.ui index d2df097eb61..b69e0a920d8 100644 --- a/mantidimaging/gui/ui/image_load_dialog.ui +++ b/mantidimaging/gui/ui/image_load_dialog.ui @@ -116,7 +116,7 @@ - Sample Log + Sample / Spectra Log From 3360acfa67122d0585944c97dce2ae874821f1b0 Mon Sep 17 00:00:00 2001 From: Mike Sullivan Date: Fri, 23 Feb 2024 15:40:43 +0000 Subject: [PATCH 05/18] reset properties table on removing roi --- mantidimaging/gui/windows/spectrum_viewer/view.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mantidimaging/gui/windows/spectrum_viewer/view.py b/mantidimaging/gui/windows/spectrum_viewer/view.py index 9565001d10b..8658e68c4b9 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/view.py +++ b/mantidimaging/gui/windows/spectrum_viewer/view.py @@ -429,6 +429,10 @@ def remove_roi(self) -> None: if self.roi_table_model.rowCount() == 0: self.removeBtn.setEnabled(False) self.disable_roi_properties() + else: + self.set_old_table_names() + self.current_roi = self.roi_table_model.row_data(self.selected_row)[0] + self.set_roi_properties() def clear_all_rois(self) -> None: """ From 8ccc465866a5fd73a04d8c86772c512930a71010 Mon Sep 17 00:00:00 2001 From: Mike Sullivan Date: Mon, 26 Feb 2024 11:32:35 +0000 Subject: [PATCH 06/18] Fixed inconsistent state on visibilty change --- mantidimaging/gui/windows/spectrum_viewer/view.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mantidimaging/gui/windows/spectrum_viewer/view.py b/mantidimaging/gui/windows/spectrum_viewer/view.py index 8658e68c4b9..77f2f8023d6 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/view.py +++ b/mantidimaging/gui/windows/spectrum_viewer/view.py @@ -221,8 +221,12 @@ def on_visibility_change(self) -> None: if self.presenter.export_mode == ExportMode.ROI_MODE: if self.current_roi in self.old_table_names and self.last_clicked_roi in self.old_table_names: pass - else: + elif self.current_roi == ROI_RITS and self.last_clicked_roi in self.old_table_names: self.current_roi = self.last_clicked_roi + elif self.current_roi == ROI_RITS and self.last_clicked_roi not in self.old_table_names: + self.current_roi = self.roi_table_model.row_data(self.selected_row)[0] + else: + self.last_clicked_roi = self.current_roi if self.roi_table_model.rowCount() == 0: self.disable_roi_properties() if not self.roi_table_model.rowCount() == 0: From 4107844e68c634740c9abf0b4f02f8c2b0b0fd87 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Mon, 26 Feb 2024 15:14:45 +0000 Subject: [PATCH 07/18] When changing the colour of an ROI in RITS mode, call on_visibility_change() to update plot --- mantidimaging/gui/windows/spectrum_viewer/presenter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mantidimaging/gui/windows/spectrum_viewer/presenter.py b/mantidimaging/gui/windows/spectrum_viewer/presenter.py index 73df17444d3..5bb7fb6e5da 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/presenter.py +++ b/mantidimaging/gui/windows/spectrum_viewer/presenter.py @@ -243,6 +243,7 @@ def change_roi_colour(self, roi_name: str, new_colour: tuple) -> None: if roi_name in self.view.spectrum_widget.roi_dict: self.view.spectrum_widget.roi_dict[roi_name].colour = new_colour self.view.update_roi_color(roi_name, new_colour) + self.view.on_visibility_change() def add_rits_roi(self) -> None: roi_name = ROI_RITS From f39f4a3dc585ef4c8685d547c9213cf032588516 Mon Sep 17 00:00:00 2001 From: Mike Sullivan Date: Mon, 26 Feb 2024 15:20:03 +0000 Subject: [PATCH 08/18] prevent the RITS_ROI from becoming the last_clicked_roi --- mantidimaging/gui/windows/spectrum_viewer/presenter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mantidimaging/gui/windows/spectrum_viewer/presenter.py b/mantidimaging/gui/windows/spectrum_viewer/presenter.py index 5bb7fb6e5da..812b7dc8baa 100644 --- a/mantidimaging/gui/windows/spectrum_viewer/presenter.py +++ b/mantidimaging/gui/windows/spectrum_viewer/presenter.py @@ -137,9 +137,10 @@ def handle_roi_moved(self, force_new_spectrums: bool = False) -> None: self.view.set_spectrum(name, self.model.get_spectrum(name, self.spectrum_mode)) def handle_roi_clicked(self, roi) -> None: - self.view.current_roi = roi.name - self.view.last_clicked_roi = roi.name - self.view.set_roi_properties() + if not roi.name == ROI_RITS: + self.view.current_roi = roi.name + self.view.last_clicked_roi = roi.name + self.view.set_roi_properties() def redraw_spectrum(self, name: str) -> None: """ From 48fe4d03b9a0c22705d6471a1aab2aba831c8bc2 Mon Sep 17 00:00:00 2001 From: ashmeigh Date: Fri, 23 Feb 2024 02:46:13 +0000 Subject: [PATCH 09/18] change gaussian operation to compute function notes added moved np to type check --- .../core/operations/gaussian/gaussian.py | 32 +++++++------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/mantidimaging/core/operations/gaussian/gaussian.py b/mantidimaging/core/operations/gaussian/gaussian.py index df77d3edf64..a9e8e709dc4 100644 --- a/mantidimaging/core/operations/gaussian/gaussian.py +++ b/mantidimaging/core/operations/gaussian/gaussian.py @@ -3,7 +3,6 @@ from __future__ import annotations from functools import partial -from logging import getLogger from typing import TYPE_CHECKING import scipy.ndimage as scipy_ndimage @@ -11,12 +10,12 @@ from mantidimaging import helper as h from mantidimaging.core.operations.base_filter import BaseFilter from mantidimaging.core.parallel import shared as ps -from mantidimaging.core.utility.progress_reporting import Progress from mantidimaging.gui.utility import add_property_to_form from mantidimaging.gui.utility.qt_helpers import Type if TYPE_CHECKING: from mantidimaging.core.data import ImageStack + import numpy as np class GaussianFilter(BaseFilter): @@ -53,10 +52,20 @@ def filter_func(data: ImageStack, size=None, mode=None, order=None, progress=Non if not size or not size > 1: raise ValueError(f'Size parameter must be greater than 1, but value provided was {size}') - _execute(data, size, mode, order, progress) + params = {'size': size, 'mode': mode, 'order': order} + ps.run_compute_func(GaussianFilter.compute_function, data.data.shape[0], data.shared_array, params, progress) + h.check_data_stack(data) return data + @staticmethod + def compute_function(i: int, array: np.ndarray, params): + scipy_ndimage.gaussian_filter(array[i], + sigma=params['size'], + mode=params['mode'], + order=params['order'], + output=array[i]) + @staticmethod def register_gui(form, on_change, view): _, size_field = add_property_to_form('Kernel Size', @@ -92,20 +101,3 @@ def execute_wrapper(size_field=None, order_field=None, mode_field=None): def modes(): return ['reflect', 'constant', 'nearest', 'mirror', 'wrap'] - - -def _execute(images: ImageStack, size, mode, order, progress=None): - log = getLogger(__name__) - progress = Progress.ensure_instance(progress, task_name='Gaussian filter') - - f = ps.create_partial(scipy_ndimage.gaussian_filter, ps.return_to_self, sigma=size, mode=mode, order=order) - - log.info("Starting PARALLEL gaussian filter, with pixel data type: {0}, " - "filter size/width: {1}.".format(images.dtype, size)) - - progress.update() - ps.execute(f, [images.shared_array], images.data.shape[0], progress, msg="Gaussian filter") - - progress.mark_complete() - log.info("Finished gaussian filter, with pixel data type: {0}, " - "filter size/width: {1}.".format(images.dtype, size)) From 5b543b94e13a7ef85a622b3c1b24042e2c3faa8b Mon Sep 17 00:00:00 2001 From: ashmeigh Date: Fri, 23 Feb 2024 10:14:48 +0000 Subject: [PATCH 10/18] notes added --- docs/release_notes/next/feature-2051-operations | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/release_notes/next/feature-2051-operations diff --git a/docs/release_notes/next/feature-2051-operations b/docs/release_notes/next/feature-2051-operations new file mode 100644 index 00000000000..83c1d7a727f --- /dev/null +++ b/docs/release_notes/next/feature-2051-operations @@ -0,0 +1 @@ +#2051: Move operations to compute_function style \ No newline at end of file From c23b54e12efbf18e857d8d42bdf8d9e52c556f82 Mon Sep 17 00:00:00 2001 From: ashmeigh Date: Mon, 26 Feb 2024 13:08:02 +0000 Subject: [PATCH 11/18] added clip coords test --- scripts/operations_tests/test_cases.json | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/operations_tests/test_cases.json b/scripts/operations_tests/test_cases.json index 53ba438d64c..8f438b2d510 100644 --- a/scripts/operations_tests/test_cases.json +++ b/scripts/operations_tests/test_cases.json @@ -58,7 +58,7 @@ "params": { "mult_val": 3 }, - "source_date": "flower512" + "source_data": "flower512" } ] }, @@ -220,7 +220,7 @@ } ] }, - "Ring Removal": { + "Ring Removal": { "params": {"center_mode": "image center"}, "source_data": "flower128", "cases": [ @@ -235,5 +235,20 @@ } } ] + }, + "Clip Values": { + "params": {}, + "source_data": "flower128", + "cases": [ + { + "test_name": "clip_values_0_to_50", + "params": { + "clip_min": 0, + "clip_max": 50, + "clip_min_new_value": 0, + "clip_max_new_value": 50 + } + } + ] } } From f6efd32b35ed3afeecb17156506747cc44b16b96 Mon Sep 17 00:00:00 2001 From: JackEAllen Date: Fri, 1 Mar 2024 12:05:08 +0000 Subject: [PATCH 12/18] Update =Build Docs Command Update build docs command to use sphinx-apidoc to manage version. This bug was introduced by moving build docs from setup.py to the makefile --- docs/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 64ccc9906b6..119f8d18304 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -177,4 +177,7 @@ smv_tag_whitelist = r'^(2.3.0|2.4.0|2.5.0|2.6.0)$' smv_branch_whitelist = None # No branches smv_released_pattern = r'' -smv_prebuild_command = "python setup.py docs_api || python setup.py internal_docs_api" +smv_prebuild_command = ( + 'sphinx-apidoc -f -M -e -T -d 3 mantidimaging **/test **/test_helpers **/eyes_tests -o docs/api/ || ' + 'python setup.py docs_api || ' + 'python setup.py internal_docs_api') From a0e1fdee954764a1c037f573cd8ef43ea28bd9b0 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Fri, 1 Mar 2024 11:16:45 +0000 Subject: [PATCH 13/18] Update citation file --- CITATION.cff | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 10f395ef608..8d606f07617 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,13 +1,11 @@ cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - - family-names: Tasev - given-names: Dimitar - orcid: https://orcid.org/0000-0002-5435-1936 - family-names: Akello-Egwel given-names: Dolica - family-names: Allen given-names: Jack + orcid: https://orcid.org/0009-0007-2873-3731 - family-names: Baust given-names: Rachel - family-names: Gigg @@ -15,10 +13,19 @@ authors: - family-names: Jones given-names: Samuel orcid: https://orcid.org/0000-0001-7217-2280 + - family-names: Meigh + given-names: Ashley + orcid: https://orcid.org/0009-0001-6357-0516 - family-names: Nixon given-names: Daniel - family-names: Stock given-names: Samuel + - family-names: Sullivan + given-names: Michael + orcid: https://orcid.org/0000-0003-4910-7784 + - family-names: Tasev + given-names: Dimitar + orcid: https://orcid.org/0000-0002-5435-1936 - family-names: Taylor given-names: Will - family-names: Tygier @@ -26,9 +33,9 @@ authors: orcid: https://orcid.org/0000-0002-7495-8655 title: "Mantid Imaging" abstract: "Mantid Imaging is a graphical toolkit for performing 3D reconstruction of neutron tomography data. It provides an easy-to-use graphical interface to a wide range of pre/post-processing operations, tilt correction and reconstruction algorithms, accommodating for tomography users with varying data complexity and image analysis background knowledge. It utilises a flexible plugin system that allows easy integration of external software, and has allowed us to re-use software widely known in the neutron tomography community." -version: "2.5.0" +version: "2.7.0" doi: 10.5281/zenodo.4728059 -date-released: 2023-05-04 +date-released: 2024-02-21 license: "GPL-3.0-or-later" repository-code: https://github.com/mantidproject/mantidimaging url: https://mantidproject.github.io/mantidimaging From 51d73ee6240361f71e00e90c3c3f2c8029be222d Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Fri, 1 Mar 2024 11:24:33 +0000 Subject: [PATCH 14/18] Update versions and names in docs/conf.py --- docs/conf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 119f8d18304..b149745282f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -69,18 +69,18 @@ # General information about the project. project = 'MantidImaging' -copyright = '2017-2023, Mantid Project' -author = 'Dimitar Tasev, Jack Allen, Dolica Akello-Egwel, Rachel Baust, Martyn Gigg, Samuel Jones, Dan Nixon, ' \ - 'Samuel Stock, Will Taylor, Sam Tygier' +copyright = '2017-2024, Mantid Project' +author = ("Dolica Akello-Egwel, Jack Allen, Rachel Baust, Martyn Gigg, Samuel Jones, Ashley Meigh, Daniel Nixon, " + "Samuel Stock, Michael Sullivan, Dimitar Tasev, Will Taylor, Sam Tygier") # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '2.7' +version = '2.8' # The full version, including alpha/beta/rc tags. -release = '2.7.0a1' +release = '2.8.0a1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -174,7 +174,7 @@ html_use_smartypants = False # sphinx-multiversion -smv_tag_whitelist = r'^(2.3.0|2.4.0|2.5.0|2.6.0)$' +smv_tag_whitelist = r'^(2.3.0|2.4.0|2.5.0|2.6.0|2.7.0)$' smv_branch_whitelist = None # No branches smv_released_pattern = r'' smv_prebuild_command = ( From c82350c3247c1568d6376334d77a8bd59ced728e Mon Sep 17 00:00:00 2001 From: JackEAllen Date: Wed, 21 Feb 2024 09:55:47 +0000 Subject: [PATCH 15/18] update version release notes --- docs/release_notes/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release_notes/index.rst b/docs/release_notes/index.rst index 5939184f979..f5ca8ac8070 100644 --- a/docs/release_notes/index.rst +++ b/docs/release_notes/index.rst @@ -6,6 +6,7 @@ Release Notes :caption: Contents: next + 2.7 2.6 2.5 2.4 From 27097261bfc2fec5c4d7f692eb85ff64126196f8 Mon Sep 17 00:00:00 2001 From: JackEAllen Date: Wed, 21 Feb 2024 09:54:38 +0000 Subject: [PATCH 16/18] Update Contributers --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 3d6cc8c0c1c..45759cf17cd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -29,7 +29,7 @@ Mantid Imaging is a graphical toolkit for performing 3D reconstruction of neutro Please cite as: -Tasev, Dimitar; Akello-Egwel, Dolica; Allen, Jack; Baust, Rachel; Gigg, Martyn; Jones, Samuel; Nixon, Daniel; Stock, Samuel; Taylor, Will; Tygier, Sam. (2023). Mantid Imaging (2.5.0), Zenodo https://doi.org/10.5281/zenodo.4728059 +Akello-Egwel, Dolica; Allen, Jack; Baust, Rachel; Gigg, Martyn; Jones, Samuel; Meigh, Ashley; Nixon, Daniel; Stock, Samuel; Sullivan, Michael; Tasev, Dimitar; Taylor, Will; Tygier, Sam. (2024). Mantid Imaging (2.7.0), Zenodo https://doi.org/10.5281/zenodo.4728059 (See `Zenodo `_ for citing specific versions). From 8c85c54b7400cbf478d748e257d8423f9d054317 Mon Sep 17 00:00:00 2001 From: JackEAllen Date: Wed, 21 Feb 2024 09:53:18 +0000 Subject: [PATCH 17/18] Update Release Notes --- docs/release_notes/2.7.rst | 29 +++++++++++++++++++ .../next/dev-1932-RITS_export_backend | 1 - docs/release_notes/next/dev-1951-pytest-speed | 1 - .../next/dev-1955-instrument-log | 1 - docs/release_notes/next/dev-1960-update-tools | 1 - .../next/dev-2011-new-conda-repo | 1 - .../next/feature-1912-live-subdir | 1 - docs/release_notes/next/feature-1941-rits-gui | 2 -- .../next/feature-1943-RITS-transmission-error | 2 -- .../next/feature-1945-export_binned_rits_data | 1 - docs/release_notes/next/feature-1957-rits-roi | 2 -- .../next/feature-1992-ROI-colour | 1 - .../next/feature-1996-fits-compatibility | 1 - .../next/feature-2026-resizable-tof-spectrum | 1 - .../next/feature-2027-Spectrum-ROI-Adjustable | 1 - .../next/feature-2048-spectrum_documentation | 1 - .../next/fix-1873-unexpected-float | 1 - .../next/fix-1966-ExecutionTimer | 1 - .../next/fix-2002-default-values | 2 -- .../next/fix-2009-type annotations | 1 - docs/release_notes/next/fix-2012-numpy_update | 1 - .../next/fix-2030-slow-imageview | 1 - docs/release_notes/next/next.rst | 16 ++++++++++ 23 files changed, 45 insertions(+), 25 deletions(-) create mode 100644 docs/release_notes/2.7.rst delete mode 100644 docs/release_notes/next/dev-1932-RITS_export_backend delete mode 100644 docs/release_notes/next/dev-1951-pytest-speed delete mode 100644 docs/release_notes/next/dev-1955-instrument-log delete mode 100644 docs/release_notes/next/dev-1960-update-tools delete mode 100644 docs/release_notes/next/dev-2011-new-conda-repo delete mode 100644 docs/release_notes/next/feature-1912-live-subdir delete mode 100644 docs/release_notes/next/feature-1941-rits-gui delete mode 100644 docs/release_notes/next/feature-1943-RITS-transmission-error delete mode 100644 docs/release_notes/next/feature-1945-export_binned_rits_data delete mode 100644 docs/release_notes/next/feature-1957-rits-roi delete mode 100644 docs/release_notes/next/feature-1992-ROI-colour delete mode 100644 docs/release_notes/next/feature-1996-fits-compatibility delete mode 100644 docs/release_notes/next/feature-2026-resizable-tof-spectrum delete mode 100644 docs/release_notes/next/feature-2027-Spectrum-ROI-Adjustable delete mode 100644 docs/release_notes/next/feature-2048-spectrum_documentation delete mode 100644 docs/release_notes/next/fix-1873-unexpected-float delete mode 100644 docs/release_notes/next/fix-1966-ExecutionTimer delete mode 100644 docs/release_notes/next/fix-2002-default-values delete mode 100644 docs/release_notes/next/fix-2009-type annotations delete mode 100644 docs/release_notes/next/fix-2012-numpy_update delete mode 100644 docs/release_notes/next/fix-2030-slow-imageview create mode 100644 docs/release_notes/next/next.rst diff --git a/docs/release_notes/2.7.rst b/docs/release_notes/2.7.rst new file mode 100644 index 00000000000..fe7baf83781 --- /dev/null +++ b/docs/release_notes/2.7.rst @@ -0,0 +1,29 @@ +New Features +------------ +- #1912 : Support sub-directories in Live viewer +- #1941 : Spectrum viewer tab for exporting to RITS +- #1943 : RITS export transmission errors +- #1945 : Export Binned RITS Formatted Data within Spectrum Viewer. +- #1957 : ROI support for RITS export +- #1992 : Spectrum Viewer: Change ROI Colour Through Right Click Dialog Menu +- #1996 : Added .fits file compatibility for Live Viewer +- #2026: Time of flight graph in the Spectrum Viewer is now resizable +- #2027: The Spectrum ROI details display in an adjustable table via spinboxes +- #2048: Update spectrum documentation to reflect changes made to the Spectrum Viewer. + +Fixes +----- +- #1873 : fix typeError: qWait(ms: int): argument 1 has unexpected type 'float' +- #1966: ExecutionTimer unit test fails intermittently for Windows GitHub Action +- #2002 : Better default values in Remove all stripes +- #2009 : Improve type annotation in gui.windows.recon +- #2012 : numpy2 deprication +- #2031 : Speed up imageview by avoiding unneeded calculation + +Developer Changes +----------------- +- #1932 : RITS Export Backend +- #1951 : Various fixes to speedup pytest +- #1955 : Add InstrumentLog as new log reader +- #1960 : Update developer tools +- #2011 : Move to a new conda repo https://anaconda.org/mantidimaging/mantidimaging \ No newline at end of file diff --git a/docs/release_notes/next/dev-1932-RITS_export_backend b/docs/release_notes/next/dev-1932-RITS_export_backend deleted file mode 100644 index 9d34f8cfb96..00000000000 --- a/docs/release_notes/next/dev-1932-RITS_export_backend +++ /dev/null @@ -1 +0,0 @@ -#1932 : RITS Export Backend \ No newline at end of file diff --git a/docs/release_notes/next/dev-1951-pytest-speed b/docs/release_notes/next/dev-1951-pytest-speed deleted file mode 100644 index b85b1a29b2e..00000000000 --- a/docs/release_notes/next/dev-1951-pytest-speed +++ /dev/null @@ -1 +0,0 @@ -#1951 : Various fixes to speedup pytest diff --git a/docs/release_notes/next/dev-1955-instrument-log b/docs/release_notes/next/dev-1955-instrument-log deleted file mode 100644 index 28ef805cd41..00000000000 --- a/docs/release_notes/next/dev-1955-instrument-log +++ /dev/null @@ -1 +0,0 @@ -#1955 : Add InstrumentLog as new log reader diff --git a/docs/release_notes/next/dev-1960-update-tools b/docs/release_notes/next/dev-1960-update-tools deleted file mode 100644 index f0dd0a57433..00000000000 --- a/docs/release_notes/next/dev-1960-update-tools +++ /dev/null @@ -1 +0,0 @@ -#1960 : Update developer tools diff --git a/docs/release_notes/next/dev-2011-new-conda-repo b/docs/release_notes/next/dev-2011-new-conda-repo deleted file mode 100644 index fc0eac4fad5..00000000000 --- a/docs/release_notes/next/dev-2011-new-conda-repo +++ /dev/null @@ -1 +0,0 @@ -#2011 : Move to a new conda repo https://anaconda.org/mantidimaging/mantidimaging diff --git a/docs/release_notes/next/feature-1912-live-subdir b/docs/release_notes/next/feature-1912-live-subdir deleted file mode 100644 index 260977fc210..00000000000 --- a/docs/release_notes/next/feature-1912-live-subdir +++ /dev/null @@ -1 +0,0 @@ -#1912 : Support sub-directories in Live viewer diff --git a/docs/release_notes/next/feature-1941-rits-gui b/docs/release_notes/next/feature-1941-rits-gui deleted file mode 100644 index 89ce0f2c394..00000000000 --- a/docs/release_notes/next/feature-1941-rits-gui +++ /dev/null @@ -1,2 +0,0 @@ -#1941 : Spectrum viewer tab for exporting to RITS - diff --git a/docs/release_notes/next/feature-1943-RITS-transmission-error b/docs/release_notes/next/feature-1943-RITS-transmission-error deleted file mode 100644 index 4f2b8a35aea..00000000000 --- a/docs/release_notes/next/feature-1943-RITS-transmission-error +++ /dev/null @@ -1,2 +0,0 @@ -#1943 : RITS export transmission errors - diff --git a/docs/release_notes/next/feature-1945-export_binned_rits_data b/docs/release_notes/next/feature-1945-export_binned_rits_data deleted file mode 100644 index f56e2c94b6d..00000000000 --- a/docs/release_notes/next/feature-1945-export_binned_rits_data +++ /dev/null @@ -1 +0,0 @@ -#1945 : Export Binned RITS Formatted Data within Spectrum Viewer. diff --git a/docs/release_notes/next/feature-1957-rits-roi b/docs/release_notes/next/feature-1957-rits-roi deleted file mode 100644 index bdcc93f94df..00000000000 --- a/docs/release_notes/next/feature-1957-rits-roi +++ /dev/null @@ -1,2 +0,0 @@ -#1957 : ROI support for RITS export - diff --git a/docs/release_notes/next/feature-1992-ROI-colour b/docs/release_notes/next/feature-1992-ROI-colour deleted file mode 100644 index 3de82d867b5..00000000000 --- a/docs/release_notes/next/feature-1992-ROI-colour +++ /dev/null @@ -1 +0,0 @@ -#1992 : Spectrum Viewer: Change ROI Colour Through Right Click Dialog Menu diff --git a/docs/release_notes/next/feature-1996-fits-compatibility b/docs/release_notes/next/feature-1996-fits-compatibility deleted file mode 100644 index d77ae6675c9..00000000000 --- a/docs/release_notes/next/feature-1996-fits-compatibility +++ /dev/null @@ -1 +0,0 @@ -#1996 : Added .fits file compatibility for Live Viewer diff --git a/docs/release_notes/next/feature-2026-resizable-tof-spectrum b/docs/release_notes/next/feature-2026-resizable-tof-spectrum deleted file mode 100644 index 0c6b4c4c083..00000000000 --- a/docs/release_notes/next/feature-2026-resizable-tof-spectrum +++ /dev/null @@ -1 +0,0 @@ -#2026: Time of flight graph in the Spectrum Viewer is now resizable \ No newline at end of file diff --git a/docs/release_notes/next/feature-2027-Spectrum-ROI-Adjustable b/docs/release_notes/next/feature-2027-Spectrum-ROI-Adjustable deleted file mode 100644 index 1c6d6156b91..00000000000 --- a/docs/release_notes/next/feature-2027-Spectrum-ROI-Adjustable +++ /dev/null @@ -1 +0,0 @@ -#2027: The Spectrum ROI details display in an adjustable table via spinboxes \ No newline at end of file diff --git a/docs/release_notes/next/feature-2048-spectrum_documentation b/docs/release_notes/next/feature-2048-spectrum_documentation deleted file mode 100644 index 78483836ed3..00000000000 --- a/docs/release_notes/next/feature-2048-spectrum_documentation +++ /dev/null @@ -1 +0,0 @@ -#2048: Update spectrum documentation to reflect changes made to the Spectrum Viewer. \ No newline at end of file diff --git a/docs/release_notes/next/fix-1873-unexpected-float b/docs/release_notes/next/fix-1873-unexpected-float deleted file mode 100644 index 5370349eddf..00000000000 --- a/docs/release_notes/next/fix-1873-unexpected-float +++ /dev/null @@ -1 +0,0 @@ -#1873 : fix typeError: qWait(ms: int): argument 1 has unexpected type 'float' diff --git a/docs/release_notes/next/fix-1966-ExecutionTimer b/docs/release_notes/next/fix-1966-ExecutionTimer deleted file mode 100644 index 411a404c999..00000000000 --- a/docs/release_notes/next/fix-1966-ExecutionTimer +++ /dev/null @@ -1 +0,0 @@ -#1966: ExecutionTimer unit test fails intermittently for Windows GitHub Action diff --git a/docs/release_notes/next/fix-2002-default-values b/docs/release_notes/next/fix-2002-default-values deleted file mode 100644 index d169a0e13b6..00000000000 --- a/docs/release_notes/next/fix-2002-default-values +++ /dev/null @@ -1,2 +0,0 @@ -#2002 : Better default values in Remove all stripes - diff --git a/docs/release_notes/next/fix-2009-type annotations b/docs/release_notes/next/fix-2009-type annotations deleted file mode 100644 index 7ba55b721a7..00000000000 --- a/docs/release_notes/next/fix-2009-type annotations +++ /dev/null @@ -1 +0,0 @@ -#2009 : Improve type annotation in gui.windows.recon diff --git a/docs/release_notes/next/fix-2012-numpy_update b/docs/release_notes/next/fix-2012-numpy_update deleted file mode 100644 index 03f43a92103..00000000000 --- a/docs/release_notes/next/fix-2012-numpy_update +++ /dev/null @@ -1 +0,0 @@ -#2012 : numpy2 deprication diff --git a/docs/release_notes/next/fix-2030-slow-imageview b/docs/release_notes/next/fix-2030-slow-imageview deleted file mode 100644 index 84276927002..00000000000 --- a/docs/release_notes/next/fix-2030-slow-imageview +++ /dev/null @@ -1 +0,0 @@ -#2031 : Speed up imageview by avoiding unneeded calculation diff --git a/docs/release_notes/next/next.rst b/docs/release_notes/next/next.rst new file mode 100644 index 00000000000..41c12a20ef2 --- /dev/null +++ b/docs/release_notes/next/next.rst @@ -0,0 +1,16 @@ +Mantid Imaging next release +=========================== + +This contains changes for the next not yet released Mantid Imaging versions. + +New Features +------------ +.. release_notes:: feature + +Fixes +----- +.. release_notes:: fix + +Developer Changes +----------------- +.. release_notes:: dev From cd9cfde1c41211ce3ae78a5e2c07ba6694058c64 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Fri, 1 Mar 2024 12:43:52 +0000 Subject: [PATCH 18/18] Update version in docs template --- docs/_templates/versioning.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_templates/versioning.html b/docs/_templates/versioning.html index 28f6ae825f4..61a6ca01e50 100644 --- a/docs/_templates/versioning.html +++ b/docs/_templates/versioning.html @@ -13,7 +13,7 @@

{{ _('Versions') }}

{{ _('Versions') }}

  • Latest
  • - {%- for item in ['2.3.0', '2.4.0', '2.5.0', '2.6.0'] %} + {%- for item in ['2.3.0', '2.4.0', '2.5.0', '2.6.0', '2.7.0'] %}
  • {{ item }}
  • {%- endfor %}