Skip to content

Commit 00e16ff

Browse files
committed
Simplify PsyFlow website structure
1 parent 500f91d commit 00e16ff

21 files changed

Lines changed: 529 additions & 1179 deletions

File tree

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# QA、Validation 与 Simulation
2+
3+
PsyFlow 现在不再把 “能跑一次” 当成发布标准。当前维护中的流程把 QA、simulation 和 validation 看成三种互补的检查。
4+
5+
- `psyflow-qa`:做一次真实的 smoke run,并生成可审查的产物
6+
- `psyflow-sim`:用 responder 做可重复的行为仿真
7+
- `psyflow-validate`:不启动任务,也能检查任务包结构、合同、配置和说明文件
8+
9+
## QA
10+
11+
先用 QA 跑一遍任务:
12+
13+
```bash
14+
psyflow-qa path/to/task --config config/config_qa.yaml
15+
```
16+
17+
默认会在 `outputs/qa/` 下面留下结构化产物,例如:
18+
19+
- `qa_report.json`
20+
- `static_report.json`
21+
- `contract_report.json`
22+
- `qa_trace.csv`
23+
- `qa_events.jsonl`
24+
25+
这些文件不是临时调试垃圾,而是任务评审和发布前检查的一部分。
26+
27+
## Validation
28+
29+
如果你只想先检查任务包,不想真正启动 PsychoPy,可以直接运行:
30+
31+
```bash
32+
psyflow-validate path/to/task
33+
```
34+
35+
当前 validator 会覆盖:
36+
37+
- 配置文件和 profile 结构
38+
- contract manifest
39+
- reference artifacts
40+
- README 结构
41+
- 面向被试文本的运行时策略
42+
43+
最后这一点很重要。PsyFlow 现在会更主动地阻止把被试可见文本硬编码进运行时代码。
44+
45+
## Simulation
46+
47+
如果你需要无被试的重复性测试,可以用 simulation:
48+
49+
```bash
50+
psyflow-sim path/to/task --config config/config_scripted_sim.yaml
51+
```
52+
53+
如果任务需要自己的 responder:
54+
55+
```bash
56+
psyflow-sim path/to/task --config config/config_sampler_sim.yaml
57+
```
58+
59+
## 推荐顺序
60+
61+
一个准备发布的任务,推荐至少走一遍下面这组命令:
62+
63+
```bash
64+
psyflow-run .
65+
psyflow-qa . --config config/config_qa.yaml
66+
psyflow-sim . --config config/config_scripted_sim.yaml
67+
psyflow-validate .
68+
```
69+
70+
这样你可以分别得到:
71+
72+
- 人工快速检查
73+
- QA 产物
74+
- responder 驱动的覆盖测试
75+
- 静态结构与 contract 检查
76+
77+
## 下一步
78+
79+
-[Trigger 教程](/zh/tutorials/trigger-io/)
80+
-[命令行与运行模式](/zh/tutorials/cli-and-runtime/)
81+
- 回到 [中文教程首页](/zh/tutorials/)

website/next.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/** @type {import('next').NextConfig} */
2-
const isPages = process.env.GITHUB_ACTIONS === "true";
3-
const basePath = isPages ? "/psyflow" : "";
2+
const basePath = "/psyflow";
43

54
const nextConfig = {
65
output: "export",
@@ -9,7 +8,7 @@ const nextConfig = {
98
unoptimized: true
109
},
1110
basePath,
12-
assetPrefix: basePath ? `${basePath}/` : "",
11+
assetPrefix: `${basePath}/`,
1312
env: {
1413
NEXT_PUBLIC_BASE_PATH: basePath
1514
}

website/src/app/api/page.tsx

Lines changed: 0 additions & 74 deletions
This file was deleted.

website/src/app/changelog/page.tsx

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,51 @@ import { changelog, siteData } from "@/lib/generated";
22

33
export default function ChangelogPage() {
44
return (
5-
<div className="space-y-16 pb-8">
6-
<section className="grid gap-10 lg:grid-cols-[minmax(0,1fr)_420px] lg:items-center">
5+
<div className="space-y-12 pb-8">
6+
<section className="grid gap-8 lg:grid-cols-[minmax(0,1fr)_320px] lg:items-end">
77
<div>
8-
<div className="pf-badge mx-auto w-fit">Changelog</div>
9-
<h1 className="mt-6 max-w-3xl font-heading text-5xl font-bold leading-[0.94] text-[#25314d] sm:text-6xl">
10-
Read the
11-
<br />
12-
<span className="text-[#39d95d]">Meaningful Changes,</span>
13-
<br />
14-
Not Just a Version Number.
8+
<div className="pf-badge">Changelog</div>
9+
<h1 className="mt-5 max-w-4xl font-heading text-5xl font-bold leading-[0.94] text-[#25314d] sm:text-6xl">
10+
Read releases as one clear update at a time.
1511
</h1>
16-
<p className="mt-6 max-w-3xl text-base leading-8 text-slate-700">
17-
The published package version in pyproject is behind the current repository history. This
18-
site follows the changelog and current main branch behavior instead of treating one stale
19-
package number as the whole story.
12+
<p className="mt-5 max-w-3xl text-base leading-8 text-slate-700">
13+
This page follows the current repository history instead of over-indexing on one stale package
14+
version. Each release is shown as one readable block.
2015
</p>
2116
</div>
2217

23-
<div className="pf-frame bg-[#fffdf9] p-6">
24-
<div className="space-y-4 text-sm leading-7 text-slate-700">
25-
<div className="rounded-[18px] border-2 border-[#25314d] bg-[#eef8ff] px-4 py-4 shadow-[0_4px_0_#25314d]">
26-
pyproject version: {siteData.project.version ?? "unknown"}
18+
<div className="pf-frame bg-[#fffdf9] p-5">
19+
<div className="space-y-3 text-sm leading-7 text-slate-700">
20+
<div className="rounded-[18px] border-2 border-[#25314d] bg-[#eef8ff] px-4 py-3 shadow-[0_4px_0_#25314d]">
21+
Latest changelog release: {siteData.latest_release?.version ?? "unknown"}
2722
</div>
28-
<div className="rounded-[18px] border-2 border-[#25314d] bg-[#fff3ed] px-4 py-4 shadow-[0_4px_0_#25314d]">
29-
latest changelog version: {siteData.latest_release?.version ?? "unknown"}
23+
<div className="rounded-[18px] border-2 border-[#25314d] bg-[#fff3ed] px-4 py-3 shadow-[0_4px_0_#25314d]">
24+
Package metadata version: {siteData.project.version ?? "unknown"}
3025
</div>
3126
</div>
3227
</div>
3328
</section>
3429

35-
<section className="space-y-6">
30+
<section className="space-y-5">
3631
{changelog.map((release) => (
37-
<div key={release.version} className="pf-frame bg-[#fffdf9] p-6">
38-
<div className="flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between">
32+
<article key={release.version} className="pf-frame bg-[#fffdf9] p-6 sm:p-7">
33+
<div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
3934
<div>
40-
<div className="rounded-full bg-[#d9edf6] px-3 py-1 text-xs font-bold text-[#25314d]">
41-
Version {release.version}
42-
</div>
35+
<div className="pf-section-chip bg-[#ddd7f4]">Version {release.version}</div>
4336
<h2 className="mt-4 font-heading text-3xl font-bold text-[#25314d]">{release.date}</h2>
4437
</div>
4538
</div>
46-
<div className="mt-6 grid gap-4 md:grid-cols-2">
39+
<ul className="mt-6 space-y-3 text-sm leading-7 text-slate-700">
4740
{release.summary.map((item) => (
48-
<div
41+
<li
4942
key={`${release.version}:${item}`}
50-
className="rounded-[18px] border-2 border-[#25314d] bg-white px-4 py-4 text-sm leading-6 text-slate-700 shadow-[0_4px_0_#25314d]"
43+
className="rounded-[18px] border-2 border-[#25314d] bg-white px-4 py-3 shadow-[0_4px_0_#25314d]"
5144
>
5245
{item}
53-
</div>
46+
</li>
5447
))}
55-
</div>
56-
</div>
48+
</ul>
49+
</article>
5750
))}
5851
</section>
5952
</div>

0 commit comments

Comments
 (0)