Skip to content

Commit

Permalink
more explicity status checks
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Sep 12, 2023
1 parent 6f396f3 commit 9b465e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/check_validation_passed.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
def main(artifact_dir: Path = typer.Argument(..., help="folder with validation artifacts")):
"""check validation summaries in artifact folder"""
failed_val = []
for sp in sorted(artifact_dir.glob(f"**/validation_summary*.yaml"), key=os.path.getmtime):
for sp in sorted(artifact_dir.glob("**/validation_summary*.yaml"), key=os.path.getmtime):
summary = yaml.load(sp)
if isinstance(summary, dict):
summary = [summary]

for s in summary:
if s["error"]:
if s["status"] != "passed":
s["id"] = sp.stem
failed_val.append(summary)

Expand Down
4 changes: 2 additions & 2 deletions scripts/static_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ def main(
static_summary_path = dist / resource_id / version_id / "validation_summary_static.yaml"
static_summary_path.parent.mkdir(parents=True, exist_ok=True)
yaml.dump(static_summary, static_summary_path)
if not static_summary["error"]:
if static_summary["status"] == "passed":
# validate rdf using the latest format version
latest_static_summary = validate(rdf_path, update_format=True)
if not latest_static_summary["error"]:
if latest_static_summary["status"] == "passed":
rd = load_raw_resource_description(rdf_path, update_to_format="latest")
assert isinstance(rd, RDF_Base)
dynamic_test_cases += prepare_dynamic_test_cases(rd, resource_id, version_id, dist)
Expand Down

0 comments on commit 9b465e4

Please sign in to comment.