Skip to content

Make documentation relevant #237

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

Merged
merged 14 commits into from
Oct 11, 2022

Conversation

DifferentialOrange
Copy link
Member

@DifferentialOrange DifferentialOrange commented Oct 7, 2022

This PR updates existing tarantool-python module documentation and adds descriptions where they were missing. See commit messages for more detailed info.

To build documentation, first you must install its build requirements:

pip install -r requirements-doc.txt

Then run

make docs

You may host local documentation server with

python -m http.server --directory build/sphinx/html

Open localhost:8000 in your browser to read the docs.

Closes #67

This PR does not yet provide publishing documentation with CI, see #238. readthedocs module documentation will remain outdated until this PR would be reviewed thoroughly.

@DifferentialOrange DifferentialOrange changed the base branch from master to DifferentialOrange/gh-212-cleanup-python-2 October 7, 2022 11:49
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-67-relevant-docs branch from 17c8dfd to 6826b50 Compare October 7, 2022 11:58
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-67-relevant-docs branch from 6826b50 to 46bcca2 Compare October 10, 2022 07:52
Base automatically changed from DifferentialOrange/gh-212-cleanup-python-2 to master October 10, 2022 11:18
Using ``**kwargs`` with ``kwargs.get`` seems like an old-style way to
force argument to be a named one. It is seems like a bad practice and
makes it harder to make a readable documentation.

Part of #67
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-67-relevant-docs branch from 46bcca2 to 7d2fa80 Compare October 10, 2022 11:19
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-67-relevant-docs branch 4 times, most recently from 29c549a to 6619781 Compare October 10, 2022 12:41
Default 'classic' theme [1] was used by Python 2 documentation. It's not
well-suited for modern resolutions and it's sidebar width isn't
configurable, which is crucial for modules API ToC correct display.

1. https://www.sphinx-doc.org/en/master/usage/theming.html

Part of #67
Even though index, guide and quick start documentation pages have
Russian translation. it isn't published on readthedocs [1]. Since we
don't plan to have a Russian connector documentation for now, this patch
removes the files.

1. https://tarantool-python.readthedocs.io/en/latest/

Part of #67
Add or update docstings for submodule files contents. Submodules are not
meant to be used directly in code, but their descriptions will be
imported automatically to core module API description. It also may
help developers of this module.

Every submodule that could be of use is indexed in documentation now.

Set sphinx autodoc module to describe members and inherited members by
default.

Dataclass with factories display is not parsed correctly, see [1] issue.

1. sphinx-doc/sphinx#10893

Part of #67
Update core module docstring and autodoc parameters.

Part of #67
Due to DBAPI requirements, Connection and MeshConnection classes expose
exceptions as attributes. tarantool module also exposes several
exceptions. sphinx raises warnings about duplicate object description
due to multiple exception references. Since there is no way to put
``:noindex:`` in docstrings [1] and other solutions (like
``:meta private:``) are completely remove attribute descriptions, this
patch removes indexes with rst-level workarounds.

1. https://stackoverflow.com/questions/66736786/can-i-use-noindex-in-python-docstring-with-sphinx-autodoc

Part of #67
Sidebar with links was removed since it overlaps other elements.

Some descriptions were reduced since all required info is now provided
in API documentation.

Part of #67
Make README consistent with documentation index page. Remove
Tarantool 1.6 guides since the version was deprecated several years ago.

Part of #67
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-67-relevant-docs branch from 6619781 to 589d3ff Compare October 10, 2022 13:38
@DifferentialOrange
Copy link
Member Author

DifferentialOrange commented Oct 10, 2022

Add CHANGELOG entries where it seemed relevant.

@DifferentialOrange DifferentialOrange merged commit fc81b36 into master Oct 11, 2022
@DifferentialOrange DifferentialOrange deleted the DifferentialOrange/gh-67-relevant-docs branch October 11, 2022 06:55
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

Successfully merging this pull request may close these issues.

New manual for 0.5+ version driver
2 participants