Commit Graph

10 Commits

Author SHA1 Message Date
8176ea8c5e feat: add whitelist character support in repo toml (#29)
All checks were successful
build / build (push) Successful in 8m39s
build / trigger-build-image (push) Successful in 1m36s
This commit introduces a new key, `health-check.whitelisted-chars` for 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>
<details>
<summary>Copilot Prompt</summary>
<br>
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
- Model. Under `joj3_config_generator/models/repo.py`, add an extra field *whitelisted_chars* to class *HealthCheck*, identified by both "whitelisted-chars" and "whitelisted_chars";
- Transforming. Under `joj3_config_generator/transforers/repo.py`, translate the field to an additional command line switch `-whitelisted-chars`, comma-separated.
- Other files you deem necessary, based on your understanding of this repo.

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/`.
- Details: Read the output `task.json` after running the test, to verify whether the command line switch was added to the *Health Check* `stage` or not.
</details>

Reviewed-on: https://focs.ji.sjtu.edu.cn/git/JOJ/JOJ3-config-generator/pulls/29
Reviewed-by: 李衍志523370910113 <jon-lee@sjtu.edu.cn>
Reviewed-by: 张泊明518370910136 <bomingzh@sjtu.edu.cn>
Co-authored-by: Mack Wang <mac-wang@outlook.com>
Co-committed-by: Mack Wang <mac-wang@outlook.com>
2026-04-22 17:06:54 +08:00
Boming Zhang
8150d3d770
feat: better error msg & tests
All checks were successful
build / build (push) Successful in 2m9s
build / trigger-build-image (push) Successful in 12s
2025-09-17 15:54:27 -07:00
eac9100146 docs: full toml sample (#20) (#27)
All checks were successful
build / build (push) Successful in 2m3s
build / trigger-build-image (push) Successful in 12s
Reviewed-on: https://focs.ji.sjtu.edu.cn/git/JOJ/JOJ3-config-generator/pulls/27
Co-authored-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Co-committed-by: Boming Zhang <bomingzh@sjtu.edu.cn>
2025-07-08 04:38:47 +08:00
8b16214be4
feat: automatically create default fallback conf
All checks were successful
build / build (push) Successful in 3m42s
build / trigger-build-image (push) Successful in 10s
2025-07-01 08:29:12 -04:00
88d864d49d
test: fix cases
All checks were successful
build / build (push) Successful in 1m56s
build / trigger-build-image (push) Successful in 14s
2025-06-30 06:30:34 -04:00
58037b4672 feat(elf): support for elf (#18)
All checks were successful
build / build (push) Successful in 1m31s
- elf support added
- testcases for elf

Reviewed-on: https://focs.ji.sjtu.edu.cn/git/JOJ/JOJ3-config-generator/pulls/18
Reviewed-by: 张泊明518370910136 <bomingzh@sjtu.edu.cn>
Co-authored-by: jon-lee <jon-lee@sjtu.edu.cn>
Co-committed-by: jon-lee <jon-lee@sjtu.edu.cn>
2025-05-28 08:20:55 +08:00
18df2ef1c0
feat: support convert (#10)
All checks were successful
build / build (push) Successful in 2m18s
- basic generation of json files
  - supported parsers:
    - healthcheck
    - result-detail
    - result-status
    - file
    - log
    - dummy
    - keyword (keyword, clangtidy, cppcheck, cpplint)
    - diff
- `convert` functions is mature, tested in engr151-24fa last two homeworks and engr151-24fa p3
- teapot and healthcheck should be up to date

Co-authored-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Reviewed-on: https://focs.ji.sjtu.edu.cn/git/JOJ/JOJ3-config-generator/pulls/10
Reviewed-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Co-authored-by: jon-lee <jon-lee@sjtu.edu.cn>
Co-committed-by: jon-lee <jon-lee@sjtu.edu.cn>
2025-03-05 03:23:52 -05:00
48d01045b5
refactor: more compact test codes
All checks were successful
build / build (push) Successful in 1m50s
2024-10-23 01:39:36 -04:00
51b68b7c87
refactor: re-organize tests & models
Some checks failed
build / build (push) Failing after 1m38s
2024-10-22 06:17:09 -04:00
75bb6d6667
feat: convert joj1 test dir 2024-10-21 07:21:23 -04:00