Skip to content

Commit

Permalink
Revert "Solver submissions webpage (#79)"
Browse files Browse the repository at this point in the history
This reverts commit 87d9f7d.
  • Loading branch information
Martin Jonáš committed Jun 10, 2024
1 parent 2108025 commit 7bbcff0
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 1,146 deletions.
16 changes: 0 additions & 16 deletions smtcomp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import typer
from pydantic import ValidationError
from collections import defaultdict
import json

import polars as pl

Expand Down Expand Up @@ -70,21 +69,6 @@ def show(
md.write("</details>\n")


@app.command(rich_help_panel=submissions_panel)
def show_json(files: list[Path] = typer.Argument(None), prefix: Optional[Path] = None) -> 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))


@app.command(rich_help_panel=submissions_panel)
def get_contacts(files: list[Path] = typer.Argument(None)) -> None:
"""
Expand Down
21 changes: 1 addition & 20 deletions smtcomp/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,6 @@ def rich_tree_summary(s: Submission) -> Tree:
return tree


def raw_summary(s: Submission) -> dict[str, Any]:
data = dict[str, Any]()
data["name"] = s.name
data["authors"] = [c.name for c in s.contributors]
data["website"] = str(s.website)
data["archive_url"] = str(s.archive.url if s.archive is not None else "")
data["system_description"] = str(s.system_description)
data["tracks"] = dict[str, dict[str, list[str]]]()

tracks = s.participations.get()
for track, divs in sorted(tracks.items()):
divisions = {}
for div, logics in sorted(divs.items()):
divisions[str(div)] = [str(l) for l in logics]
data["tracks"][str(track)] = divisions

return data


def md_item(md: TextIO, s: str, level: int) -> None:
md.write(" " * level)
md.write("* ")
Expand Down Expand Up @@ -130,4 +111,4 @@ def merge_all_submissions(local_repo_path: str) -> None:
shas = [p.head.sha for p in fpulls]
message = "merge submissions\n\n" + "\n".join(f"#{p.number}: {p.title}" for p in fpulls)
print(shas)
subprocess.run(["git", "-C", local_repo_path, "merge", "-m", message, "-s", "ours"] + shas)
subprocess.run(["git", "-C", local_repo_path, "merge", "-m", message] + shas)
8 changes: 0 additions & 8 deletions web/content/participants/_index.md

This file was deleted.

Loading

0 comments on commit 7bbcff0

Please sign in to comment.