Skip to content

refactor(feature-toggles): code coverage and housekeeping #530

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

Merged
merged 10 commits into from
Jul 19, 2021

Conversation

michaelbrewer
Copy link
Contributor

@michaelbrewer michaelbrewer commented Jul 17, 2021

Issue #, if available:

Description of changes:

Changes:

  • Add missing test coverage
  • Fix some MyPy error
  • Use NumPy docstrings
  • Use *Error naming convention for exceptions (ConfigurationException vs ConfigurationError)
  • Add pretty output for make mypy and remove from the mypy.ini, to fix issues with PyCharm.

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:
- Add missing test coverage
- Fix some MyPy error
- Use NumPy docstrings
- Use *Error naming convention for exceptions
@michaelbrewer michaelbrewer marked this pull request as ready for review July 17, 2021 06:13
@heitorlessa
Copy link
Contributor

Thanks for helping out @michaelbrewer --- could you change to Google docstring?

Mkdocstrings doesn't support Numpy 😢 thats what I'm refactoring all code in another PR

@codecov-commenter
Copy link

codecov-commenter commented Jul 17, 2021

Codecov Report

Merging #530 (af64ca7) into develop (d5c3431) will increase coverage by 0.67%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #530      +/-   ##
===========================================
+ Coverage    99.19%   99.86%   +0.67%     
===========================================
  Files          113      113              
  Lines         4476     4478       +2     
  Branches       243      243              
===========================================
+ Hits          4440     4472      +32     
+ Misses          24        3      -21     
+ Partials        12        3       -9     
Impacted Files Coverage Δ
...a_powertools/utilities/feature_toggles/__init__.py 100.00% <100.00%> (ø)
...ols/utilities/feature_toggles/appconfig_fetcher.py 100.00% <100.00%> (+20.00%) ⬆️
...s/utilities/feature_toggles/configuration_store.py 100.00% <100.00%> (+18.29%) ⬆️
...powertools/utilities/feature_toggles/exceptions.py 100.00% <100.00%> (ø)
...bda_powertools/utilities/feature_toggles/schema.py 100.00% <100.00%> (+14.28%) ⬆️
...rtools/utilities/feature_toggles/schema_fetcher.py 100.00% <100.00%> (+11.11%) ⬆️
...ools/utilities/idempotency/persistence/dynamodb.py 100.00% <100.00%> (ø)

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 d5c3431...af64ca7. Read the comment docs.

@michaelbrewer
Copy link
Contributor Author

Thanks for helping out @michaelbrewer --- could you change to Google docstring?

Mkdocstrings doesn't support Numpy 😢 thats what I'm refactoring all code in another PR

haha, i thought you did not like Google docstrings. lol..

@heitorlessa
Copy link
Contributor

heitorlessa commented Jul 17, 2021 via email

@michaelbrewer
Copy link
Contributor Author

I don’t ;-) just having a fight with mkdocstrings to support Numpy. I’ll try one more time using an undocumented way to see if it works fully — if it does great if not well :(

On Sat, 17 Jul 2021 at 08:51, Michael Brewer @.***> wrote: Thanks for helping out @michaelbrewer https://github.com/michaelbrewer --- could you change to Google docstring? Mkdocstrings doesn't support Numpy 😢 thats what I'm refactoring all code in another PR haha, i thought you did not like Google docstrings. lol.. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#530 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZPQBELCMM2N74SOOHYHCLTYESA3ANCNFSM5AQRLLJA .

@heitorlessa - Seems like it is supported: python handler

Note: Numpy-style requires the numpy-style extra of pytkdocs.

@michaelbrewer
Copy link
Contributor Author

I don’t ;-) just having a fight with mkdocstrings to support Numpy. I’ll try one more time using an undocumented way to see if it works fully — if it does great if not well :(

On Sat, 17 Jul 2021 at 08:51, Michael Brewer @.***> wrote: Thanks for helping out @michaelbrewer https://github.com/michaelbrewer --- could you change to Google docstring? Mkdocstrings doesn't support Numpy 😢 thats what I'm refactoring all code in another PR haha, i thought you did not like Google docstrings. lol.. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#530 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZPQBELCMM2N74SOOHYHCLTYESA3ANCNFSM5AQRLLJA .

@heitorlessa - Seems like it is supported: python handler

Note: Numpy-style requires the numpy-style extra of pytkdocs.

I guess ironically mkdocstrings doc site is out of date with with the actual Readmes.

@heitorlessa
Copy link
Contributor

yep, just used this to make it work, though I accidentally found a minor bug there too: mkdocstrings/mkdocstrings#260

I'll revert to Numpy as it rocks :D, then go and fix one issue at a time

@michaelbrewer
Copy link
Contributor Author

@risenberg-cyberark Can you verify i have not broken anything :)

@boring-cyborg boring-cyborg bot added the internal Maintenance changes label Jul 17, 2021
Copy link
Contributor

@ran-isenberg ran-isenberg left a comment

Choose a reason for hiding this comment

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

excellent work ;)

@michaelbrewer
Copy link
Contributor Author

@heitorlessa not much else to add here from the mypy, testing side of things.

@heitorlessa
Copy link
Contributor

thanks a lot @michaelbrewer -- Given the amount of fixes for the next release, I find it best to release the feature toggles without documenting them first, then make 1.19.0 largely about feature toggles and the new built-in API reference.

This will give me time to wrap my head around feature toggles utility, write a proper doc for it, refactor any necessary UX thing, and have a dedicated release note to it -- This should give enough time to have all bugfixes available to people, and feature toggle released ahead of Ran's live stream on Twitch in Aug.

cc @risenberg-cyberark

@heitorlessa heitorlessa merged commit 749a372 into aws-powertools:develop Jul 19, 2021
heitorlessa added a commit to whardier/aws-lambda-powertools-python that referenced this pull request Jul 19, 2021
…ent-subclass

* develop:
  refactor(feature-toggles): Code coverage and housekeeping (aws-powertools#530)
  feat(logger): add get_correlation_id method (aws-powertools#516)
@michaelbrewer michaelbrewer deleted the chore-feature-toggle branch July 19, 2021 17:10
@heitorlessa heitorlessa changed the title refactor(feature-toggles): Code coverage and housekeeping refactor(feature-toggles): code coverage and housekeeping Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Maintenance changes tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants