Compare commits

..

No commits in common. "875089cabd423027ea0bbcda1007e085371d92b9" and "fd7d09e7b2fd28eaa895dc712d57203ffafa926e" have entirely different histories.

12 changed files with 4 additions and 23 deletions

View File

@ -23,9 +23,9 @@ jobs:
- name: PDM install dependencies
run: |
pdm install
- name: All
- name: Lint
run: |
pdm run all
pdm run lint
- name: Run
run: |
pdm run app --help

View File

@ -70,10 +70,6 @@ class Config(BaseModel):
0, validation_alias=AliasChoices("health-check-score", "health_check_score")
)
issue: Issue = Issue()
immutable_path: Path = Field(
Path("immutable_files"),
validation_alias=AliasChoices("immutable-path", "immutable_path"),
)
@model_validator(mode="after")
def set_grading_repo_name_from_cwd(self) -> "Config":

View File

@ -99,19 +99,6 @@ def get_check_lists(repo_conf: repo.Config) -> Tuple[List[str], List[str]]:
immutable_files.append(file_path)
file_sums.append(calc_sha256sum(file_path))
file_names.append(file)
immutable_dir = (repo_conf.root / repo_conf.path).parent / repo_conf.immutable_path
if not immutable_dir.exists():
return file_sums, file_names
file_sums = []
file_names = []
for file_path in immutable_dir.glob("**/*"):
if file_path.is_dir():
continue
if not file_path.exists():
logger.warning(f"Immutable file not found: {file_path}")
continue
file_sums.append(calc_sha256sum(file_path))
file_names.append(file_path.relative_to(immutable_dir).as_posix())
return file_sums, file_names

View File

@ -5,8 +5,6 @@ sandbox-token = "test"
max-total-score = 1000
max-size = 50.5
immutable_path = "immutable"
# for tests
[groups]
name = ["joj", "run"]

View File

@ -64,8 +64,8 @@
"-repoSize=50.5",
"-meta=README.md",
"-meta=Changelog.md",
"-checkFileSumList=b1bbad25b830db0a77b15a033f9ca1b7ab44c1d2d05056412bd3e4421645f0bf,a5b63323a692d3d8b952442969649b4f823d58dae26429494f613df160710dfc,2ba059f3977e2e3dee6cacbfbf0ba2578baa1b8e04b4977aec400868b6e49856,3db23f7fb2ca9814617e767ddc41b77073180b3b0b73e87b5f2a6d3129f88f3a",
"-checkFileNameList=.gitattributes,.gitignore,.gitea/workflows/push.yaml,.gitea/workflows/release.yaml"
"-checkFileSumList=a5b63323a692d3d8b952442969649b4f823d58dae26429494f613df160710dfc,b1bbad25b830db0a77b15a033f9ca1b7ab44c1d2d05056412bd3e4421645f0bf,2ba059f3977e2e3dee6cacbfbf0ba2578baa1b8e04b4977aec400868b6e49856,3db23f7fb2ca9814617e767ddc41b77073180b3b0b73e87b5f2a6d3129f88f3a",
"-checkFileNameList=.gitignore,.gitattributes,.gitea/workflows/push.yaml,.gitea/workflows/release.yaml"
]
},
{