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

Add an annotation to expose transforms to yaml. #28208

Merged
merged 3 commits into from
Sep 13, 2023

Conversation

robertwb
Copy link
Contributor

We should add this to all transforms that are simply parameterized.


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

  • 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 or the workflows README to see a list of phrases to trigger workflows.

We should add this to all transforms that are simply parameterized.
@robertwb
Copy link
Contributor Author

R: @Polber

@github-actions
Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Merging #28208 (c7177b9) into master (45ea758) will increase coverage by 0.06%.
Report is 126 commits behind head on master.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master   #28208      +/-   ##
==========================================
+ Coverage   72.30%   72.36%   +0.06%     
==========================================
  Files         678      679       +1     
  Lines       99853   100308     +455     
==========================================
+ Hits        72197    72591     +394     
- Misses      26077    26138      +61     
  Partials     1579     1579              
Flag Coverage Δ
python 82.90% <66.66%> (+0.02%) ⬆️

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

Files Changed Coverage Δ
sdks/python/apache_beam/transforms/ptransform.py 92.73% <66.66%> (-1.06%) ⬇️

... and 21 files with indirect coverage changes

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

Copy link
Contributor

@Polber Polber left a comment

Choose a reason for hiding this comment

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

Will this replace the annotation assembly performed in yaml_transform.py? This would require all transforms used in a YAML pipeline have this annotation, right?

def test_annotations(self):
t = LinearTransform(5, b=100)
annotations = t.annotations()
print(annotations)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the print meant to still be here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch

@robertwb
Copy link
Contributor Author

robertwb commented Sep 8, 2023

This won't replace the assembly performed in `yaml_transform.py, this merely gives indications of how to use other (posibly not-directly-exposed) Beam transforms directly from yaml.

@robertwb
Copy link
Contributor Author

Any concerns about this?

Copy link
Contributor

@Polber Polber left a comment

Choose a reason for hiding this comment

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

No concern, just wondering the use-case since the annotations get added in yaml_transform, but this makes sense for custom transforms/ those not exposed to yaml as you said. LGTM

@robertwb robertwb merged commit cf0cf3b into apache:master Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants