Nexus: migrate docstrings for clarity#6027
Conversation
There was a problem hiding this comment.
Q. Have you tried a folding editor to hide the docstrings? I thought you used emacs which surely has some packages that can help?
More generally, I think your proposed solution will cause more problems than it solves. In particular, separation of docs from the code is a key thing that we are trying to avoid with docstrings. They works with many large projects and their use is completely standard in the python world. Perhaps others can suggest a route to avoid the visual disruption that you are trying to avoid? (@brockdyer03 , @PDoakORNL , @ye-luo ?)
Despite using various editors with fancy formatting and folding features, my personal solution is to simply hit page down more frequently.
Whatever is done here -- if anything -- should not be artisanal and should be common to many other major projects imo, otherwise it is just one more oddity for potential contributors to hurdle over.
|
This is not artisinal. The widely used and well documented |
Great. What about a simpler editor solution though? Is this really necessary? Surely every editor in wide use can fold the code if the length is a problem? |
|
I can see this is viewed as a narrow problem. Retracting suggestion. |
In Python, proper doctrings are often large, easily eclipsing the length of the e.g. function they were created to document. This adds excessive clutter when reading the code in file editors or on Github.
This PR adds a directory for docstrings that are imported and bound to the respective functions, etc. Outside queries like
helpwork, and automatic creation of online docs should also be compatible with this (further testing needed).