-
Notifications
You must be signed in to change notification settings - Fork 2
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
Reference Documentation for all Classes and Methods #110
Open
cmodzelewski-dynata
wants to merge
16
commits into
dynata:dev
Choose a base branch
from
cmodzelewski-dynata:docs/add-RST-docs
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Reference Documentation for all Classes and Methods #110
cmodzelewski-dynata
wants to merge
16
commits into
dynata:dev
from
cmodzelewski-dynata:docs/add-RST-docs
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rating on Python 2.7.
In terms of next steps, I would recommend:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So building off of this great client library for Cmix, I've gone ahead and added a bunch of ReadTheDocs-style docstring documentation and ReStructuredText documentation using Sphinx to the project. I've also made some clean-ups to simplify the release and roll-out of this open source library for when we do future releases of it.
NOTE: All unit tests still pass.
Here are the changes that were made:
Documentation
Reference documentation can be generated locally from the command line by:
docs
directory and executing themake html
command:You can then view the HTML documentation by opening
../docs/_build/index.html
in your web browser.Setup and Version Tweaks
I slightly tweaked both the
setup.py
file (and built into the documentation) logic that reads the current version number from a__version__.py
file. This ensures that version numbering is consistent between the documentation on the one hand, and the release that would be uploaded to PyPi on the other.Using Github Actions, this can also be read for automatic release tagging as well.
STILL LEFT TO DO
Note that this is merely the first pass at documenting this library. There are a number of things that I think would help further:
We need to confirm that the documentation I included here is accurate. I built it based off of both an in-depth review of the Python source code and by reviewing the Cmix API swagger files...but as we all know, those swagger files are incomplete and may not be up to date.
There are a number of places in the documentation where I was uncertain of how to interpret certain things or where I could not find reference documentation in the swagger files. I marked those places as either "TBD" and included
.. todo::
call outs to visually indicate (in the rendered documentation) where we need to fill in additional documentation.We should connect the github repo to ReadTheDocs. Since the library is open-source and available under an MIT license, that's straightforward and easy to do. When connected, every time a new push happens it will update the ReadTheDocs documentation (ReadTheDocs is basically the "standard" for the Python community when it comes to documentation).
Right now, the README for the repo (and the long description that appears in PyPi.org) is driven by the
README.md
file. Personally, with all of the other open source libraries I maintain I've had very good experiences using more flexible / verbose reStructuredText to ensure consistency between the GH Repo's README, the PyPi description, and the "home page" for a library's ReadTheDocs documentation. It'll take a tiny bit of tweaking to get this done, but it's something we may want to consider.Right now, this is largely "reference" documentation. It does not yet contain recipes or patterns that show "how to do X" using the library. We should build out some of these examples.
The contribution guidelines and the testing overview are largely copy-pasted from other libraries that I maintain and have barely been adapted to the conventions used in this library. There are a couple of slight stylistic convention differences, for example (e.g. E251 from flake8), which - honestly - are largely cosmetic. However, the testing framework documentation needs to be overhauled to provide more guidance on the testing approach.
It'd be good to add
pytest-cov
to measure unit test coverage across the library. We can and should likewise connect the GH repo to codecov or something similar to get coverage badges as well. Nice to have, of course, not need to have.Anyway - that's it for now - hope this helps, and let me know if we should hop on a Teams call to talk through any of these tweaks / adjustments.