-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add hypothesis strategy to generate complex schemas, use it to test schemas
module
#23361
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23361 +/- ##
=======================================
Coverage 73.34% 73.34%
=======================================
Files 719 721 +2
Lines 97169 97208 +39
=======================================
+ Hits 71265 71297 +32
- Misses 24555 24562 +7
Partials 1349 1349
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Run Python PreCommit |
schemas
moduleschemas
module
7ea6ff8
to
ffa5939
Compare
Run Python_PVR_Flink PreCommit |
R: @pabloem |
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
R: @Abacn |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions. |
waiting on author |
@Abacn does this need any action other than resolving the conflict? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheNeuralBit Sorry for the delay. Yes it is waiting for rebase, and note that since hypothesis is already a dependency, the change in setup.py
is no longer needed.
@@ -98,6 +107,13 @@ def from_user_type( | |||
fields = [(name, user_type.__annotations__[name]) | |||
for name in user_type._fields] | |||
|
|||
if _user_type_is_generated(user_type): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious about what is the purpose of the non-test code change?
hopefully the rebase i did is enough to get ci to pass? |
I'll just merge for now since Brian no longer works on this, and the change looks great : ) |
Thanks @pabloem :) |
…schemas` module (apache#23361) * Add hypothesis * Test schemas module with hypothesis-generated complex schemas * Fix schema id handling for nested schemas * removing duplicated dependency Co-authored-by: Pablo <[email protected]>
Fixes #23308
This PR adds a new module,
apache_beam.typehints.testing.strategies
, withhypothesis
strategies for generating schema complex schema types. It also uses the strategy to exercise the conversion logic inapache_beam.typehints.schemas
. This testing revealed a minor issue with schema ids in nested data, which is also patched in this PR.GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.