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

Documentation cleanup and clarification #689

Merged
merged 2 commits into from
May 26, 2022
Merged

Conversation

camtarn
Copy link
Contributor

@camtarn camtarn commented Dec 6, 2021

I was having issues with the pymodbus documentation as a new user. I've tried to fix some of the issues I was running up against:

  • The return type of request methods was not documented, and the returned base classes were not included in the documentation
  • The client documentation page was cluttered and unclear, and needed a "here is the base client, here is the sync client, here are the async clients" explanation
  • Documentation for asyncio was not present because the actual pymodbus module is called async_io
  • Some docs were broken due to Sphinx syntax errors in the docstrings

The approach I have taken is obviously up for debate (especially exposing the base classes in __all__) but I wanted to get the ball rolling with some code :)

@sonarcloud
Copy link

sonarcloud bot commented Dec 6, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@dhoomakethu
Copy link
Contributor

@camtarn Thanks for the PR, there has been some discussions around using python type annotations for pymodbus3.x. I am not sure of the timelines for that, but I can include these for the time being.

Copy link
Collaborator

@janiversen janiversen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks good, with the update.

Should not be merged before #910, #911 and then rebased.

camtarn and others added 2 commits May 26, 2022 08:07
Expose base response classes to allow doc gen

Not having these base classes in the docs meant that the most important
documentation (i.e. how to retrieve response items from the response) was
undocumented.

If exposing them as public module classes is undesired, some Sphinx directives
could instead be used to cause Sphinx to document them.

Add newlines to docstrings to stop docs breaking

Remove automodule statement which didn\'t do anything

The module name is async_io, not asyncio

Add explanatory header text to pymodbus.client

The subpackages TOC tree is large and messy, and the most useful sections (the
client common mixin and the synchronous client) are buried well below the fold,
with no TOC entries for them.
@sonarcloud
Copy link

sonarcloud bot commented May 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@janiversen janiversen merged commit 67126da into pymodbus-dev:dev May 26, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants