-
Notifications
You must be signed in to change notification settings - Fork 13
Generate top-level and individual API reference docs for all SDK clients #36
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: feat/migrate-sphinx-to-mkdocs
Are you sure you want to change the base?
Generate top-level and individual API reference docs for all SDK clients #36
Conversation
285ae10 to
a447c2b
Compare
jonathan343
left a comment
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 Antonio, this is a great start. I've left some initial comments around the configuration of the documentation. I'll get to the generation scripts later tonight, but wanted to comment on what I've seen so far.
Additionally, I have some high-level comment around the top-level clients page:
- We need to remove the
Nonelinks and replace them with individual client links. - The individual client links throw
404 - Not found. - We need to avoid including folders like
.ruff_cache
jonathan343
left a comment
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.
More (mostly minor) comments after reviewing the generate_doc_stubs.py script. I know some of the navbar stuff is WIP, so I'll probably wait to review that file
| site_name: AWS SDK for Python | ||
| site_description: Documentation for AWS SDK for Python Clients | ||
|
|
||
| repo_name: awslabs/aws-sdk-pythons |
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.
| repo_name: awslabs/aws-sdk-pythons | |
| repo_name: awslabs/aws-sdk-python |
| repo_url: https://github.com/awslabs/aws-sdk-python | ||
|
|
||
| exclude_docs: | | ||
| README.md |
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.
Why is this needed?
| plugins: | ||
| - search | ||
| - literate-nav: | ||
| nav_file: SUMMARY.md |
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 you explain this SUMMARY.md file and how it's used?
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| sys.exit(main()) 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.
nit - A lot of these fines are missing a newline at the end of the file. We should add them.
For the Python files, we'll need a long-term solution for automating linter/formatter.
For now we can do uvx ruff check <script> and uvx ruff format <script>. It catches a few formatting issues and handles the newlines for us
|
|
||
| docs-serve: | ||
| @[ -d site ] || $(MAKE) docs | ||
| uv run python -m http.server $(DOCS_PORT) --bind 127.0.0.1 --directory site 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.
We may have discussed this before, but why not use something like uv run mkdocs serve --dev-addr 127.0.0.1:$(DOCS_PORT)?
| ] | ||
|
|
||
| docs = [ | ||
| "mkdocs~=1.6.1", |
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 try to keep constraints consistent between all clients and the top-level requirements
Description
This PR adds documentation generation for all AWS clients in the
aws-sdk-pythonrepo. Users can either generate a single top-level documentation site for all clients or independently for individual clients (see Testing).Documentation is built using:
Testing
For top-level client docs, execute these commands in the root level of this repo. For individual client documentation, execute these commands in each client's directory.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.