Skip to content

Commit e8770c0

Browse files
authored
Merge pull request #67 from DiamondLightSource/version_to_pipelines
adding a comment on httomo version during yaml full pipelines generation
2 parents 601e1f0 + c1f701b commit e8770c0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import httomo_backends
3232
import yaml
3333

34+
from httomo import __version__ as httomo_version
35+
3436
CS = ruamel.yaml.comments.CommentedSeq # defaults to block style
3537

3638

@@ -135,6 +137,13 @@ def yaml_pipelines_generator(
135137
except OSError as e:
136138
print("loading yaml template failed", e)
137139

140+
version_split = httomo_version.split(".")
141+
major = version_split[0]
142+
minor = version_split[1]
143+
pipeline_full.yaml_set_start_comment(
144+
f"This pipeline is supported by HTTomo ver. {major}.{minor}"
145+
)
146+
138147
if "loaders" in module_name:
139148
# should be the first method in the list
140149
pipeline_full.yaml_set_comment_before_after_key(

0 commit comments

Comments
 (0)