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

[DOCS] Shorten union of Literals #3449

Merged

Conversation

desmondcheongzx
Copy link
Contributor

@desmondcheongzx desmondcheongzx commented Nov 28, 2024

Small clean up to simplify docs by banning unnecessary union on literals.

For example, in DataFrame.write_parquet, the write_mode argument has the following signature:

write_mode: Union[Literal['append'], Literal['overwrite']] = 'append',

But according to PEP 586 --- Literal Types, this can be equivalently written as

write_mode: Literal['append', 'overwrite'] = 'append',

which is much easier for users to follow.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 28, 2024
Copy link

codspeed-hq bot commented Nov 28, 2024

CodSpeed Performance Report

Merging #3449 will improve performances by 40.17%

Comparing desmondcheongzx:shorten-union-of-literals (0ce9a5d) with main (f2d4f73)

Summary

⚡ 1 improvements
✅ 16 untouched benchmarks

Benchmarks breakdown

Benchmark main desmondcheongzx:shorten-union-of-literals Change
test_iter_rows_first_row[100 Small Files] 304.2 ms 217 ms +40.17%

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.19%. Comparing base (f2d4f73) to head (0ce9a5d).
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3449      +/-   ##
==========================================
- Coverage   77.50%   77.19%   -0.31%     
==========================================
  Files         687      686       -1     
  Lines       84472    84834     +362     
==========================================
+ Hits        65467    65489      +22     
- Misses      19005    19345     +340     
Files with missing lines Coverage Δ
daft/context.py 90.85% <100.00%> (ø)
daft/dataframe/dataframe.py 86.89% <ø> (ø)
daft/expressions/expressions.py 93.28% <100.00%> (ø)
daft/filesystem.py 71.11% <100.00%> (ø)
daft/runners/runner.py 79.31% <100.00%> (ø)
daft/series.py 89.55% <ø> (ø)
daft/table/table.py 58.16% <ø> (ø)
daft/udf_library/url_udfs.py 97.72% <100.00%> (ø)

... and 17 files with indirect coverage changes

@desmondcheongzx desmondcheongzx merged commit c7f37e4 into Eventual-Inc:main Nov 29, 2024
44 checks passed
@desmondcheongzx desmondcheongzx deleted the shorten-union-of-literals branch November 29, 2024 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants