Add a description
to Parameter
s
#1153
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am new to pymeasure, but reading the documentation and source code I could not find a way to provide a description for each
Parameter
I add to myProcedure
. I think it would be really nice to have an officialdescription
field in the constructor ofParameter
s, so that the user can provide a human-friendly description with information that is not captured by the other fields or not obvious.In this pull request I am simply suggesting that this would be a good idea and providing a trivial implementation. What exactly is done with the
description
afterwards I still don't know, as I am not experienced with pymeasure. However, I would guess it could probably be integrated with the graphical interface machinery and other things, instead as being mere documentation strings in the code.Example:
as opposed to
which involves duplication between the code and the docstring.
Please let me know if this is already implemented somehow in Pymeasure, in that case I apologize for this.