Document method wrappers which transform the `auto` value for a parameter
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Start by reading httomo/method_wrappers/dezinging.py around lines 51–58 and httomo/method_wrappers/generic.py around lines 264–269. Identify the wrappers that accept auto for axis and document how each transforms it before calling the underlying method. Done means the wrapper documentation clearly explains the YAML value and the resulting method parameter type.
Written by the indexing model from the issue text.
Description
The auto value can be used for a few different parameters of different methods, such as:
axisof a dezinger method wrapped byDezingingWrapper
https://github.com/DiamondLightSource/httomo/blob/74b94c9140945211657617c00b7ff9694455d60d/httomo/method_wrappers/dezinging.py#L51-L58axisof an image saver method (though doesn't appear in the image saver wrapper, but in the generic wrapper)
https://github.com/DiamondLightSource/httomo/blob/74b94c9140945211657617c00b7ff9694455d60d/httomo/method_wrappers/generic.py#L264-L269
The underlying methods from their respective libraries have the axis parameter which don't have auto as a possible value, but in httomo YAML pipeline config files we have introduced the ability to override the value of this axis parameter and have the associated wrapper transform the "auto" into something else on behalf of the users.
This results in the YAML config file for a method using the auto value presenting a different public API compared to the public API of the method function in its respective library (ie, its type signature): in httomo, the value of axis is presented to be able to be auto, but in the method function itself, the value of axis is an int. These will have different types:
- allowing
axisto have a value ofautoin addition to integers will have the typeUnion[Literal["auto"], int] - allowing
axisto only have an integer value will have typeint
The method wrappers doing this transformation from auto to an int (which form the perspective of types is a conversion from a Union[Literal["auto"], int] to an int) aren't documented as doing so.
Documenting the method wrappers to at least have some information about the transformation being done can help mitigate confusion regarding the two conflicting public API's that are exposed by httomo's YAML config files vs. the method function's documentation.
- 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
-
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
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100