-
Notifications
You must be signed in to change notification settings - Fork 24
Smithy Python Documentation #564
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
base: develop
Are you sure you want to change the base?
Conversation
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where does this come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For publishing I copied this over from the Publishing your site docs from Material for MkDocs. It uses outdated action tags so I updated those.
As for the git config
commands specifically, I believe that's what's recommend by actions/checkout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Jonathan! This looks great!
Just some general questions:
- Do we plan on supporting versioned docs?
- Can we include a release notes/changelog page in the future? This can helpful for developers looking for changes in specific versions.
- Are we going to enforce the Google docstring style or have we considered any other formats?
Lastly, generating the package documentation into one page is not a great UI experience for large packages such as smithy-core
. Can we reorganize the package documentation using a nested structure for sub pages? Should we be intentional in what we choose to document for users?
@@ -0,0 +1 @@ | |||
--8<-- "README.md" No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the "Home" that gets rendered at the top of the page and replace it with a "Smithy Python" title.
We'll need to explicitly ignore the first line of the README.md to avoid the duplication of the title.
Something like this:
# Smithy Python
<!-- Includes everything from README except the first heading -->
--8<-- "README.md:3:"
We'll also need to change this in mkdocs.yml
to remove the duplication in the sidebar:
# Navigation
nav:
- Getting Started: index.md # Add Getting Started to sidebar
The change renders:

- navigation.top | ||
- navigation.footer | ||
- content.code.copy | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove the dropdown menu for "Packages" and "Designs" and convert them to sections displaying all the sublinks directly. This removes the extra click needed to access package references. I don't think we expect these sections to grow by that much either.
- navigation.sections | |
This renders:

toggle: | ||
icon: material/brightness-7 | ||
name: Switch to dark mode | ||
primary: black |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Theme | ||
theme: | ||
name: material | ||
logo: assets/smithy-anvil.svg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also add the smithy logo as a favicon.
logo: assets/smithy-anvil.svg | |
logo: assets/smithy-anvil.svg | |
favicon: assets/smithy-anvil.svg |
Summary
This PR establishes a complete documentation infrastructure for the Smithy Python project using Material for MkDocs. The changes create a modern, automated documentation site that includes both API documentation and design documents.
Preview
Tip
See live docs here: https://jonathan343.github.io/smithy-python/
Key Changes
Content
mkdocstrings-python
plugin to auto-generate API docs from package source code for the following core smithy packages:smithy-core
,smithy-http
,smithy-json
,smithy-aws-core
,smithy-aws-event-stream
,aws-sdk-signers
Automated Publishing
Extras
Testing
The documentation can be previewed locally using:
Next Steps
After this PR is merged to
main
(in the next Smithy Python release), the documentation site will be automatically published and accessible via GitHub Pages. Future package documentation will be automatically generated from docstrings in the source code.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.