-
Notifications
You must be signed in to change notification settings - Fork 400
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
feat(docs): generate docs from docstrings #5131
base: develop
Are you sure you want to change the base?
feat(docs): generate docs from docstrings #5131
Conversation
Bumps [cfn-lint](https://github.com/aws-cloudformation/cfn-lint) from 1.5.3 to 1.6.0. - [Release notes](https://github.com/aws-cloudformation/cfn-lint/releases) - [Changelog](https://github.com/aws-cloudformation/cfn-lint/blob/main/CHANGELOG.md) - [Commits](aws-cloudformation/cfn-lint@v1.5.3...v1.6.0) --- updated-dependencies: - dependency-name: cfn-lint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
Bumps [cfn-lint](https://github.com/aws-cloudformation/cfn-lint) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/aws-cloudformation/cfn-lint/releases) - [Changelog](https://github.com/aws-cloudformation/cfn-lint/blob/main/CHANGELOG.md) - [Commits](aws-cloudformation/cfn-lint@v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: cfn-lint dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
aws-powertools#4753) Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.3.3 to 4.3.4. - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](actions/dependency-review-action@72eb03d...5a2ce3f) --- updated-dependencies: - dependency-name: actions/dependency-review-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
* Initial commit OpenAPI Extensions * Polishing the PR with best practicies - Comments * Polishing the PR with best practicies - Tests * Polishing the PR with best practicies - make pydanticv2 happy * Polishing the PR with best practicies - using model_validator to be more specific * Temporary mypy disabling * Make mypy happy? * Make mypy happy? * Polishing the PR with best practicies - adding e2e tests * Adding docstring * Adding documentation * Addressing Simon's feedback * Addressing Simon's feedback * Addressing Simon's feedback * Adding more tests * Adding more tests * Adding more tests
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
…07 to 0.1.211 (aws-powertools#4760) chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.207 to 0.1.211. - [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases) - [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md) - [Commits](awslabs/generative-ai-cdk-constructs@v0.1.207...v0.1.211) --- updated-dependencies: - dependency-name: cdklabs-generative-ai-cdk-constructs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
…#4763) Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.9.0 to 2.10.0. - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](getsentry/sentry-python@2.9.0...2.10.0) --- updated-dependencies: - dependency-name: sentry-sdk dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.1 to 0.5.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.5.1...0.5.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#4765) Bumps [aws-cdk](https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk) from 2.148.0 to 2.149.0. - [Release notes](https://github.com/aws/aws-cdk/releases) - [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md) - [Commits](https://github.com/aws/aws-cdk/commits/v2.149.0/packages/aws-cdk) --- updated-dependencies: - dependency-name: aws-cdk dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rtools#4764) Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.28 to 9.5.29. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](squidfunk/mkdocs-material@9.5.28...9.5.29) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
…11 to 0.1.212 (aws-powertools#4769) chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.211 to 0.1.212. - [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases) - [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md) - [Commits](awslabs/generative-ai-cdk-constructs@v0.1.211...v0.1.212) --- updated-dependencies: - dependency-name: cdklabs-generative-ai-cdk-constructs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
…s#4770) Bumps [datadog-lambda](https://github.com/DataDog/datadog-lambda-python) from 6.96.0 to 6.97.0. - [Release notes](https://github.com/DataDog/datadog-lambda-python/releases) - [Commits](DataDog/datadog-lambda-python@v6.96.0...v6.97.0) --- updated-dependencies: - dependency-name: datadog-lambda dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
… 1.27.27 in /layer/scripts/layer-balancer in the layer-balancer group (aws-powertools#4779) chore(deps): bump github.com/aws/aws-sdk-go-v2/config Bumps the layer-balancer group in /layer/scripts/layer-balancer with 1 update: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.26 to 1.27.27 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@config/v1.27.26...config/v1.27.27) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: layer-balancer ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…tools#4776) Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.23.7 to 0.23.8. - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](pytest-dev/pytest-asyncio@v0.23.7...v0.23.8) --- updated-dependencies: - dependency-name: pytest-asyncio dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [cfn-lint](https://github.com/aws-cloudformation/cfn-lint) from 1.6.1 to 1.8.1. - [Release notes](https://github.com/aws-cloudformation/cfn-lint/releases) - [Changelog](https://github.com/aws-cloudformation/cfn-lint/blob/main/CHANGELOG.md) - [Commits](aws-cloudformation/cfn-lint@v1.6.1...v1.8.1) --- updated-dependencies: - dependency-name: cfn-lint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.2 to 0.5.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.5.2...0.5.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…a timeout. (aws-powertools#4773) * fix(idempotency): fix timeout bug from aws-powertools#4759 * Adding comment * Adding comment --------- Co-authored-by: Leandro Damascena <[email protected]>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]>
…76beecf11f8e8539d73a3553bf4 to 80edfc24bdf1283400eb04d20a8a605ae8bf7d48 (aws-powertools#4786) chore(deps): bump aws-actions/closed-issue-message Bumps [aws-actions/closed-issue-message](https://github.com/aws-actions/closed-issue-message) from 8b6324312193476beecf11f8e8539d73a3553bf4 to 80edfc24bdf1283400eb04d20a8a605ae8bf7d48. - [Commits](aws-actions/closed-issue-message@8b63243...80edfc2) --- updated-dependencies: - dependency-name: aws-actions/closed-issue-message dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
….145 in the boto-typing group (aws-powertools#4787) chore(deps-dev): bump mypy-boto3-secretsmanager in the boto-typing group Bumps the boto-typing group with 1 update: [mypy-boto3-secretsmanager](https://github.com/youtype/mypy_boto3_builder). Updates `mypy-boto3-secretsmanager` from 1.34.128 to 1.34.145 - [Release notes](https://github.com/youtype/mypy_boto3_builder/releases) - [Commits](https://github.com/youtype/mypy_boto3_builder/commits) --- updated-dependencies: - dependency-name: mypy-boto3-secretsmanager dependency-type: direct:development update-type: version-update:semver-patch dependency-group: boto-typing ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lancer with 3 updates (aws-powertools#5114) chore(deps): bump the layer-balancer group Bumps the layer-balancer group in /layer/scripts/layer-balancer with 3 updates: [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/lambda](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2` from 1.30.4 to 1.30.5 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@v1.30.4...v1.30.5) Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.31 to 1.27.32 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@config/v1.27.31...config/v1.27.32) Updates `github.com/aws/aws-sdk-go-v2/service/lambda` from 1.58.1 to 1.58.2 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@service/s3/v1.58.1...service/s3/v1.58.2) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: layer-balancer - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: layer-balancer - dependency-name: github.com/aws/aws-sdk-go-v2/service/lambda dependency-type: direct:production update-type: version-update:semver-patch dependency-group: layer-balancer ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ws-powertools#5115) Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.10.0 to 1.10.1. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](pypa/gh-action-pypi-publish@8a08d61...0ab0b79) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leandro Damascena <[email protected]>
…03 (aws-powertools#5116) Bumps [types-redis](https://github.com/python/typeshed) from 4.6.0.20240819 to 4.6.0.20240903. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-redis dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leandro Damascena <[email protected]>
…to 2.155.0a0 (aws-powertools#5117) chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha Bumps [aws-cdk-aws-lambda-python-alpha](https://github.com/aws/aws-cdk) from 2.154.1a0 to 2.155.0a0. - [Release notes](https://github.com/aws/aws-cdk/releases) - [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md) - [Commits](https://github.com/aws/aws-cdk/commits) --- updated-dependencies: - dependency-name: aws-cdk-aws-lambda-python-alpha dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leandro Damascena <[email protected]>
…5119) Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.8 to 43.0.1. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](pyca/cryptography@42.0.8...43.0.1) --- updated-dependencies: - dependency-name: cryptography dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leandro Damascena <[email protected]>
…5118) Bumps [cfn-lint](https://github.com/aws-cloudformation/cfn-lint) from 1.11.1 to 1.12.1. - [Release notes](https://github.com/aws-cloudformation/cfn-lint/releases) - [Changelog](https://github.com/aws-cloudformation/cfn-lint/blob/main/CHANGELOG.md) - [Commits](aws-cloudformation/cfn-lint@v1.11.1...v1.12.1) --- updated-dependencies: - dependency-name: cfn-lint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…boto-typing group (aws-powertools#5121) chore(deps-dev): bump mypy-boto3-logs in the boto-typing group Bumps the boto-typing group with 1 update: [mypy-boto3-logs](https://github.com/youtype/mypy_boto3_builder). Updates `mypy-boto3-logs` from 1.35.10 to 1.35.12 - [Release notes](https://github.com/youtype/mypy_boto3_builder/releases) - [Commits](https://github.com/youtype/mypy_boto3_builder/commits) --- updated-dependencies: - dependency-name: mypy-boto3-logs dependency-type: direct:development update-type: version-update:semver-patch dependency-group: boto-typing ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lancer with 2 updates (aws-powertools#5124) chore(deps): bump the layer-balancer group Bumps the layer-balancer group in /layer/scripts/layer-balancer with 2 updates: [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) and [github.com/aws/aws-sdk-go-v2/service/lambda](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/config` from 1.27.32 to 1.27.33 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@config/v1.27.32...config/v1.27.33) Updates `github.com/aws/aws-sdk-go-v2/service/lambda` from 1.58.2 to 1.58.3 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@service/s3/v1.58.2...service/s3/v1.58.3) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/config dependency-type: direct:production update-type: version-update:semver-patch dependency-group: layer-balancer - dependency-name: github.com/aws/aws-sdk-go-v2/service/lambda dependency-type: direct:production update-type: version-update:semver-patch dependency-group: layer-balancer ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leandro Damascena <[email protected]>
…62 to 0.1.263 (aws-powertools#5122) chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.262 to 0.1.263. - [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases) - [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md) - [Commits](awslabs/generative-ai-cdk-constructs@v0.1.262...v0.1.263) --- updated-dependencies: - dependency-name: cdklabs-generative-ai-cdk-constructs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Powertools for AWS Lambda (Python) bot <[email protected]> Co-authored-by: Leandro Damascena <[email protected]>
…5126) Bumps [cfn-lint](https://github.com/aws-cloudformation/cfn-lint) from 1.12.1 to 1.12.3. - [Release notes](https://github.com/aws-cloudformation/cfn-lint/releases) - [Changelog](https://github.com/aws-cloudformation/cfn-lint/blob/main/CHANGELOG.md) - [Commits](aws-cloudformation/cfn-lint@v1.12.1...v1.12.3) --- updated-dependencies: - dependency-name: cfn-lint dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leandro Damascena <[email protected]>
Co-authored-by: Leandro Damascena <[email protected]>
This is a fairly major change to the docs and generates documentation for all public methods, attributes and variables in AWS Powertools. This is achieved using `mkdocstrings`, which replaces instances of ```markdown ::: some.module.path ``` with the documentation of the specified module. As a side effect of generating the documentation, an `objects.inv` file is also generated. From a quick purview of the generated docs, they seem pretty good as the underlying code appears well documented; however, this probably needs to be double checked. Especially for cases where the Numpy docstring style is not being followed which may result in errors generating the docs. Ref: aws-powertools#5125 Signed-off-by: JP-Ellis <[email protected]>
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
Quality Gate passedIssues Measures |
Hey @JP-Ellis thanks for working in this PR and creating a reproduicle outcome from what we can expect. Let me split down my feedback to make easy we agree on the next steps. pdoc3 vs mkdocstringsWe already have an API documentation created by pdoc3, which works well. Personally, I like it; however, I see much more value in using Testing this PR2 - I tested this PR locally and I was able to create the Current limitations/problems3 - Even if we agreeing to migrate from We should not render these attributes The code is completely broken here We should not have these special characters in the examples Making a smooth transitionI'm thinking about making a smooth transition from Enabling a new Ruff rule5 - We can use this opportunity to progressively enable a new Ruff linter rule: https://docs.astral.sh/ruff/rules/#pydocstyle-d. We didn't enable that because our docstrings and comments need to be revamped. Next stepsSo, based on what I explained before, I suggest the next steps are: 1 - Modify this PR to add just one utility and make all the changes we need to make to the mkdocstrings + docstrings configuration. I suggest we start with BatchProcessing as the codebase is not complex and we can do an excellent job on it that will serve as a base for the others. Please let me know what you think and if you would like to make these changes and go through some back-and-forth review process. If you don't have time to do this —we know everyone is very busy— I can handle it and ping you for reviews and feedback. Please let me know your thoughts. Again, thanks a lot for kicking out this to make our documentation even better. |
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.
Leaving a comment to Request Changes.
Amazing feedback! I should have made it clear at the start that this is meant to be a first proof-of-concept and step towards MkDocstrings. I didn't want to invest too much time in case this wasn't going to be adopted. I'm glad to hear this is something you are keen on! To answer some of your more specific feedback.
I'll be honest, I completely missed that. But I'm glad to hear this was in the pipeline already!
Completely agree. When I personally use this, I actually create a small Python scripts that is invoked by Mkdocs to automatically generate the Markdown files on-the-fly. There are a couple of pros and cons:
Yeah, that's completely fair. A per-utility approach would certainly be possible. Since you already have the Note The below docs are in the process of being transitioned and may contain some formatting issues.
Absolutely a fantastic thing to add. Just be aware that Ruff doesn't necessarily enforce all docstring rules all the time as it tries to be smart about which lints are applicable to which rules. As a concrete example in repos I maintain, Ruff will detect if there is a mismatch between the args documented and the args in the function; but it will not raise a lint if the docstring has no args at all. This can be problematic if the args are in fact documented but in a style which Ruff did not expect. With the pace of Ruff's development, this may have changed over the past months, but that is something to be aware of.
Sounds good! I won't get much time this week to contribute, but hopefully this weekend or next week I should get a bit of time :) |
Hey @JP-Ellis! Thanks for the feedback and clarifying things about this PoC. I am writing additional feedback based on your answers.
Yes, we should avoid doing this. My observation about the number of files is because it makes it difficult to review the PR and we can lose attention with too many files. That's why I suggested dividing this into small PRs by utility, which will make our work easier.
Perfect, this is a really good idea.
Hmmm, I didn't know that. I'll spend some time checking this out and see what limitations/caveats we should be aware of and deal with "manually" when doing this work.
Perfect! Take your time, no rush at all and will be amazing to make this change and improve our documentation. Thanks for taking the time to do this and let's make it happen 😄 |
Issue number: #5125
Summary
Changes
This is a fairly major change to the docs and generates documentation for all public methods, attributes and variables in AWS Powertools.
This is achieved using
mkdocstrings
, which replaces instances ofwith the documentation of the specified module.
As a side effect of generating the documentation, an
objects.inv
file is also generated.From a quick purview of the generated docs, they seem pretty good as the underlying code appears well documented; however, this probably needs to be double checked. Especially for cases where the Numpy docstring style is not being followed which may result in errors generating the docs.
User experience
There is no change to the usage of AWS Powertools.
There will be a significant change to the documentation in that the classes/functions/variables will be made public. Most editors would already be presenting this information to developers already, but this just makes it discoverable online.
The main benefit here is that other docs which want to refer to a specific class or function from AWS Powertools can now do so using the
objects.inv
file generated.Checklist
If your change doesn't seem to apply, please leave them unchecked.
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.