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

Support pathlib in json encoding #219

Merged
merged 4 commits into from
Feb 23, 2024
Merged

Support pathlib in json encoding #219

merged 4 commits into from
Feb 23, 2024

Conversation

delucchi-cmu
Copy link
Contributor

Change Description

Related to three downstream issues:

This change will need to be in a tagged release before we can add tests in those repos and consider those issues closed.

Solution Description

Adds a simple JSON encoder with a special case for pathlib.Path. Additional other types can be added there, if they cause problems in JSON writing.

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.94%. Comparing base (a051d36) to head (d8f6ac6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #219   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files          57       57           
  Lines        1976     1981    +5     
=======================================
+ Hits         1975     1980    +5     
  Misses          1        1           

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

Copy link

github-actions bot commented Feb 23, 2024

Before [a051d36] After [252cf0c] Ratio Benchmark (Parameter)
124±0.4ms 125±2ms 1.01 benchmarks.time_test_alignment_even_sky
80.2±0.7ms 80.3±0.3ms 1 benchmarks.MetadataSuite.time_load_partition_info_order7
80.1±0.7ms 80.4±0.7ms 1 benchmarks.MetadataSuite.time_load_partition_join_info
642±2ms 643±6ms 1 benchmarks.Suite.time_pixel_tree_creation
20.1±0.3ms 19.9±0.1ms 0.99 benchmarks.MetadataSuite.time_load_partition_info_order6
99.7±0.4ms 96.7±0.5ms 0.97 benchmarks.time_test_cone_filter_multiple_order

Click here to view all benchmarks.

@delucchi-cmu delucchi-cmu requested a review from hombit February 23, 2024 14:12
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!

tests/hipscat/io/test_write_metadata.py Outdated Show resolved Hide resolved
@delucchi-cmu delucchi-cmu merged commit d13e8e7 into main Feb 23, 2024
11 checks passed
@delucchi-cmu delucchi-cmu deleted the delucchi/pathlib branch February 23, 2024 14:32
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