feat: actorcsvpath
This commit is contained in:
parent
b298a2ac3a
commit
6e3b946eb3
|
@ -30,6 +30,8 @@ def convert(repo_conf: repo.Config, task_conf: task.Config) -> result.Config:
|
||||||
if task_conf.release.deadline
|
if task_conf.release.deadline
|
||||||
else -1
|
else -1
|
||||||
),
|
),
|
||||||
|
# FIXME: don't hardcode
|
||||||
|
actor_csv_path="/home/tt/.config/joj/students.csv",
|
||||||
stage=result.Stage(stages=[], sandbox_token=repo_conf.sandbox_token),
|
stage=result.Stage(stages=[], sandbox_token=repo_conf.sandbox_token),
|
||||||
teapot=get_teapot_config(repo_conf, task_conf),
|
teapot=get_teapot_config(repo_conf, task_conf),
|
||||||
)
|
)
|
||||||
|
|
|
@ -72,7 +72,10 @@ def convert(root: Path = Path(".")) -> Dict[str, Any]:
|
||||||
|
|
||||||
# FIXME: change the path to the server
|
# FIXME: change the path to the server
|
||||||
homework_name = "h8"
|
homework_name = "h8"
|
||||||
folder_path = f"/mnt/c/Users/Nuvole/Desktop/engr151-joj/home/tt/.config/joj/tests/homework/{homework_name}"
|
# folder_path = f"/mnt/c/Users/Nuvole/Desktop/engr151-joj/home/tt/.config/joj/tests/homework/{homework_name}"
|
||||||
|
folder_path = (
|
||||||
|
"/mnt/c/Users/Nuvole/Desktop/engr151-joj/home/tt/.config/joj/tests/homework"
|
||||||
|
)
|
||||||
assert os.path.exists(folder_path), f"there exists no {folder_path}"
|
assert os.path.exists(folder_path), f"there exists no {folder_path}"
|
||||||
distribute_json(folder_path, repo_obj)
|
distribute_json(folder_path, repo_obj)
|
||||||
return result_dict
|
return result_dict
|
||||||
|
|
|
@ -144,5 +144,6 @@ class Config(BaseModel):
|
||||||
name: str = "unknown"
|
name: str = "unknown"
|
||||||
log_path: str = Field("", serialization_alias="logPath")
|
log_path: str = Field("", serialization_alias="logPath")
|
||||||
expire_unix_timestamp: int = Field(-1, serialization_alias="expireUnixTimestamp")
|
expire_unix_timestamp: int = Field(-1, serialization_alias="expireUnixTimestamp")
|
||||||
|
actor_csv_path: str = Field("", serialization_alias="actorCsvPath")
|
||||||
stage: Stage
|
stage: Stage
|
||||||
teapot: Teapot
|
teapot: Teapot
|
||||||
|
|
|
@ -56,8 +56,15 @@ def get_executorWithConfig(
|
||||||
if task_stage.command is not None
|
if task_stage.command is not None
|
||||||
else []
|
else []
|
||||||
),
|
),
|
||||||
|
# FIXME: remove this trick
|
||||||
copy_in={
|
copy_in={
|
||||||
file: result.CmdFile(src=f"/home/tt/.config/joj/{file}")
|
("./.clang-tidy" if file.endswith("clang-tidy") else file): (
|
||||||
|
result.CmdFile(src=f"/home/tt/.config/joj/{file}")
|
||||||
|
if not file.endswith("main.cpp")
|
||||||
|
else result.CmdFile(
|
||||||
|
src=f"/home/tt/.config/joj/tests/homework/h7/e3/ex3-main.cpp"
|
||||||
|
)
|
||||||
|
)
|
||||||
for file in copy_in_files
|
for file in copy_in_files
|
||||||
},
|
},
|
||||||
stdin=(
|
stdin=(
|
||||||
|
@ -242,8 +249,8 @@ def fix_diff(
|
||||||
stage_cases.append(
|
stage_cases.append(
|
||||||
result.OptionalCmd(
|
result.OptionalCmd(
|
||||||
stdin=result.CmdFile(
|
stdin=result.CmdFile(
|
||||||
# src=f"/home/tt/.config/joj/{task_conf.task.type_}/{stdin}"
|
src=f"/home/tt/.config/joj/{task_conf.task.type_}/{stdin}"
|
||||||
src=f"/home/tt/.config/joj/{task_stage.path}/{stdin}"
|
# src=f"/home/tt/.config/joj/{task_stage.path}/{stdin}"
|
||||||
),
|
),
|
||||||
args=(
|
args=(
|
||||||
shlex.split(case_stage.command) if command is not None else None
|
shlex.split(case_stage.command) if command is not None else None
|
||||||
|
@ -268,8 +275,8 @@ def fix_diff(
|
||||||
{
|
{
|
||||||
"score": diff_output.score,
|
"score": diff_output.score,
|
||||||
"fileName": "stdout",
|
"fileName": "stdout",
|
||||||
# "answerPath": f"/home/tt/.config/joj/{task_conf.task.type_}/{stdout}",
|
"answerPath": f"/home/tt/.config/joj/{task_conf.task.type_}/{stdout}",
|
||||||
"answerPath": f"/home/tt/.config/joj/{task_stage.path}/{stdin}",
|
# "answerPath": f"/home/tt/.config/joj/{task_stage.path}/{stdin}",
|
||||||
"forceQuitOnDiff": diff_output.forcequit,
|
"forceQuitOnDiff": diff_output.forcequit,
|
||||||
"alwaysHide": diff_output.hide,
|
"alwaysHide": diff_output.hide,
|
||||||
"compareSpace": not diff_output.ignorespaces,
|
"compareSpace": not diff_output.ignorespaces,
|
||||||
|
|
|
@ -7,4 +7,4 @@ sandbox_token = "test"
|
||||||
whitelist_patterns = ["*.py", "*.txt", "*.md"]
|
whitelist_patterns = ["*.py", "*.txt", "*.md"]
|
||||||
whitelist_file = ".whitelist"
|
whitelist_file = ".whitelist"
|
||||||
required = ["README.md" ]
|
required = ["README.md" ]
|
||||||
immutable = [".gitignore", ".gitattributes", ".gitea/workflows/release.yaml" ]
|
immutable = [".gitignore", ".gitattributes",".gitea/workflows/push.yaml", ".gitea/workflows/release.yaml" ]
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"name": "e2",
|
"name": "e2",
|
||||||
"logPath": "/home/tt/.cache/joj3/exam/e2.log",
|
"logPath": "/home/tt/.cache/joj3/exam/e2.log",
|
||||||
"expireUnixTimestamp": 1735574399,
|
"expireUnixTimestamp": 1735574399,
|
||||||
|
"actorCsvPath": "/home/tt/.config/joj/students.csv",
|
||||||
"stage": {
|
"stage": {
|
||||||
"sandboxExecServer": "172.17.0.1:5051",
|
"sandboxExecServer": "172.17.0.1:5051",
|
||||||
"sandboxToken": "test",
|
"sandboxToken": "test",
|
||||||
|
@ -18,8 +19,8 @@
|
||||||
"-root=.",
|
"-root=.",
|
||||||
"-repoSize=50.5",
|
"-repoSize=50.5",
|
||||||
"-meta=README.md",
|
"-meta=README.md",
|
||||||
"-checkFileSumList=12e3ffc45b2cf64a83f208d982b23559ac6b73e68055ba396fe291efeec3732a,b1bbad25b830db0a77b15a033f9ca1b7ab44c1d2d05056412bd3e4421645f0bf,46b08d7120f3947261eba15fd6323561f310b4732e8528c01e0144db1ce18375",
|
"-checkFileSumList=a5b63323a692d3d8b952442969649b4f823d58dae26429494f613df160710dfc,b1bbad25b830db0a77b15a033f9ca1b7ab44c1d2d05056412bd3e4421645f0bf,f6740081487ca34963a005209e2e9adfdf6f3561719af082d40fe80145e0cceb,ad7ba6fbee5d80e018e4190e31bd842553d540044f0faf13592d73cef93a061b",
|
||||||
"-checkFileNameList=.gitignore,.gitattributes,.gitea/workflows/release.yaml"
|
"-checkFileNameList=.gitignore,.gitattributes,.gitea/workflows/push.yaml,.gitea/workflows/release.yaml"
|
||||||
],
|
],
|
||||||
"env": [
|
"env": [
|
||||||
"PATH=/usr/bin:/bin:/usr/local/bin"
|
"PATH=/usr/bin:/bin:/usr/local/bin"
|
||||||
|
|
4
tests/immutable_file/.gitignore
vendored
4
tests/immutable_file/.gitignore
vendored
|
@ -10,10 +10,14 @@
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!.gitattributes
|
!.gitattributes
|
||||||
!.gitea/
|
!.gitea/
|
||||||
|
!.gitea/issue_template/
|
||||||
!.gitea/workflows/
|
!.gitea/workflows/
|
||||||
!*.yaml
|
!*.yaml
|
||||||
!Makefile
|
!Makefile
|
||||||
!CMakeLists.txt
|
!CMakeLists.txt
|
||||||
|
!h[0-8]/
|
||||||
|
!*.m
|
||||||
!*.c
|
!*.c
|
||||||
|
!*.cpp
|
||||||
!*.h
|
!*.h
|
||||||
!*.md
|
!*.md
|
||||||
|
|
|
@ -18,4 +18,4 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: run joj3
|
- name: run joj3
|
||||||
run: |
|
run: |
|
||||||
sudo -E -u tt joj3 -conf-root "/home/tt/.config/joj/exam" -conf-name "conf-release.json" -tag "${{ github.ref_name }}"
|
sudo -E -u tt joj3 -conf-root "/home/tt/.config/joj/tests/homework" -conf-name "conf-release.json" -tag "${{ github.ref_name }}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user