Skip to content

Commit ce867e3

Browse files
Merge branch 'main' into 39617_remove_boost_optional_matrixvectorpairparser
2 parents c80a27e + 25aef3a commit ce867e3

File tree

152 files changed

+5405
-4486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+5405
-4486
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ repos:
5959
)$
6060
6161
- repo: https://github.com/astral-sh/ruff-pre-commit
62-
rev: v0.12.1
62+
rev: v0.12.2
6363
# ruff must appear before black in the list of hooks
6464
hooks:
6565
- id: ruff

CITATION.cff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ authors:
66
email: mantid-help@mantidproject.org
77
website: https://www.mantidproject.org/
88
title: Manipulation and Analysis Toolkit for Instrument Data
9-
version: 6.12.0
10-
doi: 10.5286/Software/Mantid6.12
11-
date-released: 2025-02-26
9+
version: 6.13.0
10+
doi: 10.5286/Software/Mantid6.13
11+
date-released: 2025-07-07
1212
keywords:
1313
- mantid
1414
- neutron

Framework/API/inc/MantidAPI/AlgorithmProperties.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "MantidAPI/Workspace.h"
1515
#include "MantidKernel/Strings.h"
1616

17-
#include <boost/optional.hpp>
1817
#include <map>
1918
#include <optional>
2019
#include <string>
@@ -25,9 +24,7 @@ namespace Mantid::API::AlgorithmProperties {
2524
// strings to set the relevant property in an AlgorithmRuntimeProps
2625

2726
void MANTID_API_DLL update(std::string const &property, std::string const &value, IAlgorithmRuntimeProps &properties);
28-
// TODO this method should no longer exist - migrate code to std::optional
29-
void MANTID_API_DLL update(std::string const &property, boost::optional<std::string> const &value,
30-
IAlgorithmRuntimeProps &properties);
27+
3128
void MANTID_API_DLL update(std::string const &property, std::optional<std::string> const &value,
3229
IAlgorithmRuntimeProps &properties);
3330

@@ -39,9 +36,6 @@ void MANTID_API_DLL update(std::string const &property, size_t value, IAlgorithm
3936

4037
void MANTID_API_DLL update(std::string const &property, double value, IAlgorithmRuntimeProps &properties);
4138

42-
// TODO this method should no longer exist - migrate code to std::optional
43-
void MANTID_API_DLL update(std::string const &property, boost::optional<double> const &value,
44-
IAlgorithmRuntimeProps &properties);
4539
void MANTID_API_DLL update(std::string const &property, std::optional<double> const &value,
4640
IAlgorithmRuntimeProps &properties);
4741

Framework/API/inc/MantidAPI/WorkspaceHistory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class MANTID_API_DLL WorkspaceHistory {
7777
/// Parse an algorithm history string loaded from file
7878
AlgorithmHistory_sptr parseAlgorithmHistory(const std::string &rawData);
7979
/// Find the history entries at this level in the file.
80-
std::set<int> findHistoryEntries(Nexus::File *file);
80+
std::set<int> findHistoryEntries(Nexus::File const *file);
8181
/// The environment of the workspace
8282
const Kernel::EnvironmentHistory m_environment;
8383
/// The algorithms which have been called on the workspace

Framework/API/src/AlgorithmProperties.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ void update(std::string const &property, std::string const &value, IAlgorithmRun
2020
properties.setPropertyValue(property, value);
2121
}
2222

23-
// TODO code that uses this should move to std::optional
24-
[[deprecated("use version with std::optional instead")]] void
25-
update(std::string const &property, boost::optional<std::string> const &value, IAlgorithmRuntimeProps &properties) {
26-
if (value)
27-
update(property, value.get(), properties);
28-
}
29-
3023
void update(std::string const &property, std::optional<std::string> const &value, IAlgorithmRuntimeProps &properties) {
3124
if (value)
3225
update(property, value.value(), properties);
@@ -48,13 +41,6 @@ void update(std::string const &property, double value, IAlgorithmRuntimeProps &p
4841
properties.setProperty(property, value);
4942
}
5043

51-
// TODO code that uses this should move to std::optional
52-
[[deprecated("use version with std::optional instead")]] void
53-
update(std::string const &property, boost::optional<double> const &value, IAlgorithmRuntimeProps &properties) {
54-
if (value)
55-
update(property, value.get(), properties);
56-
}
57-
5844
void update(std::string const &property, std::optional<double> const &value, IAlgorithmRuntimeProps &properties) {
5945
if (value)
6046
update(property, value.value(), properties);

Framework/API/src/IFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ void IFunction::addTies(const std::string &ties, bool isDefault) {
259259
const std::string expr = t[n].str();
260260
for (size_t i = n; i != 0;) {
261261
--i;
262-
auto parName = t[i].name();
262+
const auto &parName = t[i].name();
263263
auto parTie = createAndProcessTie(parName, expr, isDefault);
264264

265265
if (parTie) {

Framework/API/src/Sample.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,17 +329,17 @@ int Sample::loadNexus(Nexus::File *file, const std::string &group) {
329329

330330
// Version 0 = saveNexusProcessed before Sep 8, 2011
331331
int version = 0;
332-
try {
332+
if (file->hasAttr("version")) {
333333
file->getAttr("version", version);
334-
} catch (Nexus::Exception const &) {
334+
} else {
335335
version = 0;
336336
}
337337

338338
if (version == 0) {
339339
// Sample NAME field may/may not be present
340-
try {
340+
if (file->hasData("name")) {
341341
file->readData("name", m_name);
342-
} catch (Nexus::Exception const &) {
342+
} else {
343343
m_name = "";
344344
}
345345
}

Framework/API/src/WorkspaceHistory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void WorkspaceHistory::loadNestedHistory(Nexus::File *file, const AlgorithmHisto
309309
* @param file :: The handle to the nexus file
310310
* @returns set of integers. One for each algorithm at the level in the file.
311311
*/
312-
std::set<int> WorkspaceHistory::findHistoryEntries(Nexus::File *file) {
312+
std::set<int> WorkspaceHistory::findHistoryEntries(Nexus::File const *file) {
313313
std::set<int> historyNumbers;
314314
std::map<std::string, std::string> entries;
315315
file->getEntries(entries);

Framework/Algorithms/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ set(SRC_FILES
7777
src/CorrectKiKf.cpp
7878
src/CorrectTOFAxis.cpp
7979
src/CorrectToFile.cpp
80+
src/CreateBootstrapWorkspaces.cpp
8081
src/CreateCalFileByNames.cpp
8182
src/CreateDetectorTable.cpp
8283
src/CreateDummyCalFile.cpp
@@ -87,7 +88,6 @@ set(SRC_FILES
8788
src/CreateLogPropertyTable.cpp
8889
src/CreateLogTimeCorrection.cpp
8990
src/CreateMonteCarloWorkspace.cpp
90-
src/CreateBootstrapWorkspaces.cpp
9191
src/CreatePSDBleedMask.cpp
9292
src/CreatePeaksWorkspace.cpp
9393
src/CreateSampleWorkspace.cpp
@@ -108,6 +108,7 @@ set(SRC_FILES
108108
src/DetectorEfficiencyCor.cpp
109109
src/DetectorEfficiencyCorUser.cpp
110110
src/DetectorEfficiencyVariation.cpp
111+
src/DetermineSpinStateOrder.cpp
111112
src/DiffractionEventCalibrateDetectors.cpp
112113
src/DiffractionFocussing.cpp
113114
src/DiffractionFocussing2.cpp
@@ -428,6 +429,7 @@ set(INC_FILES
428429
inc/MantidAlgorithms/CorrectKiKf.h
429430
inc/MantidAlgorithms/CorrectTOFAxis.h
430431
inc/MantidAlgorithms/CorrectToFile.h
432+
inc/MantidAlgorithms/CreateBootstrapWorkspaces.h
431433
inc/MantidAlgorithms/CreateCalFileByNames.h
432434
inc/MantidAlgorithms/CreateDetectorTable.h
433435
inc/MantidAlgorithms/CreateDummyCalFile.h
@@ -438,7 +440,6 @@ set(INC_FILES
438440
inc/MantidAlgorithms/CreateLogPropertyTable.h
439441
inc/MantidAlgorithms/CreateLogTimeCorrection.h
440442
inc/MantidAlgorithms/CreateMonteCarloWorkspace.h
441-
inc/MantidAlgorithms/CreateBootstrapWorkspaces.h
442443
inc/MantidAlgorithms/CreatePSDBleedMask.h
443444
inc/MantidAlgorithms/CreatePeaksWorkspace.h
444445
inc/MantidAlgorithms/CreateSampleWorkspace.h
@@ -459,6 +460,7 @@ set(INC_FILES
459460
inc/MantidAlgorithms/DetectorEfficiencyCor.h
460461
inc/MantidAlgorithms/DetectorEfficiencyCorUser.h
461462
inc/MantidAlgorithms/DetectorEfficiencyVariation.h
463+
inc/MantidAlgorithms/DetermineSpinStateOrder.h
462464
inc/MantidAlgorithms/DiffractionEventCalibrateDetectors.h
463465
inc/MantidAlgorithms/DiffractionFocussing.h
464466
inc/MantidAlgorithms/DiffractionFocussing2.h
@@ -786,6 +788,7 @@ set(TEST_FILES
786788
CorrectKiKfTest.h
787789
CorrectTOFAxisTest.h
788790
CorrectToFileTest.h
791+
CreateBootstrapWorkspacesTest.h
789792
CreateCalFileByNamesTest.h
790793
CreateDetectorTableTest.h
791794
CreateDummyCalFileTest.h
@@ -795,7 +798,6 @@ set(TEST_FILES
795798
CreateLogPropertyTableTest.h
796799
CreateLogTimeCorrectionTest.h
797800
CreateMonteCarloWorkspaceTest.h
798-
CreateBootstrapWorkspacesTest.h
799801
CreatePSDBleedMaskTest.h
800802
CreatePeaksWorkspaceTest.h
801803
CreateSampleWorkspaceTest.h
@@ -817,6 +819,7 @@ set(TEST_FILES
817819
DetectorEfficiencyCorUserTest.h
818820
DetectorEfficiencyVariationTest.h
819821
DetectorGridDefinitionTest.h
822+
DetermineSpinStateOrderTest.h
820823
DiffractionEventCalibrateDetectorsTest.h
821824
DiffractionFocussing2Test.h
822825
DiffractionFocussingTest.h

Framework/Algorithms/inc/MantidAlgorithms/DetectorDiagnostic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Mantid {
2020
namespace Algorithms {
2121
/**
2222
A base class for a detector diagnostic algorithm. It has not exec
23-
implemenation but provides functions
23+
implementation but provides functions
2424
that are common among these algorithms such as calculating the median and
2525
writing to a file.
2626

0 commit comments

Comments
 (0)