Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

rakeshcusat
Copy link
Contributor

Please add a meaningful description for your change here
#30145

Added Pypi friendly documentation for Python SDK.


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.

Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers



Instructions for building and testing Beam itself
are in the [contribution guide](./CONTRIBUTING.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

will this md link work?

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, this will not work. I need to adjust the path.

@liferoad
Copy link
Contributor

Thanks a lot! Left some comments.

@rakeshcusat
Copy link
Contributor Author

@liferoad / @damccorm can you take another look?

@liferoad
Copy link
Contributor

@liferoad / @damccorm can you take another look?

LGTM. Rerunning some failed workflows.

@rakeshcusat
Copy link
Contributor Author

@liferoad do we have any shortcut to re-run the failed test tasks?

@liferoad
Copy link
Contributor

liferoad commented May 5, 2025

@rakeshcusat
Copy link
Contributor Author

Run Prism_Python PreCommit 3.9

Copy link

codecov bot commented May 5, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 56.53%. Comparing base (5950a17) to head (4e4f438).
Report is 384 commits behind head on master.

Files with missing lines Patch % Lines
sdks/python/setup.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #34329      +/-   ##
============================================
+ Coverage     56.34%   56.53%   +0.19%     
  Complexity     3286     3286              
============================================
  Files          1173     1182       +9     
  Lines        179037   181076    +2039     
  Branches       3398     3398              
============================================
+ Hits         100877   102375    +1498     
- Misses        74903    75444     +541     
  Partials       3257     3257              
Flag Coverage Δ
python 81.10% <0.00%> (∅)

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

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented May 5, 2025

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

R: @tvalentyn 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).

@liferoad
Copy link
Contributor

liferoad commented May 5, 2025

Running pylint...
************* Module setup
setup.py:309:0: C0301: Line too long (94/80) (line-too-long)

@rakeshcusat
Copy link
Contributor Author

Run Yaml_Xlang_Direct PreCommit

@rakeshcusat
Copy link
Contributor Author

Run Python_Coverage PreCommit

@rakeshcusat
Copy link
Contributor Author

Run Python_ML PreCommit 3.12

@rakeshcusat
Copy link
Contributor Author

Run Python_ML PreCommit 3.9

@rakeshcusat
Copy link
Contributor Author

Run Python_ML PreCommit 3.11

@rakeshcusat
Copy link
Contributor Author

Run Python_ML PreCommit 3.10

@rakeshcusat rakeshcusat force-pushed the update-pypi-documentation-30145 branch from ec25727 to 71b53cf Compare May 10, 2025 06:15
@rakeshcusat rakeshcusat force-pushed the update-pypi-documentation-30145 branch from 71b53cf to e2c3b36 Compare May 10, 2025 06:16

## Python streaming pipelines

Python [streaming pipeline execution](/documentation/sdks/python-streaming)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should use the full url paths.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liferoad are you noticing any error log that is complaining about the relative path?

I have been trying to find the logs from the CI/CD but I am not able to find it.

Is there any documentation that can help replicate this on my local machine?

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean this will be added here: https://pypi.org/project/apache-beam/. So only full paths can work, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liferoad I thought the setup tool will automatically figure that out based on this config and generate the the righgt link.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure. I checked https://github.com/numpy/numpy/blob/main/README.md?plain=1, which looks like using the full url paths.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will update the document and provide the full path.

Is there way to check the generated files in CI/CD environment to make sure that it has generated the right formatted file?

Copy link
Contributor

Choose a reason for hiding this comment

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

I do not know since this is part of Beam release steps to PyPi.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to using the full links. I'm not confident that the relative paths will definitely work, and it seems safer to use full links.

Copy link
Contributor

Choose a reason for hiding this comment

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

I actually validated that these don't get replaced, in the final text I see - Python [streaming pipeline execution](/documentation/sdks/python-streaming)

Steps I followed:

  1. Wheels are automatically generated when we build wheels. First from this PRs checks, I clicked one of the build wheels steps
  2. I went to summary, scrolled down to the bottom, and downloaded a set of wheels (I chose wheelhouse-cp312-macos-13, but I don't think this matters)
  3. Extract the wheels from downloads with mac's archive extracter. These are just fancy zip files - https://stackoverflow.com/questions/32923952/how-do-i-list-the-files-inside-a-python-wheel
  4. Navigated to apache_beam-2.66.0.dev0.dist-info/METADATA. This has the content that will be rendered in the pydoc I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@damccorm thank you for testing that out. I will change the link to the full link.

Copy link
Contributor

Reminder, please take a look at this pr: @tvalentyn

Copy link
Contributor

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @damccorm 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)

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

Thanks - this looks like a good step, I think we can merge once the outstanding comment about paths is addressed


## Python streaming pipelines

Python [streaming pipeline execution](/documentation/sdks/python-streaming)
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to using the full links. I'm not confident that the relative paths will definitely work, and it seems safer to use full links.


## Python streaming pipelines

Python [streaming pipeline execution](/documentation/sdks/python-streaming)
Copy link
Contributor

Choose a reason for hiding this comment

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

I actually validated that these don't get replaced, in the final text I see - Python [streaming pipeline execution](/documentation/sdks/python-streaming)

Steps I followed:

  1. Wheels are automatically generated when we build wheels. First from this PRs checks, I clicked one of the build wheels steps
  2. I went to summary, scrolled down to the bottom, and downloaded a set of wheels (I chose wheelhouse-cp312-macos-13, but I don't think this matters)
  3. Extract the wheels from downloads with mac's archive extracter. These are just fancy zip files - https://stackoverflow.com/questions/32923952/how-do-i-list-the-files-inside-a-python-wheel
  4. Navigated to apache_beam-2.66.0.dev0.dist-info/METADATA. This has the content that will be rendered in the pydoc I think.

@rakeshcusat
Copy link
Contributor Author

Thanks - this looks like a good step, I think we can merge once the outstanding comment about paths is addressed

@damccorm I have taken care of the comments and I am waiting for test to pass.

@rakeshcusat
Copy link
Contributor Author

@damccorm / @liferoad Some of the precommit test are failing for random reasons which are not related with this change. What do you recommend?
I have already rebased my changes to ensure that I have all the changes on my branch.

@liferoad
Copy link
Contributor

liferoad commented Jun 9, 2025

#35211 tracks one of the failed workflows.

@liferoad
Copy link
Contributor

liferoad commented Jun 9, 2025

Re-triggered some workflows.

@liferoad liferoad merged commit df54bf4 into apache:master Jun 9, 2025
96 checks passed
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