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

chore(batch): Housekeeping for recent changes #157

Merged
merged 3 commits into from
Sep 3, 2020

Conversation

michaelbrewer
Copy link
Contributor

@michaelbrewer michaelbrewer commented Sep 3, 2020

Issue #, if available:

Description of changes:

Changes:

  • base.py - records can't just be iterable as we reference it by __getitem__
  • base.py - logger.debugger is expecting a %s
  • docs - Typos in the docs
  • formatter.py - _build_root_keys can be a static method
  • typing - add some missing unit tests

Checklist

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

Changes:
* base.py - `records` can't just be iterable as we reference it by `__getitem__`
* base.py - logger.debugger is expecting a `%s`
* docs - Typos in the docs
* formatter.py - `_build_root_keys` can be a static method
@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2020

Codecov Report

Merging #157 into develop will increase coverage by 2.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop      #157      +/-   ##
============================================
+ Coverage    97.92%   100.00%   +2.07%     
============================================
  Files           33        33              
  Lines          917       918       +1     
  Branches        77        77              
============================================
+ Hits           898       918      +20     
+ Misses          19         0      -19     
Impacted Files Coverage Δ
...rtools/utilities/typing/lambda_cognito_identity.py 100.00% <ø> (+22.22%) ⬆️
...mbda_powertools/utilities/typing/lambda_context.py 100.00% <ø> (+21.42%) ⬆️
aws_lambda_powertools/logging/formatter.py 100.00% <100.00%> (ø)
aws_lambda_powertools/utilities/batch/base.py 100.00% <100.00%> (ø)
...wertools/utilities/typing/lambda_client_context.py 100.00% <0.00%> (+20.00%) ⬆️
...ties/typing/lambda_client_context_mobile_client.py 100.00% <0.00%> (+23.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80a7602...26868d1. Read the comment docs.

Changes:
* Make docstrings consistent
* Add missing test cases (although this might be trivial)
@michaelbrewer michaelbrewer changed the title chore(batch): Housekeeping chore(batch): Housekeeping for recent changes Sep 3, 2020
Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

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

Thanks for the housekeeping help before 1.5.0 - One minor on string interpolation for consistency.

@@ -95,7 +95,7 @@ def failure_handler(self, record: Any, exception: Exception):
"fail", exceptions args, original record
"""
entry = ("fail", exception.args, record)
logger.debug("Record processing exception: ", exception)
logger.debug("Record processing exception: %s", exception)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you change to f-string for consistency, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@heitorlessa sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@heitorlessa done.

"""
Information about the Amazon Cognito identity that authorized the request.
"""
"""Information about the Amazon Cognito identity that authorized the request."""
Copy link
Contributor

Choose a reason for hiding this comment

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

This reminds me we need to prioritise a minter for NumPy docstrings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@heitorlessa - sure

@heitorlessa heitorlessa merged commit b8a8ab5 into aws-powertools:develop Sep 3, 2020
heitorlessa referenced this pull request in heitorlessa/aws-lambda-powertools-python Sep 11, 2020
* develop: (57 commits)
  chore: bump version to 1.5.0 (#158)
  chore(batch): Housekeeping for recent changes (#157)
  docs: address readability feedbacks
  chore: add debug logging for sqs batch processing
  chore: remove middlewares module, moving decorator functionality to base and sqs
  docs: add detail to batch processing
  fix: throw exception by default if messages processing fails
  chore: add test for sqs_batch_processor interface
  fix: add sqs_batch_processor as its own method
  docs: simplify documentation more SQS specific focus Update for sqs_batch_processor interface
  chore: add sqs_batch_processor decorator to simplify interface
  feat(parameters): transform = "auto" (#133)
  chore: fix typos, docstrings and type hints (#154)
  chore: tiny changes for readability
  fix: ensure debug log event has latest ctx
  docs: rephrase the wording to make it more clear
  docs: refactor example; improve docs about creating your own processor
  refactor: remove references to BaseProcessor. Left BasePartialProcessor
  docs: add newly created Slack Channel
  fix: update image with correct sample
  ...
@michaelbrewer michaelbrewer deleted the chore-housekeeping branch February 22, 2021 13:18
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.

None yet

3 participants