-
Notifications
You must be signed in to change notification settings - Fork 382
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
Standardize and improve docstring #562
Conversation
- Fix typos - For method JSDoc starting with a verb, standardize the verbs to be without the `-s` suffix - Add proper capitalization to JSDoc - Rephrase some JSDoc to make it clearer - Add parameter and return types to JSDoc - Add proper indication of optional parameters to JSDoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking public API is for me a no-no. It means that every roslib application that has ever been made must now be upgraded.
Standardize and improve docstrings is very welcome. Maybe you could split your PR in 2?
@jamestiotio Thanks for your efforts. Like @Rayman said the changes in the documentation is very welcome. I think any breaking change is not accepted. As I don't plan any major version bump any time soon (and not so soon as well). |
Understood. In that case, I have reverted the breaking changes. Essentially, I have aligned the docstrings to simply follow the implementation as the source of truth. To avoid confusion, I used the |
Please cherry-pick 605ef08 in your branch. Than we are good to go. Thanks for your efforts. |
@MatthijsBurgh Commit has been cherry-picked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes related optional/default values
Co-authored-by: Matthijs van der Burgh <[email protected]>
…#562) Bumps [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/HEAD/packages/node-resolve) from 13.3.0 to 14.1.0. - [Release notes](https://github.com/rollup/plugins/releases) - [Changelog](https://github.com/rollup/plugins/blob/master/packages/node-resolve/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/node-resolve-v14.1.0/packages/node-resolve) --- updated-dependencies: - dependency-name: "@rollup/plugin-node-resolve" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Standardize JSDoc format and add proper types to JSDoc - Fix typos - For method JSDoc starting with a verb, standardize the verbs to be without the `-s` suffix - Add proper capitalization to JSDoc - Rephrase some JSDoc to make it clearer - Add parameter and return types to JSDoc - Add proper indication of optional parameters to JSDoc * Remove dead code in ActionListener * Lint whitespace and align ActionServer param name with JSDoc * Refactor Ros.js to align callback parameters with JSDoc * Update check-topics tests * Fix check-topics example test * Revert breaking changes and align docstring to impl as source of truth * Remove 'An object with the following keys' * Specify default param values explicitly in docstring Co-authored-by: Matthijs van der Burgh <[email protected]> * Fix typos * Specify more default param values Co-authored-by: Matthijs van der Burgh <[email protected]> Co-authored-by: Matthijs van der Burgh <[email protected]>
Public API Changes
The refactoring to
core/Ros.js
might break some applications. However, the proposed changes would make the public API more straightforward in two ways:getNodeDetails
method, the callback function signature now remains the same, whether there is afailedCallback
function defined or not. Previously, the function signature differs between the two, which might lead to further confusion.Description
This PR standardizes and improves the docstring, along with a few other small things.
More specifically, this PR does the following (in rough order of significance):
-s
suffix.Additionally, there are some non-docstring changes (again, in rough order of significance):
core/Ros.js
to align the callback parameters with the ones specified in the corresponding docstrings. Tests are also updated to follow the new callback function signatures.setSucceeded
,setAborted
, andsendFeedback
inactionlib/SimpleActionServer.js
with the respective docstrings.actionlib/ActionListener.js
(the optionstimeout
,omitFeedback
,omitStatus
, andomitResult
are not used there).actionlib/SimpleActionServer.js
andcore/SocketAdapter.js
.Relevant GitHub issues:
This PR closes #542.