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

Add tests for more complex sorting scenarios. #167

Merged
merged 3 commits into from
Nov 21, 2023
Merged

Conversation

delucchi-cmu
Copy link
Contributor

Change Description

This doesn't make any functional changes to the catalog import process. This just provides demonstration (proof?) of discussions around tweaking sort options during catalog import to achieve particular ordering of resulting parquet files.

Copy link

codecov bot commented Nov 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9ed8952) 100.00% compared to head (d102816) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #167   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines         1158      1158           
=========================================
  Hits          1158      1158           

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

Copy link
Contributor

@hombit hombit left a comment

Choose a reason for hiding this comment

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

Thank you!

It would be helpful to check that sources are still sorted by _hipscat_index.

@hombit
Copy link
Contributor

hombit commented Nov 21, 2023

The other (or additional) way to test it is doing something like the following:

  1. Concatenate pandas data frames,
  2. sort them by (healpy.ang2pix(ra, dec), source_id) in the first case and by (healpy.ang2pix(ra, dec), object_id, time) in the second case,
  3. and compare hipcat files with these sorted dataframes (skipping hipscat-specific columns like _hipscat_index)

@delucchi-cmu
Copy link
Contributor Author

The other (or additional) way to test it is doing something like the following:

  1. Concatenate pandas data frames,
  2. sort them by (healpy.ang2pix(ra, dec), source_id) in the first case and by (healpy.ang2pix(ra, dec), object_id, time) in the second case,
  3. and compare hipcat files with these sorted dataframes (skipping hipscat-specific columns like _hipscat_index)

Added dataframe comparisons alongside more boring series comparisons.

@delucchi-cmu delucchi-cmu merged commit c31fe68 into main Nov 21, 2023
13 checks passed
@delucchi-cmu delucchi-cmu deleted the delucchi/sort_tests branch November 21, 2023 15:04
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.

2 participants