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

Align Pipestat output schema with looper output schema #65

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ coverage:
target: 80% # the required coverage value
threshold: 1% # the leniency in hitting the target
informational: true
patch:
default:
target: 80%
informational: true
ignore:
- "*/argparser.py"
- "*/cli.py"
Expand Down
6 changes: 4 additions & 2 deletions pipestat/parsed_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@
self._status_data = _safe_pop_one_mapping(key="status", data=data, info_name="status")

if data:
raise SchemaError(
f"Extra top-level key(s) in given schema data: {', '.join(data.keys())}"
_LOGGER.info(

Check warning on line 94 in pipestat/parsed_schema.py

View check run for this annotation

Codecov / codecov/patch

pipestat/parsed_schema.py#L94

Added line #L94 was not covered by tests
"Top-Level arguments found in output schema. They will be assigned to project-level."
)
extra_project_data = _recursively_replace_custom_types(data)
self._project_level_data.update(extra_project_data)

Check warning on line 98 in pipestat/parsed_schema.py

View check run for this annotation

Codecov / codecov/patch

pipestat/parsed_schema.py#L97-L98

Added lines #L97 - L98 were not covered by tests

# Check that no reserved keywords were used as data items.
resv_kwds = {"id", SAMPLE_NAME}
Expand Down
7 changes: 0 additions & 7 deletions tests/test_parsed_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,6 @@ def test_parsed_schema__has_correct_data(prepare_schema_from_file, filename, att
f"Could not find valid pipeline identifier (key '{SCHEMA_PIPELINE_NAME_KEY}') in given schema data",
)
for data in SCHEMA_DATA_TUPLES_WITHOUT_PIPELINE_NAME
]
+ [
(
dict(data + [(SCHEMA_PIPELINE_NAME_KEY, "test_pipe"), ("extra_key", "placeholder")]),
"Extra top-level key(s) in given schema data: extra_key",
)
for data in SCHEMA_DATA_TUPLES_WITHOUT_PIPELINE_NAME
],
)
def test_insufficient_schema__raises_expected_error_and_message(schema_data, expected_message):
Expand Down
Loading