Skip to content

Conversation

@arandito
Copy link
Contributor

@arandito arandito commented Oct 30, 2025

Description

This PR replaces the Sphinx-based reStructuredText (RST) documentation generation system introduced in #418 with MkDocs and Markdown for AWS services only. It also updates the docstring format to use the Google style with Markdown descriptions fro all services (AWS and non-AWS).

Key changes:

  • Updates all code generators (Client, Structure, Config, Enum, Union) to output Google style docstrings with Markdown descriptions using MarkdownConverter
  • Adds pandoc CLI tool as a required build dependency to convert Smithy model documentation strings to Markdown for all services
  • Adds AwsMkDocsFileGenerator plugin to generate MkDocs stub files for only AWS services in their docs/ directory
  • Updates README with new pandoc dependency
  • Adds MkDocs configuration file and python dependencies to AWS services
  • Adds codegen utility function to determine if service is AWS or generic.
  • Removes AwsRstDocFileGenerator plugin and RST-to-Markdown conversion logic

Important

This PR only adds standalone docs for individual AWS clients. These can be built in each client and hosted separately. We plan to aggregate these all into a single top-level documentation site in awslabs/aws-sdk-python. This will happen post client generation and will use the stub files generated in docs/ directory for each client. We will also use Material for MkDocs.

Testing

Note

For local testing, please install pandoc v3.8.2 before running code generator.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@arandito arandito requested a review from a team as a code owner October 30, 2025 19:53
@arandito arandito marked this pull request as draft October 30, 2025 20:46
Copy link
Contributor

@jonathan343 jonathan343 left a comment

Choose a reason for hiding this comment

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

Thanks Antonio, this is a great start!

This PR can really be broken down into two main components:

  1. Formatting docstrings to comply with the requirements of MkDocs
  2. Generating the MkDocs specific files and static .md

The first 100% needs to happen at codegen time. However, the more I look at this, the more I feel like doing 2 during codegen time and committing all the static files will really bloat our SDK repo when we're working with 400+ clients. This open PR is adding 4000+ lines for one client. The more scalable approach here might be to do all this generation on the fly when needed like we do with botocore.

I don't see anything in the generated files in https://github.com/awslabs/aws-sdk-python/pull/24/files that would make it difficult to do the approach mentioned above. The generated clients themselves have all the information we need.

enable-cache: true

- name: Install pandoc
uses: pandoc/actions/setup@v1
Copy link
Contributor

Choose a reason for hiding this comment

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

nit - We should probably start pinning to commit SHAs instead of tags.

I'd recommend updating that here and then we can replace others in a separate PR

writer.write("::: " + symbol.toString());
writer.write("""
options:
heading_level: 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we change the default heading_level to 1 so we don't need to specify this case? Then if we need to go lower, we can be explicit

Related Docs: https://mkdocstrings.github.io/python/usage/configuration/headings/#heading_level

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.

2 participants