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

Cleanup documentation #52

Open
stropitek opened this issue Dec 6, 2016 · 4 comments
Open

Cleanup documentation #52

stropitek opened this issue Dec 6, 2016 · 4 comments

Comments

@stropitek
Copy link
Contributor

The documentation is very messy right now. Most of the stuff should not be publicly documented, only the public API should. The possibilities:

  • mark the jsdoc with @private so that it's "ignored" during the documentation build
  • but if a function doesn't need to be rigorously documented, then it doesn't have to be a jsdoc comment in the first place. For example
/**
 * Find a combination of integer heights Hi, one from each Si, that sums to 2n.
 * @param ranges
 * @param value
 * @returns {*}
 */

Is a very verbose way to just describe the function signature, and has no added value if no more details are specified

Also you should review the warnings given by eslint about jsdoc: npm run eslint and try to fix them.

@stropitek
Copy link
Contributor Author

Reminder: to build the documentation, cheminfo docs, to build and push the documentation to github: cheminfo docs --publish

@stropitek
Copy link
Contributor Author

stropitek commented Dec 6, 2016

Here is an example of how to properly document a function that has an object passed as argument and default options

    /**
     * Creates a SD instance from the given jcamp.
     * @param {string} jcamp - The jcamp string to parse from
     * @param {object} options - Jcamp parsing options
     * @param {boolean} [options.keepSpectra=true] - If set to false the spectra data points will not be stored in the instance
     * @param {RegExp} [options.keepRecordsRegExp=/^.+$/] - A regular expression for metadata fields to extract from the jcamp
     * @return {SD} Return the constructed SD instance
     */

@andcastillo
Copy link
Contributor

andcastillo commented Dec 6, 2016

Some functions in the API have an old format. And it has not been updated. About the verbosity of the private functions, it is automatically generated when your write /** and Enter to write the function signature and I don't find anything bad in it. But the idea of marking it as private seems good to me.

@andcastillo
Copy link
Contributor

@jobo322 you should take care of this thread.

jobo322 added a commit that referenced this issue Jan 15, 2017
jobo322 added a commit that referenced this issue Jan 16, 2017
with respect to issues #19 #28 #48 #52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants