dev #10

Merged
李衍志523370910113 merged 238 commits from dev into master 2025-03-05 16:20:39 +08:00
Showing only changes of commit e5530ae580 - Show all commits

View File

@ -1,4 +1,5 @@
import shlex
jon-lee marked this conversation as resolved

Path should not be relative to JOJ3_CONFIG_ROOT in this file, should be relative to task.toml dir

Path should not be relative to `JOJ3_CONFIG_ROOT` in this file, should be relative to `task.toml` dir

I reckon you said things is relative to JOJ3_CONFIG_ROOT in JTC before. we have a task.type in task.toml to mend the path

I reckon you said things is relative to `JOJ3_CONFIG_ROOT` in JTC before. we have a `task.type` in `task.toml` to mend the path

config.path is relative to JOJ3_CONFIG_ROOT.

`config.path` is relative to `JOJ3_CONFIG_ROOT`.

could you explain further? I m not quite sure my understanding is clear.

could you explain further? I m not quite sure my understanding is clear.

In joj3_config_generator/models/task.py, Config.path is relative to JOJ3_CONFIG_ROOT, so task.toml will located at JOJ3_CONFIG_ROOT / task_conf.path in JTC.

In `joj3_config_generator/models/task.py`, `Config.path` is relative to `JOJ3_CONFIG_ROOT`, so `task.toml` will located at `JOJ3_CONFIG_ROOT / task_conf.path` in JTC.
import re
jon-lee marked this conversation as resolved

Some with_.update is still using raw dict, not model with model_dump.

Some `with_.update` is still using raw dict, not model with `model_dump`.
from typing import List, Tuple
from joj3_config_generator.models import result, task
@ -9,12 +10,10 @@ def get_conf_stage(
) -> result.StageDetail:
conf_stage = result.StageDetail(
name=task_stage.name if task_stage.name is not None else "",
# TODO: we may have cq in future
group=(
"joj"
if (task_stage.name is not None)
and (("joj" in task_stage.name) or ("run" in task_stage.name))
else None
re.search(r'\[([^\[\]]+)\]', task_stage.name).group(1)
if (task_stage.name is not None and re.search(r'\[([^\[\]]+)\]', task_stage.name))
else ""
jon-lee marked this conversation as resolved Outdated

BTW, is this outdated?

BTW, is this outdated?

Never heard about this rule.

Never heard about this rule.

@manuel what would be the current intended rule for group?

@manuel what would be the current intended rule for `group`?

seems current strategy is fine, resolved.

seems current strategy is fine, resolved.
),
executor=result.Executor(
name="sandbox",
@ -62,7 +61,7 @@ def get_executorWithConfig(
result.CmdFile(src=f"/home/tt/.config/joj/{file}")
if not file.endswith("main.cpp")
else result.CmdFile(
jon-lee marked this conversation as resolved Outdated

not necessary

not necessary

resolved.

resolved.
src=f"/home/tt/.config/joj/tests/homework/h7/e3/ex3-main.cpp"
src=f"/home/tt/.config/joj/homework/h7/e3/ex3-main.cpp"
)
)
for file in copy_in_files
@ -188,7 +187,6 @@ def fix_dummy(
dummy_parser = [
"dummy",
"result-status",
jon-lee marked this conversation as resolved Outdated

Pass JOJ3_CONFIG_ROOT / task_conf.path.parent as base_dir in parameters.

Pass `JOJ3_CONFIG_ROOT / task_conf.path.parent` as `base_dir` in parameters.

resolved.

resolved.
"cpplint",
]
if task_stage.parsers is not None:
for parser in task_stage.parsers: