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

Apply read_columns kwarg in parquet reader #315

Merged
merged 2 commits into from
May 20, 2024

Conversation

troyraen
Copy link
Collaborator

@troyraen troyraen commented May 20, 2024

Change Description

Closes #296
Fixes a bug where ParquetReader.read takes a read_columns kwarg but doesn't actually use it.

  • My PR includes a link to the issue that I am addressing

Solution Description

  • Pass the read_columns kwarg through to the read. This allows the mapping step to read only necessary columns (ra/dec) rather than all of them.
  • Add a column_names class property. This allows the user to import only a subset of columns.
  • Add unit test test_parquet_reader_columns.

Code Quality

  • I have read the Contribution Guide and LINCC Frameworks Code of Conduct
  • My code follows the code style of this project
  • My code builds (or compiles) cleanly without any errors or warnings
  • My code contains relevant comments and necessary documentation

Project-Specific Pull Request Checklists

Bug Fix Checklist

  • My fix includes a new test that breaks as a result of the bug (if possible)
  • My change includes a breaking change
    • My change includes backwards compatibility and deprecation warnings (if possible)

New Feature Checklist

  • I have added or updated the docstrings associated with my feature using the NumPy docstring format
  • I have updated the tutorial to highlight my new feature (if appropriate)
  • I have added unit/End-to-End (E2E) test cases to cover my new feature
  • My change includes a breaking change
    • My change includes backwards compatibility and deprecation warnings (if possible)

Copy link

codecov bot commented May 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.53%. Comparing base (06b8379) to head (d4acbfe).
Report is 51 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #315   +/-   ##
=======================================
  Coverage   99.53%   99.53%           
=======================================
  Files          25       25           
  Lines        1282     1284    +2     
=======================================
+ Hits         1276     1278    +2     
  Misses          6        6           

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

@troyraen troyraen marked this pull request as ready for review May 20, 2024 19:35
@troyraen troyraen merged commit 80991e9 into main May 20, 2024
9 checks passed
@troyraen troyraen deleted the issue/296/apply-read_columns-kwarg branch May 20, 2024 20:26
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.

ParquetReader ignored read_columns argument
2 participants