feat: 本地 uv 与托管 Python 环境管理

- 新增 uv 管理:只认程序目录副本或指定路径,支持从科大镜像下载并按 sha256 校验

- uv 环境变量(UV_*)可配置,默认相对程序目录(python / uv-cache),同时注入 uv 调用与任务进程

- 新增托管虚拟环境与 Python 版本管理:用 uv 下载解释器、预创建环境、查看已装包

- 新建任务保存时自动创建 .venv,运行期只校验、不再自动装依赖;镜像只在装包时使用

- 前端改为顶部品牌栏 + 三栏工作台,uv / 镜像源 / 虚拟环境各自独立弹窗

- 发布包构建后去掉工作区继承的低完整性标签

- 修复调度集成测试并发时误取 skipped 运行的问题
This commit is contained in:
2026-11-07 16:57:27 +08:00
parent 2aa2a1ac18
commit 1914d38451
36 changed files with 5168 additions and 508 deletions
+4 -5
View File
@@ -225,17 +225,16 @@ async fn venv_probe_reports_project_dependency_files() {
}
#[tokio::test]
async fn venv_create_rejects_project_without_dependency_files() {
async fn venv_create_rejects_missing_working_directory() {
let (app, temp_dir) = test_app().await;
let token = fetch_token(&app).await;
let project = temp_dir.path().join("empty-project");
fs::create_dir_all(&project).expect("project directory should be created");
let absent = temp_dir.path().join("absent-project");
let (status, body) = post_create(
&app,
Some(&token),
json!({
"working_dir": project.to_str().expect("project path should be UTF-8")
"working_dir": absent.to_str().expect("absent path should be UTF-8")
}),
)
.await;
@@ -246,7 +245,7 @@ async fn venv_create_rejects_project_without_dependency_files() {
body["message"]
.as_str()
.expect("message should be a string")
.contains("pyproject.toml")
.contains("工作目录")
);
}