fix: gradingreponame schema
This commit is contained in:
parent
1ada796954
commit
17697d7e35
|
@ -1,5 +1,5 @@
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import socket
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
@ -24,13 +24,8 @@ def get_temp_directory() -> str:
|
||||||
|
|
||||||
|
|
||||||
def getGradingRepoName() -> str:
|
def getGradingRepoName() -> str:
|
||||||
path = os.path.expanduser("~/.config/teapot/teapot.env")
|
host_name = socket.gethostname()
|
||||||
if os.path.exists(path):
|
return f"{host_name.split('-')[0]}-joj"
|
||||||
load_dotenv(path)
|
|
||||||
repo_name = os.environ.get("GITEA_ORG_NAME")
|
|
||||||
if repo_name is not None:
|
|
||||||
return f"{repo_name.split('-')[0]}-joj"
|
|
||||||
return "ece482-joj"
|
|
||||||
|
|
||||||
|
|
||||||
def getTeapotConfig(repo_conf: Repo, task_conf: Task) -> TeapotConfig:
|
def getTeapotConfig(repo_conf: Repo, task_conf: Task) -> TeapotConfig:
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
"/<function",
|
"/<function",
|
||||||
"get_temp_directory",
|
"get_temp_directory",
|
||||||
"at",
|
"at",
|
||||||
"0x7fc2485231a0>/repo-health-checker",
|
"0x7fc3921ab1a0>/repo-health-checker",
|
||||||
"-root=.",
|
"-root=.",
|
||||||
"-repoSize=50.5",
|
"-repoSize=50.5",
|
||||||
"-meta=main.py",
|
"-meta=main.py",
|
||||||
|
@ -71,8 +71,8 @@
|
||||||
"cpuRateLimit": 0,
|
"cpuRateLimit": 0,
|
||||||
"cpuSetLimit": "",
|
"cpuSetLimit": "",
|
||||||
"copyIn": {
|
"copyIn": {
|
||||||
"//tmp/repo-checker-5xkj4dm4/repo-health-checker": {
|
"//tmp/repo-checker-u3awlhwg/repo-health-checker": {
|
||||||
"src": "//tmp/repo-checker-k3fmck15/repo-health-checker",
|
"src": "//tmp/repo-checker-mc0n0t1l/repo-health-checker",
|
||||||
"content": null,
|
"content": null,
|
||||||
"fileId": null,
|
"fileId": null,
|
||||||
"name": null,
|
"name": null,
|
||||||
|
@ -1320,7 +1320,7 @@
|
||||||
"logPath": "h4-ex1-joint-teapot-debug.log",
|
"logPath": "h4-ex1-joint-teapot-debug.log",
|
||||||
"scoreboardPath": "h4-ex1-scoreboard.csv",
|
"scoreboardPath": "h4-ex1-scoreboard.csv",
|
||||||
"failedTablePath": "h4-ex1-failed-table.md",
|
"failedTablePath": "h4-ex1-failed-table.md",
|
||||||
"gradingRepoName": "engr151-joj",
|
"gradingRepoName": "Nuvole-joj",
|
||||||
"skipIssue": false,
|
"skipIssue": false,
|
||||||
"skipScoreboard": false,
|
"skipScoreboard": false,
|
||||||
"skipFailedTable": false
|
"skipFailedTable": false
|
||||||
|
|
Loading…
Reference in New Issue
Block a user