RobotWebTools / roslibjs

The Standard ROS JavaScript Library
https://robotwebtools.github.io/roslibjs
Other
678 stars 378 forks source link

Standardize and improve docstring #562

Closed jamestiotio closed 2 years ago

jamestiotio commented 2 years ago

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:

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):

Additionally, there are some non-docstring changes (again, in rough order of significance):

Relevant GitHub issues: This PR closes #542.

MatthijsBurgh commented 2 years ago

@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).

jamestiotio commented 2 years ago

Breaking public API is for me a no-no.

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 @also tag for the getNodeDetails method in core/Ros.js to specify the two different possible callback function signatures. Do let me know if there is a better way to handle this.

MatthijsBurgh commented 2 years ago

Please cherry-pick https://github.com/RobotWebTools/roslibjs/commit/605ef08101e47d1cc0c20ca43a5c1d6f2cd2735f in your branch. Than we are good to go.

Thanks for your efforts.

jamestiotio commented 2 years ago

@MatthijsBurgh Commit has been cherry-picked.