Skip to content

Commit

Permalink
Revert header confirmation CI
Browse files Browse the repository at this point in the history
  • Loading branch information
y0z committed Jul 5, 2024
1 parent 4e3f756 commit 386354c
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions optunahub-registry/header_confirm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,11 @@
def header_confirm(path: str) -> None:
post = frontmatter.load(path)
assert "author" in post.keys(), f"author is not found in {path}"
assert isinstance(post["author"], str), f"author is not a string in {path}"
assert "title" in post.keys(), f"title is not found in {path}"
assert isinstance(post["title"], str), f"title is not a string in {path}"
assert "description" in post.keys(), f"description is not found in {path}"
assert isinstance(post["description"], str), f"description is not a string in {path}"
assert isinstance(post["tags"], list), f"tags is not a list in {path}"
assert all(
isinstance(v, str) for v in post["tags"]
), f"tags is not a list of strings in {path}"
split_path = path.split("/")
if split_path[0] == "package":
category = split_path[1]
if category == "samplers":
assert "sampler" in post["tags"], f"sampler tag must be in {path}"
elif category == "visualizations":
assert "visualization" in post["tags"], f"visualization tag must be in {path}"
elif category == "pruners":
assert "pruner" in post["tags"], f"pruner tag must be 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 isinstance(post["optuna_versions"], list), f"optuna_versions is not a list in {path}"
assert all(
isinstance(v, str) for v in post["optuna_versions"]
), f"optuna_versions is not a list of strings in {path}"
assert "license" in post.keys(), f"license is not found in {path}"
assert isinstance(post["license"], str), f"license is not a string in {path}"
assert post["license"] == "MIT License", f"license must be 'MIT License' in {path}"


if __name__ == "__main__":
Expand Down

0 comments on commit 386354c

Please sign in to comment.