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

Reolling forward property-based tests for coders #23425

Merged
merged 3 commits into from
Oct 10, 2022

Conversation

pabloem
Copy link
Member

@pabloem pabloem commented Sep 29, 2022

I've tested these several times, to make sure that the test will remain consistently passing.

r: @Abacn


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI.

@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Merging #23425 (444d5f8) into master (577953c) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #23425   +/-   ##
=======================================
  Coverage   73.43%   73.43%           
=======================================
  Files         718      718           
  Lines       95680    95680           
=======================================
+ Hits        70262    70263    +1     
+ Misses      24107    24106    -1     
  Partials     1311     1311           
Flag Coverage Δ
python 83.20% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../python/apache_beam/testing/test_stream_service.py 88.09% <0.00%> (-4.77%) ⬇️
.../apache_beam/runners/interactive/dataproc/types.py 93.10% <0.00%> (-3.45%) ⬇️
...che_beam/runners/interactive/interactive_runner.py 90.50% <0.00%> (-1.27%) ⬇️
...hon/apache_beam/runners/worker/bundle_processor.py 93.54% <0.00%> (+0.24%) ⬆️
...eam/runners/portability/fn_api_runner/execution.py 93.08% <0.00%> (+0.64%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

st.booleans()))

FORBIDDEN_FIELD_NAMES = {
'as', 'for', 'in', 'with', 'or', 'is', 'not', 'if', 'elif', 'else'
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the fix.

These are all python keywords but not all Python keywords. Is there any source why these names are fobidden, or there is a list of forbidden field names?

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks Yi! Great observation. I've added a keyword check instead, which is the same one used when building namedtuples, which is what row coders use underneath.

@TheNeuralBit
Copy link
Member

FYI as a plane ride project I started looking at using a recursive rule to generate Beam schemas: #23361

You may be interested in the field_names strategy I added there.

Also, it would be great to combine these two efforts (first generate a schema, then generate test data given a schema) down the road!

@pabloem
Copy link
Member Author

pabloem commented Sep 30, 2022

I created #23436 to track switching over - could we move forward with this for now? : )

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

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

Thanks LGTM!

@TheNeuralBit
Copy link
Member

I created #23436 to track switching over - could we move forward with this for now? : )

Yep! Sorry I didn't mean to hold this up.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2022

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @yeandy for label python.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants