test: follow up FileSystemSeedReader coverage cleanup#432
Open
eric-tramel wants to merge 1 commit intomainfrom
Open
test: follow up FileSystemSeedReader coverage cleanup#432eric-tramel wants to merge 1 commit intomainfrom
eric-tramel wants to merge 1 commit intomainfrom
Conversation
Contributor
Greptile SummaryThis PR is a clean follow-up cleanup to #424 that consolidates duplicate
|
| Filename | Overview |
|---|---|
| packages/data-designer-engine/src/data_designer/engine/testing/seed_readers.py | New file introducing the shared LineFanoutDirectorySeedReader helper, consolidating two previously duplicate implementations from the engine and interface test files. Logic is correct; instance-level output_columns setup works at runtime. |
| packages/data-designer-engine/src/data_designer/engine/testing/init.py | Adds the LineFanoutDirectorySeedReader import and re-export to address the previous review comment about inconsistency with other test helpers. |
| packages/data-designer-engine/tests/engine/resources/test_seed_reader.py | Removes FanoutDirectorySeedReader, InvalidHydrationReturnSeedReader, and SchemaMismatchFanoutSeedReader in favour of the shared LineFanoutDirectorySeedReader and a new ConfigurableHydrationDirectorySeedReader. Adds write_alpha_beta_text_files fixture, None-return parametrize case, and the all-empty-fanout full-output guard test. |
| packages/data-designer/tests/interface/test_data_designer.py | Replaces the local FanoutCustomDirectorySeedReader with the canonical LineFanoutDirectorySeedReader from the testing package; no behavioural changes, column schema is identical. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["LineFanoutDirectorySeedReader\n(engine/testing/seed_readers.py)"]
B["include_file_name=True\noutput_columns: relative_path, file_name, line_index, line"]
C["include_file_name=False\noutput_columns: relative_path, line_index, line"]
A --> B
A --> C
B --> D["test_seed_reader.py\n(engine tests)"]
C --> E["test_data_designer.py\n(interface tests)"]
F["ConfigurableHydrationDirectorySeedReader"]
F --> G["hydrated_return=None → NoneType error"]
F --> H["hydrated_return=scalar → scalar type error"]
F --> I["hydrated_return=list with wrong schema → column mismatch error"]
F --> D
Last reviewed commit: "test: trim FileSyste..."
e411688 to
33f4392
Compare
packages/data-designer-engine/src/data_designer/engine/testing/seed_readers.py
Show resolved
Hide resolved
33f4392 to
26276e0
Compare
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.
Summary
Noneinvalid returns and the full-output all-empty-fanout guardContext
Testing