Skip to content

Commit c1f701b

Browse files
committed
adding corrections
1 parent 4510caa commit c1f701b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/source/utilities/yaml_generator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Templates generator
44
*******************
5-
:ref:`backends_content` can be generated automatically using the YAML generator tool `provided <https://github.com/DiamondLightSource/httomo/tree/main/scripts/yaml_templates_generator.py>`_ in the Github repo.
5+
:ref:`backends_content` can be generated automatically using the YAML generator tool `provided <https://github.com/DiamondLightSource/httomo-backends/blob/main/httomo_backends/scripts/yaml_pipelines_generator.py>`_ in the Github repo.
66

77
The script does the following:
88

httomo_backends/scripts/yaml_pipelines_generator.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@
3131
import httomo_backends
3232
import yaml
3333

34-
try:
35-
from httomo import __version__
36-
except:
37-
__version__ = "2.5" # backup version
38-
pass
39-
34+
from httomo import __version__ as httomo_version
4035

4136
CS = ruamel.yaml.comments.CommentedSeq # defaults to block style
4237

@@ -123,7 +118,12 @@ def yaml_pipelines_generator(
123118
except OSError as e:
124119
print("loading yaml template failed", e)
125120

126-
pipeline_full.yaml_set_start_comment(f"This pipeline is supported by HTTomo ver. {__version__.split('.')[0]}.{__version__.split('.')[1]}")
121+
version_split = httomo_version.split(".")
122+
major = version_split[0]
123+
minor = version_split[1]
124+
pipeline_full.yaml_set_start_comment(
125+
f"This pipeline is supported by HTTomo ver. {major}.{minor}"
126+
)
127127

128128
if "loaders" in module_name:
129129
# should be the first method in the list

0 commit comments

Comments
 (0)