Change Default join_method in BaseConsolidator from concat to stack - #52
Draft
genematx wants to merge 2 commits into
Draft
Change Default join_method in BaseConsolidator from concat to stack#52genematx wants to merge 2 commits into
concat to stack#52genematx wants to merge 2 commits into
Conversation
When a StreamResource does not set join_method explicitly, the Consolidator falls back to the class default, which is currently 'concat'. Emit a DeprecationWarning in that case announcing that the default will change to 'stack' in a future version -- which alters the shape of the consolidated dataset (a new leading dimension is added when stacking) -- so users can set join_method explicitly and update their declared descriptor shapes in advance. The override of join_method/join_chunks from the StreamResource parameters is moved ahead of the datum-shape computation, which depends on it. Silence the (expected) warning at module level in the test modules whose fixtures rely on the default, so the strict filterwarnings=["error"] policy does not turn expected usage into errors.
Change the default join_method on ConsolidatorBase from 'concat' to 'stack'. 'concat' remains fully supported and can still be requested explicitly via the StreamResource "join_method" parameter. Preserve join_method through export: the exporter now infers the layout from the total/datum shape relationship and persists it on the emitted stream_resource so a round-trip reproduces the original structure. Tests and example fixtures updated for the new default: concat-layout fixtures either declare join_method='concat' explicitly (legacy / multipart-hdf5) or are converted to stack-native descriptors so their resulting shapes are unchanged; scalar 'stack' expectations collapse to (N,) as before.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #52 +/- ##
==========================================
+ Coverage 77.74% 77.85% +0.10%
==========================================
Files 15 15
Lines 2301 2303 +2
==========================================
+ Hits 1789 1793 +4
+ Misses 512 510 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
concat to stackconcat to stack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
concat is deprecated; CSVConsolidator, for whichconcat` is the only naturally suitable option remains unchanged.To be merged and released following #51.