dev #10

Merged
李衍志523370910113 merged 238 commits from dev into master 2025-03-05 16:20:39 +08:00

What I have done:

  • 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

TODO

  • update all new comming parsers in future.

@bomingzh Could you please help me do a code review first then I shall fix all things and rebase? I checked the source code of JOJ3 currently, and find we have more parsers, such as plugin and tierscore, I haven''t added them yet, and some of the keys might have changed such as clang-tidy, can you help me take a look if current version is still up to date? I ll redo the fix tomorrow

## What I have done: - 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 ## TODO - update all new comming parsers in future. @bomingzh Could you please help me do a code review first then I shall fix all things and rebase? I checked the source code of JOJ3 currently, and find we have more parsers, such as plugin and tierscore, I haven''t added them yet, and some of the keys might have changed such as clang-tidy, can you help me take a look if current version is still up to date? I ll redo the fix tomorrow
李衍志523370910113 added 132 commits 2025-02-23 21:47:29 +08:00
This reverts commit 5a8ea67bc82d1a5e2c23666cb09d54244708b669.
feat: teapot stage added
Some checks failed
build / build (pull_request) Failing after 2m24s
build / build (push) Failing after 2m27s
47c46755e6
fix: healthcheck & update teapot poststage
Some checks failed
build / build (push) Failing after 2m12s
build / build (pull_request) Failing after 2m10s
c67dd32cf2
refactor: remove redundant teapot config code
Some checks failed
build / build (pull_request) Failing after 2m4s
build / build (push) Failing after 2m6s
9f3d820ae3
refactor: remove redundant teapot config code
Some checks failed
build / build (push) Failing after 2m22s
build / build (pull_request) Failing after 2m21s
84e6f67f83
feat: joj1 convert init
Some checks failed
build / build (pull_request) Failing after 2s
build / build (push) Failing after 0s
80b33324e5
fix: path issue
Some checks failed
build / build (push) Failing after 2s
build / build (pull_request) Failing after 0s
979185252d
feat: distribute according to conf root
Some checks failed
build / build (push) Failing after 1s
build / build (pull_request) Failing after 0s
7f24a77308
李衍志523370910113 added the
enhancement
label 2025-02-23 21:47:41 +08:00
张泊明518370910136 was assigned by 李衍志523370910113 2025-02-23 21:47:46 +08:00
李衍志523370910113 self-assigned this 2025-02-23 21:47:46 +08:00
李衍志523370910113 added 1 commit 2025-02-23 21:51:45 +08:00
feat: begin_time support
Some checks failed
build / build (push) Failing after 1s
build / build (pull_request) Failing after 0s
94a85f433e
李衍志523370910113 added 1 commit 2025-02-23 22:03:05 +08:00
feat: begin_time support
Some checks failed
build / build (push) Failing after 1s
build / build (pull_request) Failing after 0s
f48f67bab4
张泊明518370910136 requested changes 2025-02-23 22:37:08 +08:00
Dismissed
张泊明518370910136 left a comment
Owner

The test cases should be split into smaller parts. Each test case tests one parser.

The test cases should be split into smaller parts. Each test case tests one parser.
.gitignore Outdated
@ -16,3 +16,3 @@
eggs/
.eggs/
lib/
# lib/

should be ignored

should be ignored
Author
Member

fixed

fixed
jon-lee marked this conversation as resolved
@ -11,1 +30,3 @@
log_path=f"{task_conf.task.replace(' ', '_')}.log",
name=task_conf.task.name,
# exact folder difference specified by type
log_path=f"{Path.home()}/.cache/joj3/{task_conf.task.type_}.log",

Make this Path.home() default to /home/tt. For now, create a const for this dir.

Make this `Path.home()` default to `/home/tt`. For now, create a const for this dir.
Author
Member

fixed

fixed
jon-lee marked this conversation as resolved
@ -0,0 +1,52 @@
from typing import List
import humanfriendly

is it added to pyproject.toml?

is it added to pyproject.toml?
Author
Member

now added

now added
jon-lee marked this conversation as resolved
@ -0,0 +33,4 @@
return conf_stage
def get_executorWithConfig(

underscore

underscore
Author
Member

fixed

fixed
jon-lee marked this conversation as resolved
@ -0,0 +1,33 @@
*.avi filter=lfs diff=lfs merge=lfs -text

are these files ready to be tested? or are they just examples?

are these files ready to be tested? or are they just examples?
Author
Member

they are just examples

they are just examples
jon-lee marked this conversation as resolved
李衍志523370910113 added 1 commit 2025-02-23 23:13:28 +08:00
feat: small json testcases
Some checks failed
build / build (push) Failing after 1s
build / build (pull_request) Failing after 1s
8c90dbdc3f
李衍志523370910113 added 1 commit 2025-02-24 10:09:30 +08:00
ci: only use runs-on
Some checks failed
build / build (push) Failing after 0s
build / build (pull_request) Failing after 2m22s
d1b718a30c
李衍志523370910113 added 1 commit 2025-02-24 22:12:41 +08:00
chore: remove useless files
Some checks failed
build / build (push) Failing after 2m29s
build / build (pull_request) Failing after 2m27s
4758e3be7a
李衍志523370910113 added 1 commit 2025-02-24 22:29:26 +08:00
feat: small testcases for parsers
Some checks failed
build / build (pull_request) Failing after 2m43s
build / build (push) Failing after 2m41s
80e2bf6bad
李衍志523370910113 added 1 commit 2025-02-25 08:35:53 +08:00
fix: remove redundant cotent in small testcases
Some checks failed
build / build (push) Failing after 2m30s
build / build (pull_request) Failing after 2m29s
454b320740
李衍志523370910113 added 1 commit 2025-02-25 09:54:28 +08:00
fix: assertion error to pass test
Some checks failed
build / build (pull_request) Failing after 2m31s
build / build (push) Failing after 2m34s
a19f6ba84b
李衍志523370910113 added 1 commit 2025-02-25 10:02:59 +08:00
fix: assertion error to pass test
All checks were successful
build / build (push) Successful in 2m32s
build / build (pull_request) Successful in 2m30s
8264caf7f8
Author
Member

@bomingzh smaller testcases are ready, each one with single parsers

@bomingzh smaller testcases are ready, each one with single parsers
张泊明518370910136 reviewed 2025-02-25 10:40:11 +08:00
@ -28,0 +82,4 @@
cases: Optional[Dict[str, "Stage"]] = None
diff: Optional[ParserDiff] = ParserDiff()
class Config:

deprecated

deprecated
Author
Member

@bomingzh any suggestions on the structure?

@bomingzh any suggestions on the structure?
PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.9/migration/
``` PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.9/migration/ ```
Author
Member

fixed with model_config

fixed with `model_config`

str here need to be a StrEnum now.

str here need to be a `StrEnum` now.
Author
Member

But I guess we don't know the set of case in advance, making it dynamic StrEnum is meaningless

But I guess we don't know the set of case in advance, making it dynamic `StrEnum` is meaningless

line changed, the comment is for parsers

line changed, the comment is for `parsers`
jon-lee marked this conversation as resolved
李衍志523370910113 added 1 commit 2025-02-25 10:54:21 +08:00
feat: distribute logic and flags
Some checks failed
build / build (push) Failing after 2m28s
build / build (pull_request) Failing after 2m27s
70366f467f
李衍志523370910113 added 1 commit 2025-02-25 11:08:16 +08:00
docs: update README
Some checks failed
build / build (pull_request) Failing after 2m21s
build / build (push) Failing after 2m23s
658e6e06c5
李衍志523370910113 added 1 commit 2025-02-25 11:10:55 +08:00
docs: fix code block
Some checks failed
build / build (push) Has been cancelled
build / build (pull_request) Failing after 2m24s
f31c6c1c49
李衍志523370910113 added 1 commit 2025-02-25 11:11:56 +08:00
docs: fix code block
Some checks failed
build / build (pull_request) Failing after 2m17s
build / build (push) Failing after 2m19s
6d2097b84b
张泊明518370910136 added 1 commit 2025-02-25 11:17:56 +08:00
test: skip health check stage
Some checks failed
build / build (pull_request) Failing after 2m28s
build / build (push) Failing after 2m30s
a41b32ce92

Also, remove the compilation stage in test cases.

Also, remove the compilation stage in test cases.
李衍志523370910113 added 2 commits 2025-02-25 11:28:19 +08:00
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
Some checks failed
build / build (pull_request) Failing after 2m26s
build / build (push) Failing after 2m28s
2d9e9c023f
Author
Member

@bomingzh compilation stage in testcases are removed

@bomingzh compilation stage in testcases are removed
李衍志523370910113 added 1 commit 2025-02-25 14:16:01 +08:00
fix: add model_config in Stage class
Some checks failed
build / build (pull_request) Failing after 2m30s
build / build (push) Failing after 2m33s
591d6d552e
张泊明518370910136 reviewed 2025-02-25 17:16:00 +08:00
@ -1,37 +1,21 @@
import json

this file should not be changed

this file should not be changed
jon-lee marked this conversation as resolved
李衍志523370910113 added 1 commit 2025-02-26 23:17:12 +08:00
fix: cases path
Some checks failed
build / build (pull_request) Failing after 4s
build / build (push) Failing after 5s
994137af85
李衍志523370910113 added 1 commit 2025-02-27 15:51:32 +08:00
refactor/main (#11)
All checks were successful
build / build (push) Successful in 2m29s
build / build (pull_request) Successful in 2m27s
347c4b91d5
# what I have done

- sync main function in master branch and tested current code usage
- remove redundant code
- update README documents
- fix the immutable files logic

## TODO

- give fallback options for immutable files

Co-authored-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Reviewed-on: #11
Co-authored-by: jon-lee <jon-lee@sjtu.edu.cn>
Co-committed-by: jon-lee <jon-lee@sjtu.edu.cn>
Author
Member

@bomingzh code refactor has been done.

@bomingzh code refactor has been done.

Are all the old conversations resolved?

Are all the old conversations resolved?
Author
Member

Yes, and I just fixed another path problems about diff, but turns out it cannot pass test now 😂 am looking into it.

Yes, and I just fixed another path problems about `diff`, but turns out it cannot pass test now 😂 am looking into it.

Then click the "Resolve conversation" button.

Rebase is needed, some codes are not from latest master.

Then click the "Resolve conversation" button. Rebase is needed, some codes are not from latest master.
李衍志523370910113 added 1 commit 2025-02-27 16:11:23 +08:00
fix: merge master
Some checks failed
build / build (pull_request) Failing after 3s
build / build (push) Failing after 2m28s
1656d622e1
Author
Member

I merged master here #11, and double checked, should all be fine I guess? Do you have more suggestions on the code and adding features about parsers?

I merged master here https://focs.ji.sjtu.edu.cn/git/JOJ/JOJ3-config-generator/pulls/11, and double checked, should all be fine I guess? Do you have more suggestions on the code and adding features about parsers?
张泊明518370910136 reviewed 2025-02-27 16:15:26 +08:00
@ -0,0 +1,33 @@
*.avi filter=lfs diff=lfs merge=lfs -text

why here?

why here?
Author
Member

you mean the existence of the file? I design the logic of immutable folders to be like this:

[nuvole0217@Nuvole test]$ tree .
.
|- immutable_files
| |-- push.yaml
| |-- release.yaml
| |-- .gitignore
| |-- .gitattributes
|-- repo.toml
you mean the existence of the file? I design the logic of `immutable folders` to be like this: ```shell [nuvole0217@Nuvole test]$ tree . . |- immutable_files | |-- push.yaml | |-- release.yaml | |-- .gitignore | |-- .gitattributes |-- repo.toml ```

Why does this test need immutable files?

Why does this test need immutable files?
Author
Member

you are right

you are right
Author
Member

fixed

fixed
jon-lee marked this conversation as resolved
李衍志523370910113 added 1 commit 2025-02-27 16:18:58 +08:00
docs(README): fix typo
Some checks failed
build / build (pull_request) Failing after 2m23s
build / build (push) Failing after 2m25s
63b9b9e47b
张泊明518370910136 reviewed 2025-02-27 16:21:11 +08:00
@ -21,0 +45,4 @@
# Construct healthcheck stage
if (
not repo_conf.force_skip_heatlh_check_on_test
# or os.environ.get("PYTEST_CURRENT_TEST") is None

why?

why?
Author
Member

forgot to uncommented 😭

forgot to uncommented 😭
Author
Member

fixed

fixed
jon-lee marked this conversation as resolved
张泊明518370910136 reviewed 2025-02-27 16:24:24 +08:00
@ -59,6 +59,7 @@ def convert(
Convert given dir of JOJ3 toml config files to JOJ3 json config files
"""
logger.info(f"Converting files in {root.absolute()}")
root = root.absolute()

why?

why?
Author
Member

fixed

fixed
jon-lee marked this conversation as resolved
李衍志523370910113 added 1 commit 2025-02-27 16:25:45 +08:00
chore(*/immutable_files): remove redundant test files
Some checks failed
build / build (push) Has been cancelled
build / build (pull_request) Failing after 2m24s
9fff4a9aca
张泊明518370910136 reviewed 2025-02-27 16:26:53 +08:00
@ -25,0 +21,4 @@
stdin: Optional[CmdFile] = CmdFile(content="")
stdout: Optional[CmdFile] = CmdFile(name="stdout", max=4 * 1024)
stderr: Optional[CmdFile] = CmdFile(name="stderr", max=4 * 1024)
cpu_limit: int = Field(4 * 1000000000000, serialization_alias="cpuLimit")

default value too large, should be 1s 128MB

default value too large, should be 1s 128MB
Author
Member

will fix later, we need to hold some test I reckon?

will fix later, we need to hold some test I reckon?

no

no
Author
Member

@bomingzh fixed

@bomingzh fixed
jon-lee marked this conversation as resolved
李衍志523370910113 added 1 commit 2025-02-27 16:27:49 +08:00
chore: remove absolute root
Some checks failed
build / build (push) Failing after 2m30s
build / build (pull_request) Failing after 2m29s
aa678484ee
李衍志523370910113 added 1 commit 2025-02-28 10:33:45 +08:00
fix: default size change to 1s & 128m
Some checks failed
build / build (pull_request) Failing after 2m29s
build / build (push) Failing after 2m32s
e87b3ca775

Tests not passed

Tests not passed
李衍志523370910113 added 1 commit 2025-03-01 20:21:10 +08:00
fix: pass test
All checks were successful
build / build (pull_request) Successful in 2m27s
build / build (push) Successful in 2m30s
5601b46ffa
李衍志523370910113 added 1 commit 2025-03-01 20:46:31 +08:00
fix: merge master
Some checks failed
build / build (push) Has been cancelled
build / build (pull_request) Failing after 2m22s
b587d2c63a
李衍志523370910113 added 1 commit 2025-03-01 20:47:44 +08:00
fix: pass test
All checks were successful
build / build (push) Successful in 2m24s
build / build (pull_request) Successful in 2m23s
e7f8f5bb94
Author
Member

@bomingzh test can pass now, with conflict with master fixed.

@bomingzh test can pass now, with conflict with master fixed.
张泊明518370910136 added 1 commit 2025-03-02 01:51:55 +08:00
fix: typo
All checks were successful
build / build (pull_request) Successful in 2m31s
build / build (push) Successful in 2m33s
279182f659

Is pre-commit on your local dev env installed correctly?

Is `pre-commit` on your local dev env installed correctly?
张泊明518370910136 added 1 commit 2025-03-02 02:00:53 +08:00
feat: force skip teapot on test
All checks were successful
build / build (push) Successful in 2m31s
build / build (pull_request) Successful in 2m30s
c7917efac7
张泊明518370910136 added 1 commit 2025-03-02 02:04:36 +08:00
chore: remove joj1 convert tests
All checks were successful
build / build (pull_request) Successful in 2m29s
build / build (push) Successful in 2m31s
19ba9c529d
张泊明518370910136 added 2 commits 2025-03-02 02:14:33 +08:00
docs: remove personal info
All checks were successful
build / build (pull_request) Successful in 2m41s
build / build (push) Successful in 2m40s
29fc78e400
张泊明518370910136 requested changes 2025-03-02 02:37:44 +08:00
Dismissed
@ -25,0 +27,4 @@
stderr: Optional[CmdFile] = CmdFile(
name="stderr", max=humanfriendly.parse_size("128m")
)
cpu_limit: int = Field(timeparse("1s"), serialization_alias="cpuLimit")

unit?

unit?
Author
Member

I think timeparse and humanfriendly would deal wth that?

I think `timeparse` and `humanfriendly` would deal wth that?
Author
Member

resolved.

resolved.
jon-lee marked this conversation as resolved
@ -31,2 +98,3 @@
class Release(BaseModel):
deadline: Optional[datetime] # RFC 3339 formatted date-time with offset
deadline: Optional[datetime] = None # RFC 3339 formatted date-time with offset
begin_time: Optional[datetime] = None

begin_time and end_time to make them match

`begin_time` and `end_time` to make them match
Author
Member

resolved

resolved
jon-lee marked this conversation as resolved
@ -0,0 +7,4 @@
def get_grading_repo_name() -> str:
# FIXME: uncomment back when everything is ready!
host_name = "ece280"

make it a field in repo.toml, if it is unset, then use socket.gethostname. We set this value to pass the test.

make it a field in repo.toml, if it is unset, then use `socket.gethostname`. We set this value to pass the test.
Author
Member

resolved.

resolved.
jon-lee marked this conversation as resolved
@ -0,0 +51,4 @@
immutable_files = immutable_files + name + " "
else:
immutable_files = immutable_files + name + ","
chore = "/usr/local/bin/repo-health-checker -root=. "

why not args = "hc -root=. "

why not `args = "hc -root=. "`
Author
Member

resolved.

resolved.
jon-lee marked this conversation as resolved
@ -0,0 +77,4 @@
copy_in_cached={file: file for file in cached},
copy_out_cached=file_export if file_export is not None else [],
cpu_limit=(
task_stage.limit.cpu * 1_000_000_000_000

is it in the correct unit?
Give all the fields in Limit a default value and make it non optional in task_stage.limit

is it in the correct unit? Give all the fields in `Limit` a default value and make it non optional in task_stage.limit
Author
Member

resolved

resolved
jon-lee marked this conversation as resolved
@ -0,0 +126,4 @@
) -> result.StageDetail:
keyword_parser = ["clangtidy", "keyword", "cppcheck", "cpplint"]
if task_stage.parsers is not None:
for parser in task_stage.parsers:
    if task_stage.parsers is not None:
        for parser in task_stage.parsers:

->

for parser in task_stage.parsers or []:
``` if task_stage.parsers is not None: for parser in task_stage.parsers: ``` -> ``` for parser in task_stage.parsers or []: ```
Author
Member

resolved.

resolved.
jon-lee marked this conversation as resolved
@ -0,0 +152,4 @@
{
"matches": keyword_weight,
"fullscore": 0,
"minscore": -1000,

these fields do not exist now

these fields do not exist now
Author
Member

resolved

resolved
No description provided.
bomingzh marked this conversation as resolved
@ -0,0 +157,4 @@
}
)
else:
continue

move continue to the other branch to reduce nesting

move `continue` to the other branch to reduce nesting

I mean

if parser not in keyword_parser:
    continue
if getattr(task_stage, parser, None) is None:
    continue
if score != score_:
    continue
I mean ``` if parser not in keyword_parser: continue ``` ``` if getattr(task_stage, parser, None) is None: continue ```` ``` if score != score_: continue ````
Author
Member

fixed.

fixed.
jon-lee marked this conversation as resolved
@ -0,0 +172,4 @@
show_files = []
if (
task_stage.result_detail.stdout
and task_stage.result_detail.stdout is not None

just if task_stage.result_detail.stdout:

just `if task_stage.result_detail.stdout:`
jon-lee marked this conversation as resolved
@ -0,0 +208,4 @@
if (
getattr(task_stage, parser.replace("-", "_"), None) is not None
) and (task_stage.result_status is not None):
dummy_parser_.with_.update(

Create models for these dicts, then update them with the dict from model_dump

Create models for these dicts, then update them with the dict from `model_dump`
Author
Member

@bomingzh I don't think we can change it. This is to make proper alias so that we can get the content of result-status.

@bomingzh I don't think we can change it. This is to make proper alias so that we can get the content of `result-status`.
class DummyConfig(BaseModel):
    score: int
    comment: str

Then dummy_parser_.with_.update(dummy_config(...).model_dump()).

``` class DummyConfig(BaseModel): score: int comment: str ``` Then `dummy_parser_.with_.update(dummy_config(...).model_dump())`.
Author
Member

fixed

fixed
jon-lee marked this conversation as resolved
Author
Member

Is pre-commit on your local dev env installed correctly?

for pycln it has some path issue so I skip it and run pycln . locally to do the test (sometimes I may forgot...)

> Is `pre-commit` on your local dev env installed correctly? for `pycln` it has some path issue so I skip it and run `pycln .` locally to do the test (sometimes I may forgot...)

Is pre-commit on your local dev env installed correctly?

for pycln it has some path issue so I skip it and run pycln . locally to do the test (sometimes I may forgot...)

You can create an issue in pycln repo.

> > Is `pre-commit` on your local dev env installed correctly? > > for `pycln` it has some path issue so I skip it and run `pycln .` locally to do the test (sometimes I may forgot...) You can create an issue in `pycln` repo.
李衍志523370910113 added 1 commit 2025-03-02 10:41:20 +08:00
fix: deadline -> end_time
Some checks failed
build / build (push) Failing after 2m29s
build / build (pull_request) Failing after 2m27s
f676050575
李衍志523370910113 added 1 commit 2025-03-02 10:46:48 +08:00
fix: grading repo name logic
Some checks failed
build / build (pull_request) Failing after 2m23s
build / build (push) Failing after 2m26s
d3f7f55b28
李衍志523370910113 added 1 commit 2025-03-02 10:50:01 +08:00
fix: grading repo name logic
Some checks failed
build / build (pull_request) Failing after 2m21s
build / build (push) Failing after 2m24s
3b5f2071f0
李衍志523370910113 added 1 commit 2025-03-02 10:54:06 +08:00
style: processors/repo
Some checks failed
build / build (pull_request) Failing after 2m23s
build / build (push) Failing after 2m26s
76d7b2e60f
李衍志523370910113 added 1 commit 2025-03-02 10:56:55 +08:00
fix: pass test
All checks were successful
build / build (pull_request) Successful in 2m21s
build / build (push) Successful in 2m24s
a319f59562
李衍志523370910113 added 1 commit 2025-03-02 11:00:45 +08:00
style(processors/task): fix_keyword
All checks were successful
build / build (push) Successful in 2m28s
build / build (pull_request) Successful in 2m26s
5634b3e649
李衍志523370910113 added 1 commit 2025-03-02 11:09:24 +08:00
fix(processors/task): update new conf of keyword
All checks were successful
build / build (pull_request) Successful in 2m27s
build / build (push) Successful in 2m29s
bea202f56e
李衍志523370910113 added 1 commit 2025-03-02 11:14:47 +08:00
perf(processors/task): keyword loop
All checks were successful
build / build (push) Successful in 2m35s
build / build (pull_request) Successful in 2m33s
1ddd56b04f
李衍志523370910113 added 1 commit 2025-03-02 11:18:20 +08:00
style(processors/task): remove redundant code
All checks were successful
build / build (pull_request) Successful in 2m27s
build / build (push) Successful in 2m30s
704c10e917
李衍志523370910113 added 1 commit 2025-03-02 11:24:30 +08:00
fix: remove optional for task.Limit
All checks were successful
build / build (pull_request) Successful in 2m28s
build / build (push) Successful in 2m30s
94dc847a11
李衍志523370910113 added 1 commit 2025-03-02 11:47:35 +08:00
fix: unit of time
All checks were successful
build / build (push) Successful in 2m35s
build / build (pull_request) Successful in 2m33s
45765e29e0
张泊明518370910136 added 1 commit 2025-03-02 15:46:32 +08:00
fix: typo
All checks were successful
build / build (pull_request) Successful in 2m33s
build / build (push) Successful in 2m36s
46cafc0ed6
张泊明518370910136 reviewed 2025-03-02 15:50:26 +08:00
@ -0,0 +5,4 @@
def get_joj1_run_stage(joj1_config: joj1.Config) -> task.Stage:
default_cpu = timeparse("1s")

just use humanfriendly.parse_timespan

just use `humanfriendly.parse_timespan`
Author
Member

seems outdated, mark as resolved.

seems outdated, mark as resolved.
jon-lee marked this conversation as resolved
张泊明518370910136 added 1 commit 2025-03-02 16:38:43 +08:00
feat: time & mem consts and defaults
All checks were successful
build / build (pull_request) Successful in 2m29s
build / build (push) Successful in 2m31s
8164e75058
张泊明518370910136 reviewed 2025-03-02 16:42:30 +08:00
@ -1,40 +1,121 @@
from datetime import datetime

every field in this file should not be optional. we give an default value here if any field does not exist

every field in this file should not be optional. we give an default value here if any field does not exist

and use underscore naming in this file

and use underscore naming in this file
Author
Member

every field in this file should not be optional. we give an default value here if any field does not exist

fixed

> every field in this file should not be optional. we give an default value here if any field does not exist fixed
Author
Member

and use underscore naming in this file

fixed.

> and use underscore naming in this file fixed.
jon-lee marked this conversation as resolved
张泊明518370910136 added 1 commit 2025-03-02 17:01:13 +08:00
feat: support both int & str as limit input
All checks were successful
build / build (pull_request) Successful in 2m19s
build / build (push) Successful in 2m21s
a119adf80f
李衍志523370910113 added 2 commits 2025-03-02 17:06:41 +08:00
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
All checks were successful
build / build (push) Successful in 2m22s
build / build (pull_request) Successful in 2m21s
c23781a185
张泊明518370910136 added 1 commit 2025-03-02 17:14:06 +08:00
test: reasonable limits
All checks were successful
build / build (push) Successful in 2m34s
build / build (pull_request) Successful in 2m32s
6fc162769f
李衍志523370910113 added 1 commit 2025-03-02 17:23:31 +08:00
feat(models/result): init specific parse model
All checks were successful
build / build (pull_request) Successful in 2m28s
build / build (push) Successful in 2m30s
9bd662df8c
李衍志523370910113 added 1 commit 2025-03-02 17:29:44 +08:00
fix(models/result): wrong alias
Some checks failed
build / build (pull_request) Failing after 2m26s
build / build (push) Failing after 2m28s
b8bd3feccb
李衍志523370910113 added 1 commit 2025-03-02 17:38:36 +08:00
fix(processors/task): parser model dump
All checks were successful
build / build (pull_request) Successful in 2m26s
build / build (push) Successful in 2m29s
5c1eede217
李衍志523370910113 added 1 commit 2025-03-02 18:06:31 +08:00
fix: remove Optional and fix its dependent code
All checks were successful
build / build (pull_request) Successful in 2m32s
build / build (push) Successful in 2m35s
82fa325cf6
李衍志523370910113 added 1 commit 2025-03-02 18:10:25 +08:00
fix: typo
All checks were successful
build / build (push) Successful in 2m31s
build / build (pull_request) Successful in 2m30s
26ea5cfd8e
张泊明518370910136 added 1 commit 2025-03-03 02:25:47 +08:00
fix: outdated workflow yaml
All checks were successful
build / build (pull_request) Successful in 2m36s
build / build (push) Successful in 2m38s
6bdd689176
张泊明518370910136 added 1 commit 2025-03-03 03:26:50 +08:00
chore: better defaults and code style
All checks were successful
build / build (push) Successful in 2m33s
build / build (pull_request) Successful in 2m32s
3e252e1ff0
张泊明518370910136 added 1 commit 2025-03-03 03:31:25 +08:00
feat: better release time default
All checks were successful
build / build (pull_request) Successful in 2m25s
build / build (push) Successful in 2m27s
5444debb92
张泊明518370910136 added 1 commit 2025-03-03 03:35:14 +08:00
style: rename
All checks were successful
build / build (push) Successful in 2m29s
build / build (pull_request) Successful in 2m28s
10f2d5c94b
张泊明518370910136 added 1 commit 2025-03-03 03:41:23 +08:00
chore: remove joj1 part
All checks were successful
build / build (pull_request) Successful in 2m33s
build / build (push) Successful in 2m36s
4b3668d772
张泊明518370910136 reviewed 2025-03-03 03:43:53 +08:00
@ -21,0 +34,4 @@
# Construct healthcheck stage
if not repo_conf.force_skip_health_check_on_test or not current_test:
result_conf.stage.stages.append(get_healthcheck_config(repo_conf))
cached: List[str] = []

where is it used?

where is it used?
Author
Member

this should be storing all the files that are about to be copy in or out

this should be storing all the files that are about to be copy in or out
Author
Member

It is as the input and output for the following functions about parsers

It is as the input and output for the following functions about parsers

so this feature is not implemented?

so this feature is not implemented?
Author
Member
    if not repo_conf.force_skip_health_check_on_test or not current_test:
        result_conf.stage.stages.append(get_health_check_config(repo_conf))
    cached: List[str] = []
    # Convert each stage in the task configuration
    for task_stage in task_conf.stages:
        executor_with_config, cached = get_executor_with_config(task_stage, cached)
        conf_stage = get_conf_stage(task_stage, executor_with_config)
        conf_stage = fix_result_detail(task_stage, conf_stage)
        conf_stage = fix_dummy(task_stage, conf_stage)
        conf_stage = fix_keyword(task_stage, conf_stage)
        conf_stage = fix_file(task_stage, conf_stage)
        conf_stage = fix_diff(task_stage, conf_stage, task_conf)
        result_conf.stage.stages.append(conf_stage)

it is

    for task_stage in task_conf.stages:
        executor_with_config, cached = get_executor_with_config(task_stage, cached)

this is a loop, so this cached will be updated in every round of stage

```python if not repo_conf.force_skip_health_check_on_test or not current_test: result_conf.stage.stages.append(get_health_check_config(repo_conf)) cached: List[str] = [] # Convert each stage in the task configuration for task_stage in task_conf.stages: executor_with_config, cached = get_executor_with_config(task_stage, cached) conf_stage = get_conf_stage(task_stage, executor_with_config) conf_stage = fix_result_detail(task_stage, conf_stage) conf_stage = fix_dummy(task_stage, conf_stage) conf_stage = fix_keyword(task_stage, conf_stage) conf_stage = fix_file(task_stage, conf_stage) conf_stage = fix_diff(task_stage, conf_stage, task_conf) result_conf.stage.stages.append(conf_stage) ``` it is ```python for task_stage in task_conf.stages: executor_with_config, cached = get_executor_with_config(task_stage, cached) ``` this is a loop, so this `cached` will be updated in every round of stage

The return value is unnecessary.

The return value is unnecessary.
Author
Member

I have a lazing coding style here, everything has get imported would get exported, so should maintain this until the end of the loop. Everything is exported in previous stage would be imported in the next stage.

I have a lazing coding style here, everything has get imported would get exported, so should maintain this until the end of the loop. Everything is exported in previous stage would be imported in the next stage.
  1. The return value is unnecessary
  2. It should be a set
1. The return value is unnecessary 2. It should be a `set`

try it yourself

try it yourself
Author
Member

I see why

I see why
Author
Member

resolved.

resolved.
jon-lee marked this conversation as resolved
张泊明518370910136 added 1 commit 2025-03-03 04:01:41 +08:00
chore: move path to const
All checks were successful
build / build (pull_request) Successful in 2m35s
build / build (push) Successful in 2m38s
6b5d941eb1
张泊明518370910136 added 1 commit 2025-03-03 04:05:24 +08:00
style: split health check words
Some checks failed
build / build (pull_request) Failing after 2m25s
build / build (push) Failing after 2m27s
8ad4d6f2a0
张泊明518370910136 added 1 commit 2025-03-03 04:09:33 +08:00
chore: rename var
All checks were successful
build / build (push) Successful in 2m18s
build / build (pull_request) Successful in 2m17s
8baca08696
张泊明518370910136 added 1 commit 2025-03-03 04:33:51 +08:00
chore: better code style
All checks were successful
build / build (push) Successful in 2m23s
build / build (pull_request) Successful in 2m21s
0c2baf67bd
张泊明518370910136 reviewed 2025-03-03 11:03:41 +08:00
@ -0,0 +1,232 @@
import re

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
Author
Member

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`.
Author
Member

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.
jon-lee marked this conversation as resolved
李衍志523370910113 added 1 commit 2025-03-03 11:09:18 +08:00
fix(convert): use set instead list for cached
All checks were successful
build / build (push) Successful in 2m31s
build / build (pull_request) Successful in 2m30s
635405ea2b
李衍志523370910113 reviewed 2025-03-03 11:12:45 +08:00
@ -0,0 +13,4 @@
name=task_stage.name,
# group is determined by adding between "[]" in the name of the task
# FIXME: this is probably outdated
group=(
Author
Member

BTW, is this outdated?

BTW, is this outdated?

Never heard about this rule.

Never heard about this rule.
Author
Member

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

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

seems current strategy is fine, resolved.

seems current strategy is fine, resolved.
jon-lee marked this conversation as resolved
张泊明518370910136 reviewed 2025-03-03 11:18:14 +08:00
@ -54,3 +59,3 @@
copy_in_cached: Dict[str, str] = Field({}, serialization_alias="copyInCached")
copy_in_dir: str = Field(".", serialization_alias="copyInDir")
copy_out: List[str] = Field([], serialization_alias="copyOut")
# reconsider this default situation

What is the conclusion?

What is the conclusion?
Author
Member

should be already solved.

should be already solved.
jon-lee marked this conversation as resolved
张泊明518370910136 reviewed 2025-03-03 11:22:55 +08:00
@ -0,0 +73,4 @@
if parser in keyword_parser:
keyword_parser_ = next(p for p in conf_stage.parsers if p.name == parser)
keyword_weight = []
if getattr(task_stage, parser, None) is not None:

do not use getattr, visit the field explictly

do not use `getattr`, visit the field explictly
Author
Member

resolved.

resolved.
jon-lee marked this conversation as resolved
张泊明518370910136 reviewed 2025-03-03 11:25:43 +08:00
@ -0,0 +60,4 @@
cases=[],
)
for file in file_export:
if file not in cached:

not necessary

not necessary
Author
Member

resolved.

resolved.
jon-lee marked this conversation as resolved
张泊明518370910136 reviewed 2025-03-03 11:27:04 +08:00
@ -0,0 +1,232 @@
import re
import shlex

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`.
jon-lee marked this conversation as resolved
张泊明518370910136 added 1 commit 2025-03-03 11:52:00 +08:00
refactor: better code style
All checks were successful
build / build (pull_request) Successful in 2m35s
build / build (push) Successful in 2m38s
c36e710668
张泊明518370910136 reviewed 2025-03-03 11:54:43 +08:00
@ -0,0 +31,4 @@
]
),
)
fix_result_detail(task_stage, conf_stage)

should loop through conf_stage.parsers here and update the with field according to the parser name.

should loop through `conf_stage.parsers` here and update the `with` field according to the parser name.
Author
Member

I think its already implemented in each of the fix_parsers functions

I think its already implemented in each of the `fix_parsers` functions

No, do not find the parser in the fix_xxx function. Instead, iterate through the parsers here and decide how to fill in the with.

No, do not find the parser in the `fix_xxx` function. Instead, iterate through the parsers here and decide how to fill in the `with`.
Author
Member

resolved.

resolved.

Use a dict to store parser name, field, function to process.

    process_dict: Dict[
        str, Tuple[Callable[[result.ParserConfig, BaseModel], None], BaseModel]
    ] = {
        "clangtidy": (fix_keyword, task_stage.clangtidy),
        "keyword": (fix_keyword, task_stage.keyword),
        "diff": (fix_diff, task_stage.diff),
    }
    for i, parser in enumerate(task_stage.parsers):
        if parser in process_dict:
            func, parser_model = process_dict[parser]
            func(conf_stage.parsers[i], parser_model)
Use a dict to store parser name, field, function to process. ``` process_dict: Dict[ str, Tuple[Callable[[result.ParserConfig, BaseModel], None], BaseModel] ] = { "clangtidy": (fix_keyword, task_stage.clangtidy), "keyword": (fix_keyword, task_stage.keyword), "diff": (fix_diff, task_stage.diff), } for i, parser in enumerate(task_stage.parsers): if parser in process_dict: func, parser_model = process_dict[parser] func(conf_stage.parsers[i], parser_model) ```
Author
Member

resolved.

resolved.
jon-lee marked this conversation as resolved
李衍志523370910113 added 2 commits 2025-03-03 12:47:54 +08:00
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
All checks were successful
build / build (push) Successful in 2m33s
build / build (pull_request) Successful in 2m36s
b7b7a93677
李衍志523370910113 added 1 commit 2025-03-03 12:51:29 +08:00
fix: remove unnecessary if
All checks were successful
build / build (pull_request) Successful in 2m27s
build / build (push) Successful in 2m29s
2c4d7cede7
李衍志523370910113 added 1 commit 2025-03-03 13:14:09 +08:00
fix(processors/task): update all with model_dump
All checks were successful
build / build (push) Successful in 2m32s
build / build (pull_request) Successful in 2m34s
45a184521e
李衍志523370910113 added 1 commit 2025-03-03 16:17:34 +08:00
perf(processors/task): remove redundant loop
All checks were successful
build / build (push) Successful in 2m34s
build / build (pull_request) Successful in 2m32s
df76f63a43
李衍志523370910113 added 1 commit 2025-03-03 16:33:26 +08:00
chore: fix comment
All checks were successful
build / build (push) Successful in 2m18s
build / build (pull_request) Successful in 2m22s
9c20c6b377
李衍志523370910113 added 1 commit 2025-03-04 13:34:28 +08:00
fix: use task.config.path
All checks were successful
build / build (push) Successful in 2m32s
build / build (pull_request) Successful in 2m30s
275f9f981c
李衍志523370910113 added 1 commit 2025-03-04 14:46:09 +08:00
refactor: rearrange parser loop in dict
All checks were successful
build / build (pull_request) Successful in 2m30s
build / build (push) Successful in 2m33s
6bfefd4f7b
李衍志523370910113 added 1 commit 2025-03-04 14:52:29 +08:00
feat: result-detail testcase
All checks were successful
build / build (push) Successful in 2m30s
build / build (pull_request) Successful in 2m28s
a0c6bfd63c
张泊明518370910136 requested changes 2025-03-05 04:11:13 +08:00
Dismissed
@ -118,3 +122,3 @@
class StageDetail(BaseModel):
name: str
group: str
group: Optional[str] = ""

Should it be optional?

Should it be optional?
jon-lee marked this conversation as resolved
@ -0,0 +32,4 @@
)
processed_dict = get_processed_dict(task_stage)
for idx, parser in enumerate(task_stage.parsers):
if parser in processed_dict or parser.replace("-", "_") in processed_dict:

Do we need to support both kinds of names?

Do we need to support both kinds of names?
Author
Member

probably yes, since it is easy for new ta to type it wrong

probably yes, since it is easy for new ta to type it wrong

parsers name should be a str enum, force them to use the correct names

parsers name should be a str enum, force them to use the correct names
Author
Member

ok, then removed.

ok, then removed.
jon-lee marked this conversation as resolved
@ -0,0 +91,4 @@
def fix_keyword(
keyword_config: task.ParserKeyword, keyword_parser_: result.ParserConfig

The reason for the suffix in keyword_parser_?

The reason for the suffix in `keyword_parser_`?
Author
Member

just forgot to remove, sorry

just forgot to remove, sorry
jon-lee marked this conversation as resolved
@ -0,0 +137,4 @@
dummy_parser_config: task.ParserDummy, dummy_parser: result.ParserConfig
) -> None:
# we don't use dummy parser in real application
if dummy_parser_config is None:

When will it be None?

When will it be None?
jon-lee marked this conversation as resolved
@ -0,0 +163,4 @@
diff_parser_config: result.ParserConfig,
conf_stage: result.StageDetail,
) -> None:
diff_parser = diff_parser_config

Is it necessary to rename?

Is it necessary to rename?
jon-lee marked this conversation as resolved
@ -0,0 +186,4 @@
stage_cases.append(
result.OptionalCmd(
stdin=result.LocalFile(
src=str(JOJ3_CONFIG_ROOT / task_conf.path.parent / stdin),

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.
Author
Member

resolved.

resolved.
jon-lee marked this conversation as resolved
@ -0,0 +220,4 @@
)
)
if diff_parser:

When will it be None?

When will it be None?
jon-lee marked this conversation as resolved
@ -0,0 +224,4 @@
diff_parser.with_.update(
result.DiffConfig(name="diff", cases=parser_cases).model_dump(by_alias=True)
)
conf_stage.executor.with_.cases = stage_cases

Just pass conf_stage.executor to this function rather then the whole conf_stage.

Just pass `conf_stage.executor` to this function rather then the whole `conf_stage`.
jon-lee marked this conversation as resolved
张泊明518370910136 added 3 commits 2025-03-05 04:25:24 +08:00
test: use tests/convert as root
All checks were successful
build / build (pull_request) Successful in 2m29s
build / build (push) Successful in 2m30s
3b40bee13c
张泊明518370910136 added 1 commit 2025-03-05 04:45:11 +08:00
refactor: move load logic to separate file
All checks were successful
build / build (push) Successful in 2m29s
build / build (pull_request) Successful in 2m27s
f3ed1db5b2
李衍志523370910113 added 1 commit 2025-03-05 08:41:29 +08:00
fix: remove Optional
All checks were successful
build / build (push) Successful in 2m39s
build / build (pull_request) Successful in 2m38s
6cd0cd5509
李衍志523370910113 added 1 commit 2025-03-05 08:49:39 +08:00
style: some rename & more robust code
All checks were successful
build / build (push) Successful in 2m31s
build / build (pull_request) Successful in 2m29s
dfe836109c
李衍志523370910113 added 1 commit 2025-03-05 08:53:42 +08:00
style: more robust code
All checks were successful
build / build (pull_request) Successful in 2m27s
build / build (push) Successful in 2m30s
55da1e8482
李衍志523370910113 added 1 commit 2025-03-05 09:09:38 +08:00
fix: do not allow multiple name
All checks were successful
build / build (pull_request) Successful in 2m34s
build / build (push) Successful in 2m37s
53819e63a2
张泊明518370910136 added 1 commit 2025-03-05 10:03:29 +08:00
style: force parser.with be a BaseModel
All checks were successful
build / build (push) Successful in 2m37s
build / build (pull_request) Successful in 2m35s
25da08ecfc
张泊明518370910136 reviewed 2025-03-05 10:11:45 +08:00
@ -31,0 +64,4 @@
[[stages]]
name = "[cq] Cpplint"
command = "cpplint --linelength=120 --filter=-legal,-readability/casting,-whitespace,-runtime/printf,-runtime/threadsafe_fn,-runtime/int,-readability/todo,-build/include_subdir,-build/header_guard,-build/include_what_you_use --recursive --exclude=build h7/ex2.cpp"
limit.stdout = 65

is it used?

is it used?
Author
Member

testcases in basic is intend to show a comprehensive situation.

testcases in basic is intend to show a comprehensive situation.

if unused, leave a comment

if unused, leave a comment

Then why is there a stdout field in class Limit

Then why is there a `stdout` field in `class Limit`
Author
Member

@bomingzh in toml now should we accept both 32m and 32 or just 32m now?

@bomingzh in toml now should we accept both `32m` and `32` or just `32m` now?
Author
Member

I reckon only 32m would be good

I reckon only `32m` would be good

yes, just str

yes, just str
jon-lee marked this conversation as resolved
张泊明518370910136 reviewed 2025-03-05 10:43:07 +08:00
@ -156,0 +168,4 @@
class DummyConfig(BaseModel):
score: Optional[int] = None

Are these Optional necessary?

Are these `Optional` necessary?
jon-lee marked this conversation as resolved
张泊明518370910136 added 1 commit 2025-03-05 10:54:06 +08:00
test: use load.py for joj1
All checks were successful
build / build (pull_request) Successful in 2m38s
build / build (push) Successful in 2m41s
30fae62b67
李衍志523370910113 added 1 commit 2025-03-05 11:13:25 +08:00
feat: time and memory parse
Some checks failed
build / build (push) Has been cancelled
build / build (pull_request) Failing after 2m24s
deb90a02ca
李衍志523370910113 added 1 commit 2025-03-05 11:15:13 +08:00
fix: pass test
All checks were successful
build / build (pull_request) Successful in 2m30s
build / build (push) Successful in 2m32s
719f19232b
张泊明518370910136 reviewed 2025-03-05 11:40:52 +08:00
@ -156,0 +175,4 @@
)
class DiffOutputConfig(BaseModel):

also these Optional?

also these `Optional`?
Author
Member

I guess some of the field have default within JOJ3, so I choose optional just to reduce the length of json previously

I guess some of the field have default within JOJ3, so I choose optional just to reduce the length of json previously

better put all defaults here then we only need to check the code here

better put all defaults here then we only need to check the code here
Author
Member

indeed.

indeed.
jon-lee marked this conversation as resolved
李衍志523370910113 reviewed 2025-03-05 11:43:07 +08:00
@ -29,0 +84,4 @@
in_: str = Field("", alias="in")
out_: str = Field("", alias="out")
score: int = 0
parsers: List[str] = [] # list of parsers
Author
Member

this should be the StrEnum

this should be the `StrEnum`

yes

yes
Author
Member

It is supported now.

It is supported now.
jon-lee marked this conversation as resolved
张泊明518370910136 added 1 commit 2025-03-05 11:46:10 +08:00
feat: only support str limit in toml
Some checks failed
build / build (push) Failing after 2m35s
build / build (pull_request) Failing after 2m33s
d6a33d2f20
李衍志523370910113 added 1 commit 2025-03-05 13:03:20 +08:00
fix: num -> string in toml
Some checks failed
build / build (push) Has been cancelled
build / build (pull_request) Successful in 2m29s
924325b933
李衍志523370910113 added 1 commit 2025-03-05 13:03:55 +08:00
feat: implement StrEnum for parser
Some checks failed
build / build (push) Failing after 2m19s
build / build (pull_request) Failing after 2m18s
345f6daa32
李衍志523370910113 added 1 commit 2025-03-05 13:08:38 +08:00
fix(models/result): remove Optionals for ParserConfigs
Some checks failed
build / build (pull_request) Failing after 2m24s
build / build (push) Failing after 2m26s
3a75169e8c
Author
Member

@bomingzh

joj3_config_generator/models/task.py:2: error: Module "enum" has no attribute "StrEnum"  [attr-defined]

we probably need to update some dependencies, everything works fine on my local sides, seems StrEnum are supported from python3.11

@bomingzh ```shell joj3_config_generator/models/task.py:2: error: Module "enum" has no attribute "StrEnum" [attr-defined] ``` we probably need to update some dependencies, everything works fine on my local sides, seems `StrEnum` are supported from `python3.11`
李衍志523370910113 added 1 commit 2025-03-05 13:29:12 +08:00
feat: change python version to 3.11
All checks were successful
build / build (pull_request) Successful in 2m45s
build / build (push) Successful in 2m47s
d1a9530758
李衍志523370910113 added 1 commit 2025-03-05 13:32:42 +08:00
fix: update rtoml version
Some checks failed
build / build (push) Failing after 2m12s
build / build (pull_request) Failing after 2m26s
e4027ad908

No, just inherit from (str, Enum).

No, just inherit from `(str, Enum)`.
Author
Member

OK

OK
李衍志523370910113 added 1 commit 2025-03-05 13:37:20 +08:00
fix: use (str, Enum)
All checks were successful
build / build (pull_request) Successful in 2m27s
build / build (push) Successful in 2m29s
63f154c540
张泊明518370910136 reviewed 2025-03-05 15:06:45 +08:00
@ -0,0 +3,4 @@
import humanfriendly
# FIXME: we don't need to compact for int

what compact?

what compact?
Author
Member

no int input, should be done already, so it can be removed. I added that several commit before before you removed that 😇

no int input, should be done already, so it can be removed. I added that several commit before before you removed that 😇
jon-lee marked this conversation as resolved
张泊明518370910136 added 1 commit 2025-03-05 15:13:34 +08:00
fix: python3.9 Union
Some checks failed
build / build (push) Has been cancelled
build / build (pull_request) Successful in 2m28s
c1c8e6ff3d
张泊明518370910136 added 1 commit 2025-03-05 15:14:23 +08:00
fix: python3.9 typing
Some checks failed
build / build (push) Failing after 2m26s
build / build (pull_request) Failing after 2m24s
76b2a3c104
李衍志523370910113 added 1 commit 2025-03-05 15:21:39 +08:00
chore: remove outdated FIXME
Some checks failed
build / build (pull_request) Failing after 2m20s
build / build (push) Failing after 2m23s
38f0bc8598
张泊明518370910136 reviewed 2025-03-05 15:22:11 +08:00
@ -0,0 +55,4 @@
+ f"{repo_conf.groups.time_period_hour[i]},"
)
# default value hardcoded
group_config = group_config + "=100:24"

do we need that default?

do we need that default?
Author
Member

what is the situation internally in JOJ3? I just added that blindly when I reached that stage. Overall I think 100 times per day should be a reasonable and safe default? considering that there may be group works and due date

what is the situation internally in JOJ3? I just added that blindly when I reached that stage. Overall I think 100 times per day should be a reasonable and safe default? considering that there may be group works and due date

They can manually add it if needed. Or just move it to the model default.

They can manually add it if needed. Or just move it to the model default.
Author
Member

removed.

removed.
jon-lee marked this conversation as resolved
张泊明518370910136 reviewed 2025-03-05 15:23:44 +08:00
@ -0,0 +6,4 @@
from joj3_config_generator.models import result, task
from joj3_config_generator.models.common import Memory, Time
from joj3_config_generator.models.const import JOJ3_CONFIG_ROOT
from joj3_config_generator.models.task import Parser as parser_enum

ParserEnum

`ParserEnum`
jon-lee marked this conversation as resolved
张泊明518370910136 added 1 commit 2025-03-05 15:26:32 +08:00
refactor: clear health check args generation
Some checks failed
build / build (push) Has been cancelled
build / build (pull_request) Failing after 2m16s
855b35592f
张泊明518370910136 added 1 commit 2025-03-05 15:28:17 +08:00
chore: lint error
All checks were successful
build / build (pull_request) Successful in 2m32s
build / build (push) Successful in 2m34s
01949f136a
张泊明518370910136 added 1 commit 2025-03-05 15:33:20 +08:00
perf: better keyword time complexity
All checks were successful
build / build (push) Successful in 2m27s
build / build (pull_request) Successful in 2m26s
a5680bb3bc
李衍志523370910113 added 1 commit 2025-03-05 15:42:58 +08:00
chore: rename parser_enum->ParserEnum
All checks were successful
build / build (pull_request) Successful in 2m36s
build / build (push) Successful in 2m38s
34ce4b0e13
张泊明518370910136 added 1 commit 2025-03-05 15:48:15 +08:00
refactor: sanity check & minor optimization
Some checks failed
build / build (push) Has been cancelled
build / build (pull_request) Successful in 2m30s
3751eb84a6
张泊明518370910136 reviewed 2025-03-05 15:49:07 +08:00
@ -156,0 +210,4 @@
outputs: List[DiffOutputConfig] = []
# to get minimum flexibility, may refine in future

what needs to be refined?

what needs to be refined?
Author
Member

just feels bit waste since this outputs only have one field before I coded the logic, I wrote that comment without checking the details of diff parser. But it should be the best strategy to show the structures as well as give flexiblity for extension now.

just feels bit waste since this outputs only have one field before I coded the logic, I wrote that comment without checking the details of diff parser. But it should be the best strategy to show the structures as well as give flexiblity for extension now.
jon-lee marked this conversation as resolved
李衍志523370910113 added 1 commit 2025-03-05 15:50:34 +08:00
fix: remove defualt num for groups
All checks were successful
build / build (pull_request) Successful in 2m32s
build / build (push) Successful in 2m34s
6ee7068bfa
张泊明518370910136 reviewed 2025-03-05 15:51:09 +08:00
@ -0,0 +190,4 @@
# Ensure case_stage.diff and case_stage.diff.output are defined
diff_output = (
case_stage.diff.output
if case_stage.diff and case_stage.diff.output

will it be None now?

will it be None now?
Author
Member

nope 😂 bad coding strategy before

nope 😂 bad coding strategy before
jon-lee marked this conversation as resolved
李衍志523370910113 added 1 commit 2025-03-05 15:53:51 +08:00
chore: remove redundant comment
All checks were successful
build / build (pull_request) Successful in 2m31s
build / build (push) Successful in 2m33s
9f4eda337b
李衍志523370910113 added 1 commit 2025-03-05 15:57:12 +08:00
chore: remove unnecesarry None check
All checks were successful
build / build (push) Successful in 2m32s
build / build (pull_request) Successful in 2m30s
85e358d3b7
张泊明518370910136 added 1 commit 2025-03-05 16:05:11 +08:00
style: rename
All checks were successful
build / build (push) Successful in 2m36s
build / build (pull_request) Successful in 2m34s
c06a2d7464
张泊明518370910136 reviewed 2025-03-05 16:06:18 +08:00
@ -0,0 +76,4 @@
copy_in={
file: result.LocalFile(src=str(JOJ3_CONFIG_ROOT / file))
# all copyin files store in this tools folder
# are there any corner cases

is there a conclusion now? or it should have a prefix TODO: ?

is there a conclusion now? or it should have a prefix `TODO: `?
Author
Member

so far works fine on 280 sides, indicating that pbs in 151 can be resolved with proper guidelines I think.

so far works fine on 280 sides, indicating that pbs in 151 can be resolved with proper guidelines I think.

ok, then add that prefix

ok, then add that prefix
jon-lee marked this conversation as resolved
李衍志523370910113 added 1 commit 2025-03-05 16:14:45 +08:00
style: schedule TODO for file management
All checks were successful
build / build (pull_request) Successful in 2m31s
build / build (push) Successful in 2m34s
5a6cfd1475
张泊明518370910136 changed title from WIP: dev to dev 2025-03-05 16:16:13 +08:00
张泊明518370910136 approved these changes 2025-03-05 16:20:21 +08:00
李衍志523370910113 merged commit 9213e57ca3 into master 2025-03-05 16:20:39 +08:00
李衍志523370910113 referenced this issue from a commit 2025-03-05 16:20:41 +08:00
张泊明518370910136 deleted branch dev 2025-03-05 16:26:21 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: JOJ/JOJ3-config-generator#10
No description provided.