Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only display documentation units for Real and std::vector<Real> input parameters #29115

Open
gambka opened this issue Nov 21, 2024 · 0 comments
Labels
T: task An enhancement to the software.

Comments

@gambka
Copy link
Contributor

gambka commented Nov 21, 2024

Motivation

The new feature for setDocUnit to render in the input parameter descriptions added here: #27352 adds the unit for all types of input parameters, regardless if they should have units (e.g., bool, MooseEnum, int, etc.). By default for parameters where setDocUnit is not provided in the InputParameters list the following string is presented: '(no unit assumed)'. Discussions with others have suggested we suppress the presentation of the unit for params that are not Real or std::vector<Real> at this time.

Design

We have access to the cpp_type to also Render for the input parameters so we can query the type and check if it is Real or std::vector<Real> (on MooseDocs this is double or std::vector<double>) and do the current setting of the unit only if the cpp_type is either of these 2.

Another feature would be on the InputParameter side to error if the an input param of not these two types is passed to setDocUnit that and error is provided to the user.

Impact

Cleaner documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: task An enhancement to the software.
Projects
None yet
Development

No branches or pull requests

1 participant