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

feat: consistent selector parameters #983

Merged
merged 5 commits into from
Jan 14, 2025
Merged

feat: consistent selector parameters #983

merged 5 commits into from
Jan 14, 2025

Conversation

lars-reimann
Copy link
Member

@lars-reimann lars-reimann commented Jan 14, 2025

Summary of Changes

  • Name all parameters selector that select a subset of the columns of a Table by name or (later) by a ColumnSelector.
    • Parameters of Table.join and Table.to_tabular_dataset are deliberately unchanged, since I want users to always specify column names here explicitly.
  • Remove the ability to pass a lambda predicate to select_columns.
    • This was inconsistent with the other selector parameters.
    • It was also quite slow, since we sequentially looped over the columns. The upcoming ColumnSelectors will cover common cases and be more performant.
    • For all other cases, simply use Table.to_columns, a list comprehension, and Table.from_columns,

@lars-reimann lars-reimann requested a review from a team as a code owner January 14, 2025 16:55
Copy link
Contributor

github-actions bot commented Jan 14, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 31 0 0 1.78s
✅ PYTHON mypy 31 0 3.7s
✅ PYTHON ruff 31 0 0 0.29s
✅ REPOSITORY git_diff yes no 0.28s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.09%. Comparing base (2db9069) to head (506b34f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #983      +/-   ##
==========================================
+ Coverage   95.04%   95.09%   +0.04%     
==========================================
  Files         125      125              
  Lines        7730     7719      -11     
==========================================
- Hits         7347     7340       -7     
+ Misses        383      379       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lars-reimann lars-reimann changed the title feat: consistently name selector parameters feat: consistent selector parameters Jan 14, 2025
@lars-reimann lars-reimann merged commit dc4640b into main Jan 14, 2025
16 checks passed
@lars-reimann lars-reimann deleted the selector-name branch January 14, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant