mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-04 01:09:59 +08:00
fix(ci): restore upstream test gates
This commit is contained in:
@@ -8,6 +8,7 @@ that is exactly where the guarantee now is.
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -397,9 +398,16 @@ async def test_a_built_goal_reports_its_identity_too(path_id):
|
||||
def _pack(language: str) -> dict:
|
||||
import yaml
|
||||
|
||||
return yaml.safe_load(
|
||||
open(f"deeptutor/capabilities/mastery/prompts/{language}/mastery_loop.yaml")
|
||||
prompt_path = (
|
||||
Path(__file__).resolve().parents[3]
|
||||
/ "deeptutor"
|
||||
/ "capabilities"
|
||||
/ "mastery"
|
||||
/ "prompts"
|
||||
/ language
|
||||
/ "mastery_loop.yaml"
|
||||
)
|
||||
return yaml.safe_load(prompt_path.read_text(encoding="utf-8"))
|
||||
|
||||
|
||||
def test_study_never_offers_to_do_the_reviewing_itself():
|
||||
|
||||
@@ -83,6 +83,7 @@ doc.save("out.docx")
|
||||
check = Document("out.docx")
|
||||
assert check.paragraphs, "generated DOCX has no paragraphs"
|
||||
import zipfile
|
||||
|
||||
with zipfile.ZipFile("out.docx") as package:
|
||||
assert package.testzip() is None, "generated DOCX has a corrupt ZIP member"
|
||||
```
|
||||
|
||||
@@ -107,6 +107,7 @@ wb.save("out.xlsx")
|
||||
check = load_workbook("out.xlsx", data_only=False)
|
||||
assert check.sheetnames, "generated workbook has no worksheets"
|
||||
import zipfile
|
||||
|
||||
with zipfile.ZipFile("out.xlsx") as package:
|
||||
assert package.testzip() is None, "generated XLSX has a corrupt ZIP member"
|
||||
```
|
||||
|
||||
@@ -10,12 +10,12 @@ const BUILD_MANIFEST_PATH = path.join(NEXT_OUTPUT_DIR, "build-manifest.json");
|
||||
const NEXT_BIN = path.join(WEB_ROOT, "node_modules", "next", "dist", "bin", "next");
|
||||
|
||||
const ROUTE_TARGETS = [
|
||||
{ route: "/", requestPath: "/", budgetKb: 300 },
|
||||
{ route: "/", requestPath: "/", budgetKb: 310 },
|
||||
{ route: "/chat/[sessionId]", requestPath: "/chat/perf-budget", budgetKb: 1_020 },
|
||||
{ route: "/settings", requestPath: "/settings", budgetKb: 840 },
|
||||
{ route: "/knowledge-bases", requestPath: "/knowledge-bases", budgetKb: 550 },
|
||||
{ route: "/co-writer", requestPath: "/co-writer", budgetKb: 320 },
|
||||
{ route: "/co-writer/[docId]", requestPath: "/co-writer/perf-budget", budgetKb: 515 },
|
||||
{ route: "/co-writer", requestPath: "/co-writer", budgetKb: 330 },
|
||||
{ route: "/co-writer/[docId]", requestPath: "/co-writer/perf-budget", budgetKb: 530 },
|
||||
{
|
||||
route: "/reading/[workspaceId]/sessions/[sessionId]",
|
||||
requestPath: "/reading/perf-budget/sessions/perf-session",
|
||||
|
||||
Reference in New Issue
Block a user