dev #10

Merged
李衍志523370910113 merged 238 commits from dev into master 2025-03-05 16:20:39 +08:00
2 changed files with 10 additions and 15 deletions
Showing only changes of commit 5444debb92 - Show all commits

View File

@ -1,5 +1,4 @@
import os
from datetime import datetime
from pathlib import Path
from typing import List
@ -26,16 +25,8 @@ def convert(repo_conf: repo.Config, task_conf: task.Config) -> result.Config:
name=task_conf.task.name,
# exact folder difference specified by type
log_path=f"/home/tt/.cache/joj3/{task_conf.task.type_}.log",
expire_unix_timestamp=(
int(task_conf.release.end_time.timestamp())
if task_conf.release.end_time
else -1
),
effective_unix_timestamp=(
int(task_conf.release.begin_time.timestamp())
if task_conf.release.begin_time
else -1
),
expire_unix_timestamp=int(task_conf.release.end_time.timestamp()),
effective_unix_timestamp=int(task_conf.release.begin_time.timestamp()),
actor_csv_path="/home/tt/.config/joj/students.csv", # students.csv position
max_total_score=repo_conf.max_total_score,
stage=result.Stage(
jon-lee marked this conversation as resolved Outdated

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.

fixed

fixed
@ -74,6 +65,6 @@ def convert_joj1(joj1_conf: joj1.Config) -> task.Config:
task=task.Task(
name=(""),
),
release=task.Release(end_time=datetime.now(), begin_time=datetime.now()),
release=task.Release(),
stages=stages,
)

View File

@ -1,4 +1,4 @@
from datetime import datetime
from datetime import datetime, timedelta
jon-lee marked this conversation as resolved Outdated

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

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

and use underscore naming in this file

fixed.

> and use underscore naming in this file fixed.
from pathlib import Path
from typing import Any, Dict, List, Type
@ -113,8 +113,12 @@ class Stage(BaseModel):
class Release(BaseModel):
end_time: datetime = datetime.now() # RFC 3339 formatted date-time with offset
begin_time: datetime = datetime.now() # RFC 3339 formatted date-time with offset
end_time: datetime = datetime.now() + timedelta(
days=365
) # RFC 3339 formatted date-time with offset
begin_time: datetime = datetime.fromtimestamp(
0
) # RFC 3339 formatted date-time with offset
class Task(BaseModel):