dev #10
|
@ -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
|
||||
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from datetime import datetime
|
||||
from datetime import datetime, timedelta
|
||||
jon-lee marked this conversation as resolved
Outdated
张泊明518370910136
commented
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
张泊明518370910136
commented
and use underscore naming in this file and use underscore naming in this file
李衍志523370910113
commented
fixed > every field in this file should not be optional. we give an default value here if any field does not exist
fixed
李衍志523370910113
commented
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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user
Make this
Path.home()
default to/home/tt
. For now, create a const for this dir.fixed