1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
From: Roland Mas <roland.mas@entierement.net>
Date: Fri, 2 Jan 2026 15:03:56 +0100
Subject: Fix comments for Python3.14 compatibility
---
nxtomomill/models/base/general_section.py | 2 +-
nxtomomill/models/edf2nx/general_section.py | 12 ++++++------
nxtomomill/models/edf2nx/sample_section.py | 6 +++---
nxtomomill/models/fluo2nx/general_section.py | 2 +-
nxtomomill/models/h52nx/frame_type_section.py | 8 ++++----
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/nxtomomill/models/base/general_section.py b/nxtomomill/models/base/general_section.py
index b1c6aa6..0e26758 100644
--- a/nxtomomill/models/base/general_section.py
+++ b/nxtomomill/models/base/general_section.py
@@ -19,7 +19,7 @@ class GeneralSection(BaseModel):
)
log_level: int = Field(
default=logging.WARNING,
- description='Log level: "debug", "info", "warning", "error"',
+ description='Log level "debug", "info", "warning", "error"',
)
@field_validator(
diff --git a/nxtomomill/models/edf2nx/general_section.py b/nxtomomill/models/edf2nx/general_section.py
index 9f6948f..6130d5b 100644
--- a/nxtomomill/models/edf2nx/general_section.py
+++ b/nxtomomill/models/edf2nx/general_section.py
@@ -29,8 +29,8 @@ class GeneralSection(_GeneralSectionBase):
default=tuple(),
description="Perform validation checks post-conversion to ensure data integrity and accuracy."
"This function accepts a list of specified tests to validate the conversion process."
- "Currently supported test:\n"
- "- 'compare-output-volume': Compares the volume of the output data to ensure it matches expected values.",
+ "Currently supported test\n"
+ "- 'compare-output-volume' Compares the volume of the output data to ensure it matches expected values.",
)
dataset_basename: str | None = Field(
default=None,
@@ -55,14 +55,14 @@ class GeneralSection(_GeneralSectionBase):
default=True,
description="Determines if we can create files with external links or not."
"If False then will create embed all the data into a single file avoiding external link to other file. "
- "If True then the detector data will point to original tif files. In this case you must be cautious to keep relative paths valid. Warning: to read external dataset you nust be at the hdf5 file working directory. See external link resolution details: https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html#title5",
+ "If True then the detector data will point to original tif files. In this case you must be cautious to keep relative paths valid. Warning, to read external dataset you nust be at the hdf5 file working directory.",
)
external_link_type: PathType = Field(
default=PathType.RELATIVE,
description="Specifies the type of file path to use for linking to original files when 'duplicate_data' is set to False."
- "When 'duplicate_data' is False, you can choose how file paths are referenced:"
- "\n- 'relative': Uses relative paths for linking to the original files."
- "\n- 'absolute': Uses absolute paths for linking to the original files.",
+ "When 'duplicate_data' is False, you can choose how file paths are referenced"
+ "\n- 'relative' Uses relative paths for linking to the original files."
+ "\n- 'absolute' Uses absolute paths for linking to the original files.",
alias="external_link_path",
)
diff --git a/nxtomomill/models/edf2nx/sample_section.py b/nxtomomill/models/edf2nx/sample_section.py
index d31b148..b583c5e 100644
--- a/nxtomomill/models/edf2nx/sample_section.py
+++ b/nxtomomill/models/edf2nx/sample_section.py
@@ -12,9 +12,9 @@ class SampleSection(BaseModel):
force_angle_calculation: bool = Field(
default=True,
description="Determines the method for obtaining rotation angles."
- "Options:"
- "* True: Compute from scan range: Uses `numpy.linspace` to generate rotation angles based on the provided scan range."
- "* False: Load from `.edf` header: Attempts to read the rotation angles directly from the `.edf` file header.",
+ "Options"
+ "* True Compute from scan range, Uses `numpy.linspace` to generate rotation angles based on the provided scan range."
+ "* False Load from `.edf` header, Attempts to read the rotation angles directly from the `.edf` file header.",
)
angle_calculation_endpoint: bool = Field(
default=False,
diff --git a/nxtomomill/models/fluo2nx/general_section.py b/nxtomomill/models/fluo2nx/general_section.py
index 8f87508..7154d9e 100644
--- a/nxtomomill/models/fluo2nx/general_section.py
+++ b/nxtomomill/models/fluo2nx/general_section.py
@@ -37,7 +37,7 @@ class GeneralSection(_GeneralSectionBase):
)
duplicate_data: bool = Field(
default=True,
- description="If False then will create embed all the data into a single file avoiding external link to other file. If True then the decetor data will point to original tif files. In this case you must be carreful to keep relative paths valid. Warning: to read external dataset you nust be at the hdf5 file working directory. See external link resolution details: https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html#title5",
+ description="If False then will create embed all the data into a single file avoiding external link to other file. If True then the decetor data will point to original tif files. In this case you must be carreful to keep relative paths valid. Warning, to read external dataset you nust be at the hdf5 file working directory.",
)
@field_validator(
diff --git a/nxtomomill/models/h52nx/frame_type_section.py b/nxtomomill/models/h52nx/frame_type_section.py
index 2733aad..a6dcc99 100644
--- a/nxtomomill/models/h52nx/frame_type_section.py
+++ b/nxtomomill/models/h52nx/frame_type_section.py
@@ -18,10 +18,10 @@ class FrameTypeSection(BaseModel):
data_scans: tuple[FrameGroup, ...] = Field(
default=tuple(),
description="List of scans to be converted."
- "Frame type should be provided for each scan. Expected format is:"
- " * `frame_type` (mandatory): values can be `projection`, `flat`, `dark`, `alignment` or `init`."
- " * `entry` (mandatory): DataUrl with path to the scan to integrate. If the scan is contained in the input_file then you can only provide path/name of the scan."
- " * `copy` (optional): you can provide a different behavior for the this scan (should we duplicate data or not)",
+ "Frame type should be provided for each scan. Expected format is"
+ " * `frame_type` (mandatory) values can be `projection`, `flat`, `dark`, `alignment` or `init`."
+ " * `entry` (mandatory) DataUrl with path to the scan to integrate. If the scan is contained in the input_file then you can only provide path/name of the scan."
+ " * `copy` (optional) you can provide a different behavior for the this scan (should we duplicate data or not)",
)
default_data_copy: bool = Field(
default=False,
|