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

API docs are stale #419

Open
michaeldiamant opened this issue Dec 12, 2022 · 3 comments
Open

API docs are stale #419

michaeldiamant opened this issue Dec 12, 2022 · 3 comments
Assignees

Comments

@michaeldiamant
Copy link
Contributor

Problem

While considering algorand/js-algorand-sdk#709, @algochoi pointed out https://py-algorand-sdk.readthedocs.io/en/latest/ does not contain recently introduced classes (e.g. https://github.com/algorand/py-algorand-sdk/blob/develop/algosdk/box_reference.py).

The story requests:

  • Update docs to be current.
  • Triage to identify if there's easier ways to keep docs in-sync.
    • Current process relies on manual creation of rst files.
    • If improvements are identified, port to pyteal or open an issue.

Solution

Dependencies

Urgency

@algochoi
Copy link
Contributor

Could investigate something like: https://github.com/copier-org/copier

@tzaffi
Copy link
Contributor

tzaffi commented May 15, 2023

The story requests:

  • Update docs to be current.

#481 addresses the first concern

  • Triage to identify if there's easier ways to keep docs in-sync.

    • Current process relies on manual creation of rst files.

We can automate as follows:

Create a module RST template:

module_name = "constants" 

template = """{name}
{equals}

.. automodule:: algosdk.{name}
   :members:
   :undoc-members:
   :show-inheritance:
"""

# Format the template
content = template.format(name=module_name, equals='='*len(module_name))

# Write to the file
with open(f"{module_name}.rst", 'w') as f:
    f.write(content)

@tzaffi
Copy link
Contributor

tzaffi commented May 15, 2023

  • Current process relies on manual creation of rst files.
  • If improvements are identified, port to pyteal or open an issue.

We can also write a docs_test.py which simply looks for algosdk.* modules and asserts that there aren't any unaccounted for in docs/algosdk/index.rst or docs/algosdk/*.rst.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants