Skip to content

Commit

Permalink
Debug CI for participant list generation (#107)
Browse files Browse the repository at this point in the history
* Show participant list.

* Do not indent participant list JSON data.

* Write the participant list directly to a file.

* Remove debug print of the participant list during CI.

* Blackify.
  • Loading branch information
martinjonas authored Jul 9, 2024
1 parent 593b042 commit 1652966
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ submission-doc: submission-generation

participant-data:
@echo "🚀 Generating participant data to $(PARTICIPANT_DATA_FILE)"
@poetry run smtcomp show-json submissions/*.json > $(PARTICIPANT_DATA_FILE)
@poetry run smtcomp show-json submissions/*.json $(PARTICIPANT_DATA_FILE)

hugo-server:
(cd web; hugo server)
9 changes: 4 additions & 5 deletions smtcomp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,17 @@ def show(


@app.command(rich_help_panel=submissions_panel)
def show_json(files: list[Path] = typer.Argument(None), prefix: Optional[Path] = None) -> None:
def show_json(files: list[Path], target_file: Path) -> None:
"""
Show information about solver submissions in JSON format
"""

if prefix is not None:
files = list(map(prefix.joinpath, files))

l = list(map(submission.read_submission_or_exit, files))

data = [submission.raw_summary(s) for s in l]
print(json.dumps(data, indent=4))

with open(target_file, "w") as f:
json.dump(data, f)


@app.command(rich_help_panel=submissions_panel)
Expand Down

0 comments on commit 1652966

Please sign in to comment.