Skip to content
Merged
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
7 changes: 7 additions & 0 deletions optunahub-registry/header_confirm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@

def header_confirm(path: str) -> None:
post = frontmatter.load(path)

assert "author" in post.keys(), f"author is not found in {path}"
assert "title" in post.keys(), f"title is not found in {path}"
assert "description" in post.keys(), f"description is not found in {path}"
assert "tags" in post.keys(), f"tags is not found in {path}"
assert "optuna_versions" in post.keys(), f"optuna_versions is not found in {path}"
assert "license" in post.keys(), f"license is not found in {path}"
assert post["author"] != "", f"author is empty in {path}"
assert post["title"] != "", f"title is empty in {path}"
assert post["description"] != "", f"description is empty in {path}"
assert post["tags"] != "", f"tags is empty in {path}"
assert post["optuna_versions"] != "", f"optuna_versions is empty in {path}"
assert post["license"] != "", f"license is empty in {path}"


if __name__ == "__main__":
Expand Down