Skip to content

(#25316) Enable LZMA compression in Python SDK I/O#25317

Merged
Abacn merged 6 commits intoapache:masterfrom
wrossmorrow:add-lzma
Feb 13, 2023
Merged

(#25316) Enable LZMA compression in Python SDK I/O#25317
Abacn merged 6 commits intoapache:masterfrom
wrossmorrow:add-lzma

Conversation

@wrossmorrow
Copy link
Copy Markdown
Contributor

LZMA compression is standard in python but not one of the compression strategies included in the beam.io.{Read,Write}FromText PTransforms. openwebtext, for example, uses this compression. This PR addresses #25316 .


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.

@wrossmorrow wrossmorrow changed the title (#25316) Added naive first shot at enabling LZMA compression (#25316) Enable LZMA compression in Python SDK I/O Feb 5, 2023
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 5, 2023

Codecov Report

Merging #25317 (1ceac55) into master (198b93e) will decrease coverage by 0.01%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master   #25317      +/-   ##
==========================================
- Coverage   72.85%   72.85%   -0.01%     
==========================================
  Files         750      750              
  Lines       99501    99507       +6     
==========================================
+ Hits        72493    72496       +3     
- Misses      25640    25643       +3     
  Partials     1368     1368              
Flag Coverage Δ
python 82.24% <83.33%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
sdks/python/apache_beam/io/filesystem.py 88.59% <83.33%> (-0.09%) ⬇️
sdks/python/apache_beam/utils/interactive_utils.py 95.12% <0.00%> (-2.44%) ⬇️
...python/apache_beam/runners/worker/worker_status.py 74.66% <0.00%> (-0.67%) ⬇️
...eam/runners/portability/fn_api_runner/execution.py 92.49% <0.00%> (-0.64%) ⬇️
sdks/python/apache_beam/transforms/combiners.py 93.05% <0.00%> (-0.39%) ⬇️
...ks/python/apache_beam/runners/worker/sdk_worker.py 89.08% <0.00%> (-0.17%) ⬇️
...hon/apache_beam/runners/worker/bundle_processor.py 93.49% <0.00%> (+0.24%) ⬆️
...eam/runners/interactive/interactive_environment.py 92.02% <0.00%> (+0.30%) ⬆️
...che_beam/runners/interactive/interactive_runner.py 91.77% <0.00%> (+1.26%) ⬆️
.../python/apache_beam/testing/test_stream_service.py 92.85% <0.00%> (+4.76%) ⬆️

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 5, 2023

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

R: @damccorm for label python.
R: @pabloem for label io.

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).

@Abacn
Copy link
Copy Markdown
Contributor

Abacn commented Feb 6, 2023

Thanks for contribution. Would you mind also add the tests in https://github.com/apache/beam/blob/master/sdks/python/apache_beam/io/filesystem_test.py ?

e.g.

def test_seek_set(self):
and other places where compression types are enumerated

Besides, the code format check failure showing following message:

10:13:37 ************* Module apache_beam.io.filesystem
10:13:37 apache_beam/io/filesystem.py:276:62: C0303: Trailing whitespace (trailing-whitespace)
10:13:37 apache_beam/io/filesystem.py:968:0: C0304: Final newline missing (missing-final-newline)

@wrossmorrow
Copy link
Copy Markdown
Contributor Author

Thanks for contribution. Would you mind also add the tests in https://github.com/apache/beam/blob/master/sdks/python/apache_beam/io/filesystem_test.py ?

I would love to. Thanks for the pointer.

Copy link
Copy Markdown
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, this looks good to me

@Abacn Abacn merged commit 6f7d2fb into apache:master Feb 13, 2023
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.

2 participants