You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Libdoc: Store information about enums and TypedDicts used as argument types in spec files #3607
Then we could add <arg type="MyEnum">myarg</arg> in the libpsec (or officialize the myarg: MyEnum=Enum1, which is already being used) so that the language server could identify that properly.
This idea sounds good to me but I'm not certain what's the best way to implement it. Need to think about that more and should also think how to show enums in Libdoc HTML outputs.
I don't think we can do changes to Libdoc specs in a patch version like RF 3.2.2 so need to wait for RF 3.3 or whatever the next bigger release will be.
We had a discussion with BrowserLibrary team at what our use case for this would be and for our documentation it would make most sense if we could have a types section after the keywords section containing all the enums (which we could expose via some get_data_types librarymethod). And then the keyword specific docs could link to those enums wherever they are mentioned.
changed the title [-]Enhance libspec so that it's possible to provide code-completion and validation for enum arguments[/-][+]Libdoc: Enhance specs so that it's possible to provide code-completion and validation for enum arguments[/+]on Nov 23, 2020
<enum name="AssertionOperator">
<doc>This is some Doc
This has was defined by assigning to __doc__.</doc>
<members>
<member name="equal" value="=="/>
<member name="==" value="=="/>
<member name="<" value="<"/>
<member name=">" value=">"/>
<member name="<=" value="<="/>
<member name=">=" value=">="/>
</members>
</enum>
JSON:
"enums": [
{
"name": "AssertionOperator",
"type": "Enum",
"doc": "<p>This is some Doc</p>\n<p>This has was defined by assigning to __doc__.</p>",
"members": [
{
"name": "equal",
"value": "=="
},
{
"name": "==",
"value": "=="
},
{
"name": "<",
"value": "<"
},
{
"name": ">",
"value": ">"
},
{
"name": "<=",
"value": "<="
},
{
"name": ">=",
"value": ">="
}
]
}
]
Related to #3783 Libdoc: Stored data types should be documented in LibDoc HTML #3784 Libdoc: TypedDict types shall be documented in spec files as Enums are.
changed the title [-]Libdoc: Enhance specs so that it's possible to provide code-completion and validation for enum arguments[/-][+]Libdoc: Store information about enums and TypedDicts used as argument types in spec files[/+]on Nov 30, 2020
Let's merge this issue with storing TypedDict info in specs (#3784). They be implemented by the same PR (#3743) and have common issue about showing the info in HTML (#3783).
Activity
fabioz commentedon Jul 6, 2020
@pekkaklarck what do you think about the idea? Do you have any suggestions?
pekkaklarck commentedon Jul 13, 2020
This idea sounds good to me but I'm not certain what's the best way to implement it. Need to think about that more and should also think how to show enums in Libdoc HTML outputs.
I don't think we can do changes to Libdoc specs in a patch version like RF 3.2.2 so need to wait for RF 3.3 or whatever the next bigger release will be.
xylix commentedon Jul 23, 2020
We had a discussion with BrowserLibrary team at what our use case for this would be and for our documentation it would make most sense if we could have a
typessection after thekeywordssection containing all the enums (which we could expose via someget_data_typeslibrarymethod). And then the keyword specific docs could link to those enums wherever they are mentioned.[-]Enhance libspec so that it's possible to provide code-completion and validation for enum arguments[/-][+]Libdoc: Enhance specs so that it's possible to provide code-completion and validation for enum arguments[/+]Snooz82 commentedon Nov 29, 2020
XML have now this format:
JSON:
Snooz82 commentedon Nov 30, 2020
Related to
#3783 Libdoc: Stored data types should be documented in LibDoc HTML
#3784 Libdoc: TypedDict types shall be documented in spec files as Enums are.
[-]Libdoc: Enhance specs so that it's possible to provide code-completion and validation for enum arguments[/-][+]Libdoc: Store information about enums and TypedDicts used as argument types in spec files[/+]pekkaklarck commentedon Nov 30, 2020
Let's merge this issue with storing TypedDict info in specs (#3784). They be implemented by the same PR (#3743) and have common issue about showing the info in HTML (#3783).
Support enums and TypedDicts with Libdoc
Support enums and TypedDicts with Libdoc