Skip to content

fix: add missing tests, correct calls to DictWrapper constructor and improve metrics type hints - #168

Merged
heitorlessa merged 4 commits into
aws-powertools:developfrom
gyft:tests-missing
Sep 21, 2020
Merged

heitorlessa merged 4 commits into
aws-powertools:developfrom
gyft:tests-missing

Conversation

@michaelbrewer

@michaelbrewer michaelbrewer commented Sep 20, 2020 •

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

Changes:

  • validator - Add test for the validator decator with an envelope
  • data_classes - Call DictWrapper constructor with the nested dict
  • metrics - Some minor type hint improvements

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:
* validator - Add test for the validator decator with an envelope
* data_classes - Call DictWrapper constructor with the nested dict
@codecov-commenter

codecov-commenter commented Sep 20, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #168 into develop will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop      #168      +/-   ##
============================================
+ Coverage    99.90%   100.00%   +0.09%     
============================================
  Files           52        52              
  Lines         2151      2151              
  Branches        96        96              
============================================
+ Hits          2149      2151       +2     
+ Misses           1         0       -1     
+ Partials         1         0       -1     
Impacted Files Coverage Δ
aws_lambda_powertools/metrics/base.py 100.00% <100.00%> (ø)
...bda_powertools/utilities/data_classes/alb_event.py 100.00% <100.00%> (ø)
.../utilities/data_classes/api_gateway_proxy_event.py 100.00% <100.00%> (ø)
.../utilities/data_classes/cognito_user_pool_event.py 100.00% <100.00%> (ø)
...ambda_powertools/utilities/validation/validator.py 100.00% <0.00%> (+9.52%) ⬆️

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 b654ca6...4c97eae. Read the comment docs.

Comment thread aws_lambda_powertools/metrics/base.py Resolved

@heitorlessa heitorlessa left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for those changes @michaelbrewer, and for catching an issue with the data_classes utilities.

Could you update description to reflect what changed here? Title reflects validator test only.

One minor issue with type hint as it should've been float over int due to value, and numeric tower also catches int as part of float

Co-authored-by: Heitor Lessa <heitor.lessa@hotmail.com>

@michaelbrewer michaelbrewer left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Corrected

Comment thread aws_lambda_powertools/metrics/base.py Resolved
Comment thread aws_lambda_powertools/metrics/base.py Resolved
Co-authored-by: Heitor Lessa <heitor.lessa@hotmail.com>
@heitorlessa
heitorlessa merged commit 805f23d into aws-powertools:develop Sep 21, 2020
@heitorlessa heitorlessa added the bug Something isn't working label Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants