Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Updated example problem format from JSON to YAML.
There was a problem hiding this comment.
Pull request overview
Adds a merge utility intended for GitHub Actions that validates a “new problems” YAML file and merges it into problems.yaml, refactoring the existing YAML validator to be reusable from other scripts.
Changes:
- Refactor
utils/validate_yaml.pyto exposevalidate_data()/ return booleans instead of exiting. - Add
utils/merge_yaml.pyto validate and merge new problems intoproblems.yaml. - Update docs/workflow files related to the “new problem” flow.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
utils/validate_yaml.py |
Refactors validation into reusable functions and adjusts CLI behavior. |
utils/new_problem.yaml |
Removes the template file (affects submission/validation flow). |
utils/merge_yaml.py |
New script to validate + merge new problems into problems.yaml. |
utils/README.md |
Adds an example snippet for the new-problem YAML format. |
docs/problems.html |
Updates rendered docs table output (empty cells / spacing). |
docs/index.html |
Updates rendered docs table output (empty cells / spacing). |
.github/workflows/new_problem_check.yml |
Adjusts workflow triggers/step guard for the new-problem validation. |
Comments suppressed due to low confidence (1)
.github/workflows/new_problem_check.yml:11
- This workflow is still keyed to
utils/new_problem.yaml, but that file was removed in this PR. As a result the validation step will never run for new submissions (and contributors no longer have a template to edit). Either keep/restoreutils/new_problem.yamlin the repo, or update the workflowpaths(and the script invocation) to match the new intended submission file pattern.
push:
branches:
- main
paths:
- "utils/new_problem.yaml"
pull_request:
paths:
- "utils/new_problem.yaml"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a new utility script intended for GitHub Actions to merge a “new problems” YAML file into the repository’s main problems.yaml after validation (Issue #125).
Changes:
- Introduces
utils/merge_yaml.pyto read/validate a new YAML file and append its entries toproblems.yaml. - Writes the updated
problems.yamland removes the “new problems” file after merging.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a utility script intended for GitHub Actions that merges a “new problems” YAML file into the repository’s main problems.yaml after validating the incoming data.
Changes:
- Introduce
utils/merge_yaml.pyto read, validate, append, and write merged YAML data - Add cleanup behavior to delete the “new problems” YAML file after a successful merge
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…L into feat/merge_script
There was a problem hiding this comment.
Pull request overview
Adds an automated merge utility to combine newly submitted problem definitions into the main problems.yaml, reusing the existing YAML validation logic (intended for GitHub Actions usage).
Changes:
- Refactors
utils/validate_yaml.pyto exposevalidate_data(...)for programmatic validation reuse. - Adds
utils/merge_yaml.pyto validate a “new problems” YAML file, append entries intoproblems.yaml, and delete the input file after a successful merge.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| utils/validate_yaml.py | Adds typing and splits validation into a reusable validate_data helper plus CLI wrapper. |
| utils/merge_yaml.py | New script to validate + merge new problems into problems.yaml and clean up the input file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions–oriented utility for merging newly submitted problems from a separate YAML file into the main problems.yaml, and refactors the existing YAML validator to expose a reusable validation function.
Changes:
- Refactors
utils/validate_yaml.pyto add type hints and introducevalidate_data()for programmatic validation. - Adds
utils/merge_yaml.pyto validate, append, write back, and then delete the “new problems” YAML file.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| utils/validate_yaml.py | Adds typing + extracts validate_data() so other scripts can reuse validation logic. |
| utils/merge_yaml.py | New merge script that reads/validates new problems, appends them to the target YAML, writes, and deletes the input file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Remove the new file after merging | ||
| rm_status = delete_new_file(new_problems_yaml_path) | ||
| if not rm_status: |
| def check_novelty(data: Dict) -> bool: | ||
| # Load existing problems | ||
| read_status, existing_data = read_data(PROBLEMS_FILE) | ||
| if read_status != 0: |
There was a problem hiding this comment.
Pull request overview
Adds a new YAML merge utility intended for GitHub Actions / maintainer workflows, and refactors the existing YAML validator so its validation logic can be reused programmatically.
Changes:
- Refactor
validate_yaml.pyto exposevalidate_data()for validating already-loaded YAML data structures. - Add
merge_yaml.pyto merge a “new problems” YAML file into the mainproblems.yamlfile (and delete the source file after merging). - Update
utils/README.mdto document the updated workflow and new merge script.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| utils/validate_yaml.py | Adds type hints and extracts reusable validate_data() used by other scripts. |
| utils/merge_yaml.py | New script that reads/validates new YAML, appends it to the existing YAML, writes back, and deletes the input file. |
| utils/README.md | Updates usage/workflow docs for validation and merging scripts. |
Comments suppressed due to low confidence (1)
utils/validate_yaml.py:24
- The
read_data()return type is annotated asTuple[int, List[Dict] | None], butyaml.safe_load()can return many top-level types (e.g.,dict,str,None). This annotation is inaccurate and encourages callers to skip explicit type checks. Consider widening the return type (e.g., toAny | None) and adding an explicitisinstance(data, list)check with a clear error when the top-level YAML is not the expected list-of-maps format.
def read_data(filepath: str) -> Tuple[int, List[Dict] | None]:
try:
with open(filepath, "r") as f:
data = yaml.safe_load(f)
return 0, data
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…L into feat/merge_script
Adds a script that merges new problems in a yaml file into the big problems yaml (after validity check). This is intended for usage locally
Closes #125