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

Need to determine where function comments should be placed in MATLAB when abstract base classes are present #187

Open
elsevers opened this issue Mar 11, 2021 · 1 comment
Assignees
Labels
documentation Improvements or addition to documentation

Comments

@elsevers
Copy link
Contributor

When a class is implementing a base class, should the comments that describe its function be located in the abstract base class? Or in the class? I think it should be the abstract base class, but will MATLAB know to search there if someone types help?

Here is an example:

https://github.com/Severson-Group/eMach/blob/58f1f70dab76cf08dfeedd5f887436c983c8d4c8/tools/ToolBase.m#L15-L18

@elsevers elsevers added the documentation Improvements or addition to documentation label Mar 11, 2021
@ngadiyar93
Copy link
Member

It looks like the comments should be located in the class. To verify this, I removed comments from the open function in MagNet tool, added comments to the ToolBase and did a help MagNet.open and also a help ToolBase.open.
That gave me this generic help about Matlab's inbuilt open function, and nothing from the ToolBase.
image

Here is what I see when I add the documentation in the MagNet tool
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or addition to documentation
Projects
None yet
Development

No branches or pull requests

2 participants