Skip to content

refactor(data_classes): simplify nested data classes #6289

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

Conversation

ericbn
Copy link
Contributor

@ericbn ericbn commented Mar 18, 2025

Issue number: #6292

Summary

Changes

Make each nested data class only know its own properties instead of having to reference from the root of the data. This hopefully simplifies the code and avoids DRY. Also simplify test cases.

User experience

No user experience change.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

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.

Make each nested data class only know its own properties instead of
having to reference from the root of the data. This hopefully simplifies
the code and avoids DRY. Also simplify test cases.
@ericbn ericbn requested a review from a team as a code owner March 18, 2025 03:48
@ericbn ericbn requested a review from anafalcao March 18, 2025 03:48
@boring-cyborg boring-cyborg bot added the tests label Mar 18, 2025
@pull-request-size pull-request-size bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 18, 2025
Copy link
Contributor

No related issues found. Please ensure there is an open issue related to this change to avoid significant delays or closure.

@github-actions github-actions bot added do-not-merge need-issue PRs that are missing related issues labels Mar 18, 2025
@leandrodamascena
Copy link
Contributor

Hi @ericbn! Thanks for submitting this PR and streamlining the event source code! I see some tests are failing, could you please take a look?

In the meantime, I'll open an issue to link to this PR and keep things in order.

@leandrodamascena leandrodamascena linked an issue Mar 18, 2025 that may be closed by this pull request
2 tasks
@leandrodamascena leandrodamascena removed do-not-merge need-issue PRs that are missing related issues labels Mar 18, 2025
@leandrodamascena leandrodamascena requested review from leandrodamascena and removed request for anafalcao March 18, 2025 10:48
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Need to fix tests.

@ericbn
Copy link
Contributor Author

ericbn commented Mar 18, 2025

I've pushed a new commit here but the PR is still stuck by GitHub in "processing updates"...

@leandrodamascena
Copy link
Contributor

I've pushed a new commit here but the PR is still stuck by GitHub in "processing updates"...

Please push another small commit and lets see if GH works.

@ericbn
Copy link
Contributor Author

ericbn commented Mar 18, 2025

Done. Seems to be unstuck now!

@ericbn ericbn requested a review from leandrodamascena March 18, 2025 15:25
Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.31%. Comparing base (448ff56) to head (49216cd).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6289      +/-   ##
===========================================
- Coverage    96.32%   96.31%   -0.01%     
===========================================
  Files          241      241              
  Lines        11633    11625       -8     
  Branches       864      862       -2     
===========================================
- Hits         11205    11197       -8     
  Misses         336      336              
  Partials        92       92              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

APPROVED! Thanks @ericbn!

@leandrodamascena leandrodamascena merged commit 2b1a5bb into aws-powertools:develop Mar 18, 2025
12 checks passed
@ericbn ericbn deleted the data_classes_simplify_nested_data branch March 18, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tech debt: simplify nested data classes
2 participants