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

docs(all): update & revise docstring examples #1144

Conversation

dreamorosi
Copy link
Contributor

Description of your changes

Following the report in #1142 a community member highlighted the fact that some examples in the docstrings of the packages (mainly Tracer) were inconsistent with the ones in the published documentation.

In response to the issue I went through the examples and checked that they were appropriate and consistent, this PR contains the changes related to this review.

Changes:

  • Added middleware example to Metrics
  • Standardized order of usages in main docstring: middleware, decorator, manual
  • Cleaned up imports
  • Standardized usage of single quotes

How to verify this change

Check diff.

Related issues, RFCs

Issue number: #1142

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

Breaking change checklist

N/A


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

packages/metrics/src/Metrics.ts Show resolved Hide resolved
packages/metrics/src/Metrics.ts Show resolved Hide resolved
packages/metrics/src/middleware/middy.ts Show resolved Hide resolved
flochaz
flochaz previously approved these changes Nov 8, 2022
@dreamorosi
Copy link
Contributor Author

Since I have addressed the comments from @flochaz I'm going to merge this PR now instead of waiting for him to click the "approve" button.

@dreamorosi dreamorosi merged commit cc8bd26 into main Nov 8, 2022
@dreamorosi dreamorosi deleted the 1142-documentation-improvement-inconsistency-tracerts-example-code-tracer-website-docs branch November 8, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation Improvement: inconsistency Tracer.ts example code - Tracer Website Docs
3 participants