Add internal docs for metadata and array behind Extended help wrappers#694
Add internal docs for metadata and array behind Extended help wrappers#694felixcremer wants to merge 8 commits into
Conversation
These are not that useful, because they can't be reach anyways because they are in an extension.
| # Metadata utils | ||
|
|
||
| """ | ||
| Internal function. |
There was a problem hiding this comment.
Does "Internal function" do something or its just a marker?
I'm not used to adding this much documentation, don't we just want this as a code comment?
There was a problem hiding this comment.
IMO this is very nice - when you see it in a stack trace, you can run ? on it and immediately see what it does. For people who are good at Julia, not 100% immersed in the DD world, and want to debug an error - this is priceless.
But the string itself is just a marker, there's no special treatment.
There was a problem hiding this comment.
I am wondering, whether the marker "Internal function" is even needed nowadays, because with the public keyword, and the changes in Base handling of the show of non-public functions this is rather handled by Base.
|
In Julia 1.11 the Internal function thing and the extended help is not needed anymore because it would look like this: help?> ?DimensionalData._dimlength
│ Warning
│
│ The following bindings may be internal; they may change or be removed in future versions:
│
│ • DimensionalData._dimlength
Internal function
Extended help
≡≡≡≡≡≡≡≡≡≡≡≡≡
_dimlength(dim)
Return the length of the dimension dim or in case of a Tuple the length of every dimension in the Tuple.The first part with the | signs in front is inserted from the REPL and the Warning is in yellow, so we could just add the docstring normally to the non-public functions. |
This adds docstrings to internal functions in metadata and array which are hidden behind an
Extended helplayer. The idea is to provide the docstring, but to make clear that the functions are internal.The docstrings could clearly be improved, they are based on my current understanding from reading the code.
If you like the overall look of this, I might be going through more of the internal functions in the next weeks to add more internal documentation.
I also added docstrings to
DimVectorand similar types following the docstring examples for AbstractVector.In the REPL this would look like this for internal functions: