Don't rely on `output_folder` global variable in YAML generator
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in templates/yaml_templates_generator.py, reading yaml_generator() and _save_yaml() around the referenced lines. Pass the output_folder value through the call instead of relying on the variable from the main block. Done means _save_yaml() no longer depends on that global while YAML generation continues to use the requested output folder.
Written by the indexing model from the issue text.
Description
The _save_yaml() function doesn't have a output_folder parameter, yet it somehow is able to
refer to it without defining it itself: https://github.com/DiamondLightSource/httomo/blob/878c74c32dad626b46a52f1b4a8505747f5fd978/templates/yaml_templates_generator.py#L124-L131
This is because it's using the output_folder defined in the if __name__ == "__main__" block at the bottom of the script: https://github.com/DiamondLightSource/httomo/blob/878c74c32dad626b46a52f1b4a8505747f5fd978/templates/yaml_templates_generator.py#L228-L232
Given that the _save_yaml() function is called by the main yaml_generator() function: https://github.com/DiamondLightSource/httomo/blob/878c74c32dad626b46a52f1b4a8505747f5fd978/templates/yaml_templates_generator.py#L96
which has been passed the output_folder value: https://github.com/DiamondLightSource/httomo/blob/878c74c32dad626b46a52f1b4a8505747f5fd978/templates/yaml_templates_generator.py#L37-L42
it would be nice to pass _save_yaml() the output_folder value, rather than have it rely on a global variable.
- Dominant language
- Python
- Stars
- 10
- Forks
- 5
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DiamondLightSource/httomo
-
ci
Difficulty 1/5 Under an hour Newbie friendliness 88/100
DiamondLightSource/httomo#714 ·
-
framework minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DiamondLightSource/httomo#699 ·
-
documentation question
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/httomo#697 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
DiamondLightSource/httomo#609 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
DiamondLightSource/httomo#607 ·
All issues in DiamondLightSource/httomo
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100