From 3070a70f206100362a75b4c237eccddbe807445f Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 17 Oct 2024 00:25:43 +0800 Subject: [PATCH] refactor: smaple all together --- JOJ3-Configuration-Schema.md | 66 ++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/JOJ3-Configuration-Schema.md b/JOJ3-Configuration-Schema.md index 1deef33..5064682 100644 --- a/JOJ3-Configuration-Schema.md +++ b/JOJ3-Configuration-Schema.md @@ -77,21 +77,6 @@ It should be saved in the `joj-root` configuration for the repository. - put this `repo.toml` file in the "root directory" containing all the configuration for this repository, eg. `/home/tt/.config/joj/hw` for homework repository -
Sample repo.toml -- stored in the `joj-root` configuration for the repository - -```toml -teaching_team = ["mac-wang", "jon-lee", "allen_wr"] # jaccounts - -maxsize = 5 # 5MB repo max size -releasetags = ["h1", "h2", "h3"] # list of valid release tags - -[files] -immutable = [".gitignore", ".gitattributes", ".gitea/workflows/push.yaml"] # readonly files -required = [ "Changelog.md", "Readme.md" ] # files that must be found -whitelist.patterns = ["*.cpp", "*.c", "*.m", "*.md", "Makefile", "CMakelist.txt", ".gitea", "messenger.json"] # files/patterns which are not forbidden -``` - -
## Task level configuration @@ -207,10 +192,57 @@ Not ready yet. - `output.ignorespaces [boolean]`: ignore white spaces in diff output (default: `true`) - `score [int]`: score awarded for passing the test case (default: `0`) -*Note.* This parser can be configured and adjusted for each test-case (others parsers are configured at the stage level) +*Note.* This parser can be configured and adjusted for each test-case (others parsers are configured at stage level) -
Sample task.toml +## Examples + + +Sample repository configuration file stored in the `joj-root` configuration for the +repository. + +
Sample repo.toml + +```toml +teaching_team = ["mac-wang", "jon-lee", "allen_wr"] # jaccounts + +maxsize = 5 # 5MB repo max size +releasetags = ["h1", "h2", "h3"] # list of valid release tags + +[files] +immutable = [".gitignore", ".gitattributes", ".gitea/workflows/push.yaml"] # readonly files +required = [ "Changelog.md", "Readme.md" ] # files that must be found +whitelist.patterns = ["*.cpp", "*.c", "*.m", "*.md", "Makefile", "CMakelist.txt", ".gitea", "messenger.json"] # files/patterns which are not forbidden +``` + +
+ +Sample basic task configuration for MATLAB where most default options are used. + +
Basic sample task.toml + +```toml +task="hw3 ex5" + +release.deadline = 2024-10-18 23:59:00+08:00 + +[judge-base] +command="./matlab-joj ./h3/ex5.m" +files.import = [ "tools/matlab-joj", "tools/matlab_formatter.py" ] +score = 100 + +parsers = ["diff", "result-detail"] +result-detail.time = false +result-detail.mem = false +result-detail.error = true +``` + +
+ + +Sample advanced task configuration for C where many default options are overwritten. + +
Advanced sample task.toml ```toml # general task configuration