feat: add whitelist character support in repo toml #29
No reviewers
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: JOJ/JOJ3-config-generator#29
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat_repo-healthcheck-whitelist-char"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit introduces a new key,
health-check.whitelisted-charsfor repo.toml. It allows TAs to configure repo-wide allowed non ASCII chars for the repo-health-checker binary. It results in a new command line switch,-whitelisted-chars=X,Y,Z, in the generated task.json.Co-Authored-By: GitHub Copilot noreply@microsoft.com
Copilot Prompt
This repository contains a Python app that does conversion from TOML config files to a complex, multistage JSON config file for an online judge system. For example, under `tests/convert/full`, input are the two TOML files `repo.toml` and `task.toml`, output is one JSON file `task,json`.
Now, I want the repo-specific config (repo.toml) to accept an extra dotted key, "health-check.whitelisted-chars". This key shall accept an array of UTF-8 non-ASCII characters. To do so, I want you to
joj3_config_generator/models/repo.py, add an extra field whitelisted_chars to class HealthCheck, identified by both "whitelisted-chars" and "whitelisted_chars";joj3_config_generator/transforers/repo.py, translate the field to an additional command line switch-whitelisted-chars, comma-separated.IMPORTANT. Before you start, explore this repo to under the file structure and file-function relations.
This repo uses the PDM package manager. After you finish your work, test your work appropriately. You should create new testcases under
tests/.task.jsonafter running the test, to verify whether the command line switch was added to the Health Checkstageor not.So I just found out that JOJ3 uses camelCase... pushing an update to reflect this
LGTM
Could you also add the field to
tests/convert/full?@ -0,0 +1 @@health-check.whitelisted-chars = ["你", "好", "!"]And can we make it simpler by letting them provide a long string and split it to single characters by the script?
Do you have an example? Like,
I think it should work. cc @manuel
sounds good, thanks!
Thanks, will strive to work this out before 10am today UTC+8
New commits pushed, approval review dismissed automatically according to repository settings
Done.