paperlint 10.4.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/deadlines.yml +27 -7
- package/README.md +16 -15
- package/dist/CLAUDE.md.spec.d.ts.map +1 -1
- package/dist/CLAUDE.md.spec.js +6 -3
- package/dist/CLAUDE.md.spec.js.map +1 -1
- package/dist/adapters/hotcrp/index.d.ts +6 -4
- package/dist/adapters/hotcrp/index.d.ts.map +1 -1
- package/dist/adapters/hotcrp/index.js +6 -4
- package/dist/adapters/hotcrp/index.js.map +1 -1
- package/dist/adapters/hotcrp/portal.io.d.ts +3 -1
- package/dist/adapters/hotcrp/portal.io.d.ts.map +1 -1
- package/dist/adapters/hotcrp/portal.io.js +36 -11
- package/dist/adapters/hotcrp/portal.io.js.map +1 -1
- package/dist/adapters/hotcrp/response.d.ts +6 -1
- package/dist/adapters/hotcrp/response.d.ts.map +1 -1
- package/dist/adapters/hotcrp/response.js +17 -0
- package/dist/adapters/hotcrp/response.js.map +1 -1
- package/dist/adapters/hotcrp/site.d.ts +9 -0
- package/dist/adapters/hotcrp/site.d.ts.map +1 -0
- package/dist/adapters/hotcrp/site.js +22 -0
- package/dist/adapters/hotcrp/site.js.map +1 -0
- package/dist/adapters/hotcrp/token.d.ts +13 -0
- package/dist/adapters/hotcrp/token.d.ts.map +1 -0
- package/dist/adapters/hotcrp/token.js +48 -0
- package/dist/adapters/hotcrp/token.js.map +1 -0
- package/dist/adapters/latex/abstract.d.ts +22 -0
- package/dist/adapters/latex/abstract.d.ts.map +1 -0
- package/dist/adapters/latex/abstract.js +187 -0
- package/dist/adapters/latex/abstract.js.map +1 -0
- package/dist/adapters/latex/captions.d.ts +9 -0
- package/dist/adapters/latex/captions.d.ts.map +1 -0
- package/dist/adapters/latex/captions.js +40 -0
- package/dist/adapters/latex/captions.js.map +1 -0
- package/dist/adapters/latex/headings.d.ts +6 -0
- package/dist/adapters/latex/headings.d.ts.map +1 -1
- package/dist/adapters/latex/headings.js +5 -4
- package/dist/adapters/latex/headings.js.map +1 -1
- package/dist/adapters/latex/index.d.ts +1 -0
- package/dist/adapters/latex/index.d.ts.map +1 -1
- package/dist/adapters/latex/index.js +3 -0
- package/dist/adapters/latex/index.js.map +1 -1
- package/dist/adapters/latex/parse.d.ts +15 -0
- package/dist/adapters/latex/parse.d.ts.map +1 -1
- package/dist/adapters/latex/parse.js +64 -1
- package/dist/adapters/latex/parse.js.map +1 -1
- package/dist/adapters/node/list-entries.io.d.ts.map +1 -1
- package/dist/adapters/node/list-entries.io.js +3 -1
- package/dist/adapters/node/list-entries.io.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +20 -8
- package/dist/cli.js.map +1 -1
- package/dist/cycle-rules.d.ts.map +1 -1
- package/dist/cycle-rules.js +3 -4
- package/dist/cycle-rules.js.map +1 -1
- package/dist/domain/deadline.d.ts +8 -1
- package/dist/domain/deadline.d.ts.map +1 -1
- package/dist/domain/deadline.js +26 -12
- package/dist/domain/deadline.js.map +1 -1
- package/dist/domain/decide-first.d.ts +11 -1
- package/dist/domain/decide-first.d.ts.map +1 -1
- package/dist/domain/decide-first.js +6 -0
- package/dist/domain/decide-first.js.map +1 -1
- package/dist/domain/index-columns.d.ts.map +1 -1
- package/dist/domain/index-columns.js +2 -0
- package/dist/domain/index-columns.js.map +1 -1
- package/dist/domain/portal-token.d.ts +44 -0
- package/dist/domain/portal-token.d.ts.map +1 -0
- package/dist/domain/portal-token.js +32 -0
- package/dist/domain/portal-token.js.map +1 -0
- package/dist/domain/study-registry.d.ts +65 -8
- package/dist/domain/study-registry.d.ts.map +1 -1
- package/dist/domain/study-registry.js +63 -19
- package/dist/domain/study-registry.js.map +1 -1
- package/dist/domain/submission.d.ts +30 -0
- package/dist/domain/submission.d.ts.map +1 -1
- package/dist/domain/submission.js +68 -0
- package/dist/domain/submission.js.map +1 -1
- package/dist/lib/paper-config.d.ts +1 -1
- package/dist/lib/paper-config.d.ts.map +1 -1
- package/dist/lib/paper-config.js +6 -4
- package/dist/lib/paper-config.js.map +1 -1
- package/dist/outputs-before-decision-rule.d.ts +1 -1
- package/dist/outputs-before-decision-rule.d.ts.map +1 -1
- package/dist/outputs-before-decision-rule.js +21 -17
- package/dist/outputs-before-decision-rule.js.map +1 -1
- package/dist/paper-settings.d.ts +3 -1
- package/dist/paper-settings.d.ts.map +1 -1
- package/dist/paper-settings.js +11 -5
- package/dist/paper-settings.js.map +1 -1
- package/dist/ports/latex.d.ts +23 -0
- package/dist/ports/latex.d.ts.map +1 -1
- package/dist/ports/list-entries.d.ts +7 -4
- package/dist/ports/list-entries.d.ts.map +1 -1
- package/dist/ports/study-deps.d.ts +14 -0
- package/dist/ports/study-deps.d.ts.map +1 -0
- package/dist/ports/study-deps.js +2 -0
- package/dist/ports/study-deps.js.map +1 -0
- package/dist/ports/study-folder.d.ts +43 -0
- package/dist/ports/study-folder.d.ts.map +1 -0
- package/dist/ports/study-folder.js +2 -0
- package/dist/ports/study-folder.js.map +1 -0
- package/dist/ports/submission-portal.d.ts +39 -2
- package/dist/ports/submission-portal.d.ts.map +1 -1
- package/dist/ports/venue-deadlines.d.ts +1 -1
- package/dist/presets.d.ts +1 -2
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +1 -2
- package/dist/presets.js.map +1 -1
- package/dist/studies.d.ts.map +1 -1
- package/dist/studies.js +10 -7
- package/dist/studies.js.map +1 -1
- package/dist/study-folder.d.ts +14 -0
- package/dist/study-folder.d.ts.map +1 -0
- package/dist/study-folder.js +123 -0
- package/dist/study-folder.js.map +1 -0
- package/dist/study-gate.d.ts +1 -1
- package/dist/study-gate.d.ts.map +1 -1
- package/dist/study-gate.js +65 -28
- package/dist/study-gate.js.map +1 -1
- package/dist/study-index-input.d.ts +1 -1
- package/dist/study-index-input.d.ts.map +1 -1
- package/dist/study-index-input.js +8 -3
- package/dist/study-index-input.js.map +1 -1
- package/dist/study-modes.d.ts +38 -27
- package/dist/study-modes.d.ts.map +1 -1
- package/dist/study-modes.js +42 -53
- package/dist/study-modes.js.map +1 -1
- package/dist/study-registry-rule.d.ts +2 -6
- package/dist/study-registry-rule.d.ts.map +1 -1
- package/dist/study-registry-rule.js +32 -41
- package/dist/study-registry-rule.js.map +1 -1
- package/dist/submission.d.ts +49 -11
- package/dist/submission.d.ts.map +1 -1
- package/dist/submission.js +332 -44
- package/dist/submission.js.map +1 -1
- package/docs/configuration.md +2 -1
- package/docs/design/study-modes.md +46 -28
- package/docs/rules/cycle/record.md +9 -6
- package/docs/rules/repro/outputs-before-decision.md +3 -0
- package/docs/rules/repro/study-registered.md +3 -2
- package/docs/rules/tex/heading-case.md +1 -1
- package/docs/submission.md +47 -48
- package/eslint.config.mjs +39 -24
- package/lib/paper-config.ts +7 -4
- package/package.json +6 -1
- package/presets/msr.jsonc +9 -7
- package/presets/msr.md +14 -10
- package/scripts/check.ts +1 -1
- package/scripts/refresh-deadlines/compare.test.ts +75 -0
- package/scripts/refresh-deadlines/compare.ts +101 -0
- package/scripts/refresh-deadlines/main.test.ts +140 -0
- package/scripts/refresh-deadlines/main.ts +56 -0
- package/scripts/refresh-deadlines/refresh.test.ts +287 -0
- package/scripts/refresh-deadlines/refresh.ts +183 -0
- package/skills/grade-paper-writing/SKILL.md +4 -2
- package/skills/grade-paper-writing/SKILL.md.spec.ts +3 -1
- package/skills/grade-paper-writing/__snapshots__/prose-lint.test.ts.snap +16 -3
- package/skills/grade-paper-writing/prose-lint.mjs +127 -95
- package/skills/grade-paper-writing/prose-lint.test.ts +119 -10
- package/skills/submission-portal/SKILL.md +60 -44
- package/skills/submission-portal/SKILL.md.spec.ts +62 -43
- package/skills/submission-portal/submission-portal.test.ts +4 -73
- package/src/CLAUDE.md +7 -4
- package/src/CLAUDE.md.spec.ts +6 -3
- package/src/adapters/hotcrp/cassette/README.md +4 -4
- package/src/adapters/hotcrp/cassette/deadlines-msr2027.html +9 -9
- package/src/adapters/hotcrp/deadlines.io.test.ts +2 -2
- package/src/adapters/hotcrp/deadlines.test.ts +3 -3
- package/src/adapters/hotcrp/index.ts +15 -3
- package/src/adapters/hotcrp/portal.io.ts +61 -17
- package/src/adapters/hotcrp/portal.test.ts +105 -1
- package/src/adapters/hotcrp/response.ts +21 -0
- package/src/adapters/hotcrp/site.ts +34 -0
- package/src/adapters/hotcrp/token.test.ts +69 -0
- package/src/adapters/hotcrp/token.ts +51 -0
- package/src/adapters/latex/abstract.test.ts +280 -0
- package/src/adapters/latex/abstract.ts +272 -0
- package/src/adapters/latex/captions.test.ts +57 -0
- package/src/adapters/latex/captions.ts +56 -0
- package/src/adapters/latex/headings.ts +5 -4
- package/src/adapters/latex/index.test.ts +31 -1
- package/src/adapters/latex/index.ts +3 -0
- package/src/adapters/latex/parse.ts +71 -3
- package/src/adapters/node/list-entries.io.ts +2 -1
- package/src/adapters/node/list-entries.test.ts +18 -0
- package/src/cli.test.ts +20 -8
- package/src/cli.ts +22 -13
- package/src/cycle-rules.test.ts +6 -6
- package/src/cycle-rules.ts +7 -4
- package/src/domain/deadline.test.ts +31 -2
- package/src/domain/deadline.ts +42 -16
- package/src/domain/decide-first.test.ts +33 -0
- package/src/domain/decide-first.ts +16 -1
- package/src/domain/index-columns.test.ts +49 -4
- package/src/domain/index-columns.ts +2 -0
- package/src/domain/portal-token.test.ts +55 -0
- package/src/domain/portal-token.ts +63 -0
- package/src/domain/study-measurements.test.ts +7 -3
- package/src/domain/study-registry.test.ts +34 -6
- package/src/domain/study-registry.ts +123 -31
- package/src/domain/submission.test.ts +88 -0
- package/src/domain/submission.ts +99 -0
- package/src/new-paper.test.ts +1 -0
- package/src/outputs-before-decision-rule.test.ts +47 -2
- package/src/outputs-before-decision-rule.ts +31 -22
- package/src/paper-settings.test.ts +20 -0
- package/src/paper-settings.ts +17 -5
- package/src/ports/latex.ts +25 -0
- package/src/ports/list-entries.ts +7 -4
- package/src/ports/study-deps.ts +14 -0
- package/src/ports/study-folder.ts +38 -0
- package/src/ports/submission-portal.ts +43 -1
- package/src/ports/venue-deadlines.ts +1 -1
- package/src/presets.test.ts +8 -5
- package/src/presets.ts +1 -2
- package/src/studies-index-modes.test.ts +2 -2
- package/src/studies.ts +19 -10
- package/src/study-folder.test.ts +237 -0
- package/src/study-folder.ts +176 -0
- package/src/study-gate.test.ts +158 -7
- package/src/study-gate.ts +127 -54
- package/src/study-index-input.ts +12 -4
- package/src/study-modes.ts +67 -80
- package/src/study-registry-rule.test.ts +87 -0
- package/src/study-registry-rule.ts +58 -66
- package/src/submission-new.test.ts +569 -0
- package/src/submission-show.test.ts +210 -0
- package/src/submission-update.test.ts +160 -0
- package/src/submission.test.ts +140 -518
- package/src/submission.ts +494 -61
- package/scripts/refresh-deadlines.test.ts +0 -431
- package/scripts/refresh-deadlines.ts +0 -387
package/dist/study-gate.js
CHANGED
|
@@ -6,14 +6,17 @@
|
|
|
6
6
|
* npx paperlint studies gate papers/my-paper P1-S03 && ./run.sh
|
|
7
7
|
*
|
|
8
8
|
* An exploratory study has no gate: it exits 0 and says so. A study that declares no mode, names no
|
|
9
|
-
* decision file,
|
|
9
|
+
* decision file, whose row names a folder that is not one inside `repro/`, or whose id two rows
|
|
10
|
+
* share, is refused.
|
|
10
11
|
*/
|
|
11
12
|
import { join } from "node:path";
|
|
12
13
|
import { callerPath } from "./caller-path.js";
|
|
13
|
-
import {
|
|
14
|
+
import { decisionEntry, readModeStudy } from "./study-modes.js";
|
|
14
15
|
import { REPRO_DIR } from "./domain/repro-layout.js";
|
|
15
16
|
import { decisionAsOutput } from "./domain/study-mode.js";
|
|
16
|
-
import {
|
|
17
|
+
import { STUDIES_FILE, studiesOf, studyById, } from "./domain/study-registry.js";
|
|
18
|
+
import { folderRefusalText, studyFolder } from "./study-folder.js";
|
|
19
|
+
import { registryOf } from "./study-registry-rule.js";
|
|
17
20
|
import { refusal, refused, } from "./study-run.js";
|
|
18
21
|
/** The line of a committed state that holds the run back. */
|
|
19
22
|
const shutLine = (id, file, c) => {
|
|
@@ -39,57 +42,91 @@ export const gateLine = (id, file, c) => c.kind === "committed"
|
|
|
39
42
|
* Why the decision cannot gate the run though it is named: its own outputs match it, or it is a
|
|
40
43
|
* directory (git answers for a directory with the last commit of anything under it); null when usable.
|
|
41
44
|
*/
|
|
42
|
-
const unusable = (
|
|
45
|
+
const unusable = ({ id, folder: studyDir }, mode, folder) => {
|
|
43
46
|
const file = mode.decision.file;
|
|
44
|
-
const glob = decisionAsOutput(
|
|
47
|
+
const glob = decisionAsOutput(studyDir, mode);
|
|
45
48
|
if (glob !== null)
|
|
46
49
|
return refusal(`${id}: its decision ${file} is matched by its output \`${glob}\`; a decision cannot be what its own run produces.`);
|
|
47
|
-
const on =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
const on = decisionEntry(folder, file);
|
|
51
|
+
switch (on.kind) {
|
|
52
|
+
case "not-a-file":
|
|
53
|
+
return refusal(`${id}: its decision ${file} is a ${on.what}, not a file; the run cannot be gated on it. Name the decision file in \`mode.decision.file\`.`);
|
|
54
|
+
case "linked":
|
|
55
|
+
return refusal(`${id}: its decision ${file} passes through the symbolic link \`${on.link}\`; git records the link, not the files behind it, so the run cannot be gated on it. Name a decision file that lies in real directories in \`mode.decision.file\`.`);
|
|
56
|
+
case "ok":
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
51
59
|
};
|
|
52
60
|
/** The gate of a decide-first study. */
|
|
53
|
-
const gateDecided = (
|
|
61
|
+
const gateDecided = ({ paper, folder, deps }, row, mode) => {
|
|
62
|
+
const { id } = row;
|
|
54
63
|
const file = mode.decision.file;
|
|
55
|
-
const blocked = unusable(
|
|
64
|
+
const blocked = unusable(row, mode, folder);
|
|
56
65
|
if (blocked !== null)
|
|
57
66
|
return refused(blocked);
|
|
58
67
|
const g = gateLine(id, file, deps.git.committed(callerPath(paper), callerPath(join(paper, file))));
|
|
59
68
|
return g.open ? { ok: true, lines: [g.line] } : refused(refusal(g.line));
|
|
60
69
|
};
|
|
61
|
-
/** The refusal when the row
|
|
62
|
-
const escapingRow = (
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
: refusal(`${id}: its row names the folder \`${row.folder}\`, which is not one folder inside ${shown}/${REPRO_DIR}/; nothing is read through it. Give the row its own folder's name.`);
|
|
70
|
+
/** The refusal when the row names a folder that may not be entered; null when it may. */
|
|
71
|
+
const escapingRow = (shown, row, folder) => {
|
|
72
|
+
const why = folder.refusal(row.folder);
|
|
73
|
+
if (why === null)
|
|
74
|
+
return null;
|
|
75
|
+
const { reason, fix } = folderRefusalText(why, shown);
|
|
76
|
+
return refusal(`${row.id}: its row names the folder \`${row.folder}\`, which ${reason}; nothing is read through it. ${fix}.`);
|
|
69
77
|
};
|
|
78
|
+
/** The refusal of an id that two or more rows carry: the gate answers for exactly one study. */
|
|
79
|
+
const ambiguousRefusal = (shown, id, rows) => refusal(`${id}: ${String(rows.length)} rows of ${shown}/${REPRO_DIR}/${STUDIES_FILE} carry this id (folders ${rows.map((x) => `\`${x.folder}\``).join(", ")}); the gate answers for exactly one study. Give each other row the next free id and rename its folder to match, then run this again.`);
|
|
70
80
|
/** The refusal of a study whose plan is still a draft: a mode decides nothing until its plan is ready. */
|
|
71
81
|
const draftRefusal = (id, s) => {
|
|
72
82
|
const names = s.empty.map((f) => `\`${f}\``).join(", ");
|
|
73
83
|
const verb = s.empty.length === 1 ? "is" : "are";
|
|
74
84
|
return refusal(`${id}: its ${s.plan} is a draft — ${names} ${verb} empty; the run waits for a ready plan. Fill it in, then run this again.`);
|
|
75
85
|
};
|
|
76
|
-
/**
|
|
77
|
-
|
|
78
|
-
const
|
|
86
|
+
/** The gate of the one row `row`. */
|
|
87
|
+
const gateRow = (run, row) => {
|
|
88
|
+
const { shown, folder, deps } = run;
|
|
89
|
+
const escaping = escapingRow(shown, row, folder);
|
|
79
90
|
if (escaping !== null)
|
|
80
91
|
return refused(escaping);
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
83
|
-
return refused(
|
|
92
|
+
const read = readModeStudy(row, folder, deps.codec);
|
|
93
|
+
if (read.kind === "linked")
|
|
94
|
+
return refused(linkedPlanRefusal(shown, row, read.link));
|
|
95
|
+
if (read.kind === "none")
|
|
96
|
+
return refused(noModeRefusal(shown, row.id));
|
|
97
|
+
const s = read.study;
|
|
84
98
|
if (s.empty.length > 0)
|
|
85
|
-
return refused(draftRefusal(id, s));
|
|
99
|
+
return refused(draftRefusal(row.id, s));
|
|
86
100
|
return s.mode.kind === "decide_before_run"
|
|
87
|
-
? gateDecided(
|
|
101
|
+
? gateDecided(run, s.row, s.mode)
|
|
88
102
|
: {
|
|
89
103
|
ok: true,
|
|
90
104
|
lines: [
|
|
91
|
-
`${id} is exploratory (${s.mode.reason}): it has no gate, and its results are reported as exploratory.`,
|
|
105
|
+
`${row.id} is exploratory (${s.mode.reason}): it has no gate, and its results are reported as exploratory.`,
|
|
92
106
|
],
|
|
93
107
|
};
|
|
108
|
+
};
|
|
109
|
+
/** The refusal of a plan whose path passes through a symbolic link. */
|
|
110
|
+
const linkedPlanRefusal = (shown, row, link) => refusal(`${row.id}: the plan its row names, in ${shown}/${REPRO_DIR}/${row.folder}, passes through the symbolic link \`${link}\`; nothing is read through a link. Replace the link with the plan file itself, then run this again.`);
|
|
111
|
+
/** The refusal of an id no row declares a mode for. */
|
|
112
|
+
const noModeRefusal = (shown, id) => refusal(`${id} declares no mode in ${shown}: the plan its row names in ${shown}/${REPRO_DIR}/${STUDIES_FILE} is missing, does not parse, or has no \`mode\`. Lint the paper (\`npx paperlint lint\`) to see why.`);
|
|
113
|
+
/** The refusal of an id that no row of the registry carries. */
|
|
114
|
+
const unknownIdRefusal = (shown, id) => refusal(`${id}: no row of ${shown}/${REPRO_DIR}/${STUDIES_FILE} carries this id. Use an id from the registry, or register the study with \`npx paperlint studies new\`, then run this again.`);
|
|
115
|
+
/** The refusal of a registry that is not there or does not parse: no row can carry the id. */
|
|
116
|
+
const registryRefusal = (shown, id, r) => refusal(`${id}: the registry ${shown}/${REPRO_DIR}/${STUDIES_FILE} ${r.kind === "absent" ? "is missing" : `does not parse (${r.why})`}, so no row can carry this id. Run \`npx paperlint lint\` to see why, then run this again.`);
|
|
117
|
+
/** `studies gate`: 0 when the run may start, 1 with the reason when not. */
|
|
118
|
+
export function runGate(paper, shown, id, deps) {
|
|
119
|
+
const r = registryOf(paper, deps);
|
|
120
|
+
if (r.kind !== "read")
|
|
121
|
+
return refused(registryRefusal(shown, id, r));
|
|
122
|
+
const found = studyById(studiesOf(r), id);
|
|
123
|
+
switch (found.kind) {
|
|
124
|
+
case "none":
|
|
125
|
+
return refused(unknownIdRefusal(shown, id));
|
|
126
|
+
case "ambiguous":
|
|
127
|
+
return refused(ambiguousRefusal(shown, id, found.rows));
|
|
128
|
+
case "one":
|
|
129
|
+
return gateRow({ paper, shown, folder: studyFolder(paper, deps), deps }, found.row);
|
|
130
|
+
}
|
|
94
131
|
}
|
|
95
132
|
//# sourceMappingURL=study-gate.js.map
|
package/dist/study-gate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"study-gate.js","sourceRoot":"","sources":["../src/study-gate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"study-gate.js","sourceRoot":"","sources":["../src/study-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAkB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAoB,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACL,YAAY,EACZ,SAAS,EAET,SAAS,GAEV,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MA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K,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACrE,MAAM,KAAK,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1C,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,MAAM;YACT,OAAO,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;QAC9C,KAAK,WAAW;YACd,OAAO,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,KAAK,KAAK;YACR,OAAO,OAAO,CACZ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,EACxD,KAAK,CAAC,GAAG,CACV,CAAC;IACN,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IndexInput, type RegistryState } from "./domain/study-registry.ts";
|
|
2
2
|
import { type OrderDeps } from "./outputs-before-decision-rule.ts";
|
|
3
3
|
/** The plans and the histories of the paper folder `paper`, whose registry is `r`. */
|
|
4
4
|
export declare const indexInputOf: (paper: string, r: RegistryState, deps: OrderDeps) => IndexInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"study-index-input.d.ts","sourceRoot":"","sources":["../src/study-index-input.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"study-index-input.d.ts","sourceRoot":"","sources":["../src/study-index-input.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,mCAAmC,CAAC;AAI3C,sFAAsF;AACtF,eAAO,MAAM,YAAY,GACvB,OAAO,MAAM,EACb,GAAG,aAAa,EAChB,MAAM,SAAS,KACd,UAQD,CAAC"}
|
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
* row's plan, and each decide-first study's history as git gives it now (src/domain/index-columns.ts).
|
|
4
4
|
*/
|
|
5
5
|
import { indexHistory } from "./domain/index-columns.js";
|
|
6
|
+
import { folderKey, } from "./domain/study-registry.js";
|
|
6
7
|
import { decideFirstStudies, } from "./outputs-before-decision-rule.js";
|
|
7
|
-
import {
|
|
8
|
+
import { studyFolder } from "./study-folder.js";
|
|
9
|
+
import { plansOf } from "./study-registry-rule.js";
|
|
8
10
|
/** The plans and the histories of the paper folder `paper`, whose registry is `r`. */
|
|
9
11
|
export const indexInputOf = (paper, r, deps) => ({
|
|
10
|
-
plans: plansOf(
|
|
11
|
-
history: new Map(decideFirstStudies(paper, deps).map((s) => [
|
|
12
|
+
plans: plansOf(r, studyFolder(paper, deps), deps.codec),
|
|
13
|
+
history: new Map(decideFirstStudies(paper, deps).map((s) => [
|
|
14
|
+
folderKey(s.folder, s.plan),
|
|
15
|
+
indexHistory(s),
|
|
16
|
+
])),
|
|
12
17
|
});
|
|
13
18
|
//# sourceMappingURL=study-index-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"study-index-input.js","sourceRoot":"","sources":["../src/study-index-input.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"study-index-input.js","sourceRoot":"","sources":["../src/study-index-input.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,SAAS,GAGV,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,kBAAkB,GAEnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,sFAAsF;AACtF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,KAAa,EACb,CAAgB,EAChB,IAAe,EACH,EAAE,CAAC,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC;IACvD,OAAO,EAAE,IAAI,GAAG,CACd,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACzC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC;QAC3B,YAAY,CAAC,CAAC,CAAC;KAChB,CAAC,CACH;CACF,CAAC,CAAC"}
|
package/dist/study-modes.d.ts
CHANGED
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
import type { StudyMode } from "./domain/study-mode.ts";
|
|
2
1
|
import type { NotAFile } from "./domain/decide-first.ts";
|
|
3
|
-
import
|
|
4
|
-
import type
|
|
2
|
+
import type { StudyMode } from "./domain/study-mode.ts";
|
|
3
|
+
import { type PlanTextField, type RegistryState, type Study } from "./domain/study-registry.ts";
|
|
5
4
|
import type { StudyRegistryCodec } from "./ports/study-registry-codec.ts";
|
|
6
|
-
import type {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
import type { StudyFolder } from "./ports/study-folder.ts";
|
|
6
|
+
/** Whether a decision path is one git can vouch for: a file or nothing yet; else why not. */
|
|
7
|
+
export type DecisionEntry = {
|
|
8
|
+
readonly kind: "ok";
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: "not-a-file";
|
|
11
|
+
readonly what: NotAFile;
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: "linked";
|
|
14
|
+
readonly link: string;
|
|
15
|
+
};
|
|
17
16
|
/**
|
|
18
|
-
* What `
|
|
19
|
-
* be a regular file — git answers for a directory with
|
|
20
|
-
* link with the link
|
|
17
|
+
* What the decision file `file` (relative to the paper) is, read through `folder` without following
|
|
18
|
+
* a link: a decision must be a regular file in real directories — git answers for a directory with
|
|
19
|
+
* the commits of anything under it, for a link with the link and not the file it points to, and for a
|
|
20
|
+
* path through a linked directory with what lies behind the link.
|
|
21
21
|
*/
|
|
22
|
-
export declare const
|
|
23
|
-
/**
|
|
24
|
-
* Every file under `dir`, relative to it, `/`-separated; none when it is not a directory. A symbolic
|
|
25
|
-
* link is listed as a file — git stores it as one — and never followed: a link to the folder itself
|
|
26
|
-
* would recurse forever, and one to a tree outside would bring its files into the study.
|
|
27
|
-
*/
|
|
28
|
-
export declare const filesUnder: (dir: string, deps: Pick<StudyDeps, "entries">, prefix?: string) => readonly string[];
|
|
22
|
+
export declare const decisionEntry: (folder: StudyFolder, file: string) => DecisionEntry;
|
|
29
23
|
/**
|
|
30
24
|
* A study whose plan parsed with a mode: its row, the plan's path in its folder, the mode, and the
|
|
31
25
|
* plan's empty texts — none when it is ready. Only a ready plan's mode decides anything: a draft may
|
|
@@ -37,9 +31,26 @@ export interface ModeStudy {
|
|
|
37
31
|
readonly mode: StudyMode;
|
|
38
32
|
readonly empty: readonly PlanTextField[];
|
|
39
33
|
}
|
|
34
|
+
/** What reading the plan of one row gave: its mode study, nothing, or a link on the way to it. */
|
|
35
|
+
export type ModeRead = {
|
|
36
|
+
readonly kind: "mode";
|
|
37
|
+
readonly study: ModeStudy;
|
|
38
|
+
} | {
|
|
39
|
+
readonly kind: "none";
|
|
40
|
+
} | {
|
|
41
|
+
readonly kind: "linked";
|
|
42
|
+
readonly link: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The plan of the row `s`, read through `folder` (`src/study-folder.ts`, which follows no link and
|
|
46
|
+
* enters no folder that is not one inside `repro/`): its mode study when the plan parsed with a
|
|
47
|
+
* mode; a link on the way to it; else nothing.
|
|
48
|
+
*/
|
|
49
|
+
export declare const readModeStudy: (s: Study, folder: StudyFolder, codec: StudyRegistryCodec) => ModeRead;
|
|
40
50
|
/**
|
|
41
|
-
* Every study of the
|
|
42
|
-
*
|
|
51
|
+
* Every study of the registry `r` whose plan declares a mode, in registry order. A plan that does
|
|
52
|
+
* not parse, or is reached through a link, is `repro/study-registered`'s to report; here it declares
|
|
53
|
+
* nothing.
|
|
43
54
|
*/
|
|
44
|
-
export declare const modeStudies: (
|
|
55
|
+
export declare const modeStudies: (r: RegistryState, folder: StudyFolder, codec: StudyRegistryCodec) => readonly ModeStudy[];
|
|
45
56
|
//# sourceMappingURL=study-modes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"study-modes.d.ts","sourceRoot":"","sources":["../src/study-modes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"study-modes.d.ts","sourceRoot":"","sources":["../src/study-modes.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,KAAK,EACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,6FAA6F;AAC7F,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GACvB;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GACxD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,WAAW,EACnB,MAAM,MAAM,KACX,aAQF,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;CAC1C;AAED,kGAAkG;AAClG,MAAM,MAAM,QAAQ,GAChB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,GAAG,KAAK,EACR,QAAQ,WAAW,EACnB,OAAO,kBAAkB,KACxB,QAcF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GACtB,GAAG,aAAa,EAChB,QAAQ,WAAW,EACnB,OAAO,kBAAkB,KACxB,SAAS,SAAS,EAMlB,CAAC"}
|
package/dist/study-modes.js
CHANGED
|
@@ -1,70 +1,59 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Reading a paper's studies with their modes: each registered study whose `plan.json` parses with a
|
|
3
|
-
* `mode`, and
|
|
3
|
+
* `mode`, and how a decision's path stands. What `repro/outputs-before-decision`, `studies gate`
|
|
4
4
|
* and the index's mode columns read with (docs/design/study-modes.md). A row whose folder is not one
|
|
5
5
|
* folder inside `repro/` is never read through.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { isInside, } from "./domain/study-registry.js";
|
|
11
|
-
import { readableFolders, registryOf, textAt } from "./study-registry-rule.js";
|
|
12
|
-
const ON_DISK = {
|
|
13
|
-
file: "file",
|
|
14
|
-
dir: "directory",
|
|
15
|
-
symlink: "symbolic link",
|
|
16
|
-
};
|
|
7
|
+
import { posix } from "node:path";
|
|
8
|
+
import { filter, map, pipe } from "remeda";
|
|
9
|
+
import { studiesOf, } from "./domain/study-registry.js";
|
|
17
10
|
/**
|
|
18
|
-
* What `
|
|
19
|
-
* be a regular file — git answers for a directory with
|
|
20
|
-
* link with the link
|
|
11
|
+
* What the decision file `file` (relative to the paper) is, read through `folder` without following
|
|
12
|
+
* a link: a decision must be a regular file in real directories — git answers for a directory with
|
|
13
|
+
* the commits of anything under it, for a link with the link and not the file it points to, and for a
|
|
14
|
+
* path through a linked directory with what lies behind the link.
|
|
21
15
|
*/
|
|
22
|
-
export const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
export const decisionEntry = (folder, file) => {
|
|
17
|
+
const at = folder.entryAt(file);
|
|
18
|
+
if (at.kind === "dir")
|
|
19
|
+
return { kind: "not-a-file", what: "directory" };
|
|
20
|
+
if (at.kind === "other")
|
|
21
|
+
return { kind: "not-a-file", what: "special file" };
|
|
22
|
+
if (at.kind !== "linked")
|
|
23
|
+
return { kind: "ok" };
|
|
24
|
+
return at.link === posix.normalize(file)
|
|
25
|
+
? { kind: "not-a-file", what: "symbolic link" }
|
|
26
|
+
: at;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
export const filesUnder = (dir, deps, prefix = "") => deps.entries(callerPath(dir)).flatMap(({ name, kind }) => {
|
|
34
|
-
const rel = prefix === "" ? name : `${prefix}/${name}`;
|
|
35
|
-
return kind === "dir" ? filesUnder(join(dir, name), deps, rel) : [rel];
|
|
36
|
-
});
|
|
37
|
-
/**
|
|
38
|
-
* The study `s`'s plan, when it is a plan inside a folder every reader may read through
|
|
39
|
-
* (`readableFolders`), by the registry rule's own containment test (`isInside`), that parsed with a
|
|
40
|
-
* mode; else null.
|
|
29
|
+
* The plan of the row `s`, read through `folder` (`src/study-folder.ts`, which follows no link and
|
|
30
|
+
* enters no folder that is not one inside `repro/`): its mode study when the plan parsed with a
|
|
31
|
+
* mode; a link on the way to it; else nothing.
|
|
41
32
|
*/
|
|
42
|
-
const
|
|
33
|
+
export const readModeStudy = (s, folder, codec) => {
|
|
43
34
|
const plan = s.plan;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const parsed = deps.codec.parsePlan(text, s.kind);
|
|
35
|
+
if (plan === undefined)
|
|
36
|
+
return { kind: "none" };
|
|
37
|
+
const read = folder.read(s.folder, plan);
|
|
38
|
+
if (read.kind === "linked")
|
|
39
|
+
return read;
|
|
40
|
+
if (read.kind === "absent")
|
|
41
|
+
return { kind: "none" };
|
|
42
|
+
const parsed = codec.parsePlan(read.text, s.kind);
|
|
53
43
|
if (parsed.kind === "unreadable" || parsed.plan.mode === undefined)
|
|
54
|
-
return
|
|
44
|
+
return { kind: "none" };
|
|
55
45
|
const empty = parsed.kind === "draft" ? parsed.empty : [];
|
|
56
|
-
return {
|
|
46
|
+
return {
|
|
47
|
+
kind: "mode",
|
|
48
|
+
study: { row: s, plan, mode: parsed.plan.mode, empty },
|
|
49
|
+
};
|
|
57
50
|
};
|
|
58
51
|
/**
|
|
59
|
-
* Every study of the
|
|
60
|
-
*
|
|
52
|
+
* Every study of the registry `r` whose plan declares a mode, in registry order. A plan that does
|
|
53
|
+
* not parse, or is reached through a link, is `repro/study-registered`'s to report; here it declares
|
|
54
|
+
* nothing.
|
|
61
55
|
*/
|
|
62
|
-
export const modeStudies = (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return (r.kind === "read" ? r.registry.studies : []).flatMap((s) => {
|
|
66
|
-
const m = modeStudyOf(paper, s, deps, readable);
|
|
67
|
-
return m === null ? [] : [m];
|
|
68
|
-
});
|
|
69
|
-
};
|
|
56
|
+
export const modeStudies = (r, folder, codec) => pipe(studiesOf(r), map((s) => readModeStudy(s, folder, codec)), filter(isMode), map((m) => m.study));
|
|
57
|
+
/** A plan read that declared a mode. */
|
|
58
|
+
const isMode = (m) => m.kind === "mode";
|
|
70
59
|
//# sourceMappingURL=study-modes.js.map
|
package/dist/study-modes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"study-modes.js","sourceRoot":"","sources":["../src/study-modes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"study-modes.js","sourceRoot":"","sources":["../src/study-modes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG3C,OAAO,EACL,SAAS,GAIV,MAAM,4BAA4B,CAAC;AAUpC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAmB,EACnB,IAAY,EACG,EAAE;IACjB,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IACxE,IAAI,EAAE,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;IAC7E,IAAI,EAAE,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAChD,OAAO,EAAE,CAAC,IAAI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W,GAAG,CACzB,CAAgB,EAChB,MAAmB,EACnB,KAAyB,EACH,EAAE,CACxB,IAAI,CACF,SAAS,CAAC,CAAC,CAAC,EACZ,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,EAC3C,MAAM,CAAC,MAAM,CAAC,EACd,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CACpB,CAAC;AAEJ,wCAAwC;AACxC,MAAM,MAAM,GAAG,CAAC,CAAW,EAA4C,EAAE,CACvE,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC"}
|
|
@@ -4,17 +4,13 @@ import type { FolderRuleModule } from "./folder-venue-rule.ts";
|
|
|
4
4
|
import type { Files } from "./ports/files.ts";
|
|
5
5
|
import type { ListEntries } from "./ports/list-entries.ts";
|
|
6
6
|
import type { StudyRegistryCodec } from "./ports/study-registry-codec.ts";
|
|
7
|
+
import type { StudyFolder } from "./ports/study-folder.ts";
|
|
7
8
|
/** What the rule reads with: the disk, its listings, and the registry's parser. */
|
|
8
9
|
export interface StudyRegistryDeps extends FolderLayoutDeps {
|
|
9
10
|
readonly codec: StudyRegistryCodec;
|
|
10
11
|
/** `repro/`'s entries, links not followed: a study folder that is a link is never read through. */
|
|
11
12
|
readonly entries: ListEntries;
|
|
12
13
|
}
|
|
13
|
-
/**
|
|
14
|
-
* The test every reader of a study's folder passes a row through: its folder is one folder name
|
|
15
|
-
* inside `repro/` (`isFolderName`) and not a symbolic link, which would lead the reads anywhere.
|
|
16
|
-
*/
|
|
17
|
-
export declare const readableFolders: (dir: string, deps: Pick<StudyRegistryDeps, "entries">) => ((folder: string) => boolean);
|
|
18
14
|
/** The text of the file at `p`; null when there is none, or a directory sits there. */
|
|
19
15
|
export declare const textAt: (files: Files, p: string) => string | null;
|
|
20
16
|
/** The registry of the paper folder `dir`: absent, unreadable with why, or read. */
|
|
@@ -23,7 +19,7 @@ export declare function registryOf(dir: string, deps: Pick<StudyRegistryDeps, "f
|
|
|
23
19
|
* The plan each row of `r` names, read and parsed, by `<folder>/<plan>`; a plan not there is left out.
|
|
24
20
|
* A plan still named `prereg.json` is parsed by the loose schema of its old name.
|
|
25
21
|
*/
|
|
26
|
-
export declare const plansOf: (
|
|
22
|
+
export declare const plansOf: (r: RegistryState, folder: StudyFolder, codec: StudyRegistryCodec) => ReadonlyMap<string, PlanState>;
|
|
27
23
|
/** Every finding of the paper folder `dir`'s study registry — THE function behind both rules. */
|
|
28
24
|
export declare function studyFindings(dir: string, deps: StudyRegistryDeps): readonly StudyFinding[];
|
|
29
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"study-registry-rule.d.ts","sourceRoot":"","sources":["../src/study-registry-rule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"study-registry-rule.d.ts","sourceRoot":"","sources":["../src/study-registry-rule.ts"],"names":[],"mappings":"AA4BA,OAAO,EASL,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,YAAY,EAGlB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAM3D,mFAAmF;AACnF,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC,mGAAmG;IACnG,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC/B;AAED,uFAAuF;AACvF,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,EAAE,GAAG,MAAM,KAAG,MAAM,GAAG,IAGzD,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,OAAO,CAAC,GAC/C,aAAa,CAOf;AAoCD;;;GAGG;AACH,eAAO,MAAM,OAAO,GAClB,GAAG,aAAa,EAChB,QAAQ,WAAW,EACnB,OAAO,kBAAkB,KACxB,WAAW,CAAC,MAAM,EAAE,SAAS,CAQ7B,CAAC;AAqBJ,iGAAiG;AACjG,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,iBAAiB,GACtB,SAAS,YAAY,EAAE,CAUzB;AA+DD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,iBAAiB,GACtB,QAAQ,CAAC,MAAM,CAAC,kBAAkB,GAAG,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CAqB5E;AAED,mGAAmG;AACnG,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC;IAChD,wBAAwB,EAAE,OAAO,CAAC;IAClC,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAA0E,CAAC"}
|
|
@@ -18,25 +18,14 @@
|
|
|
18
18
|
* file in `repro/`.
|
|
19
19
|
*/
|
|
20
20
|
import { basename, dirname, join, posix } from "node:path";
|
|
21
|
+
import { filter, map, pipe } from "remeda";
|
|
21
22
|
import { callerPath } from "./caller-path.js";
|
|
22
23
|
import { README, REPRO_BYPRODUCTS, REPRO_DIR, REPRO_DIRS, } from "./domain/repro-layout.js";
|
|
23
|
-
import { LEGACY_PLAN_FILE, PLAN_NAME_PROBLEMS, STUDIES_FILE,
|
|
24
|
+
import { LEGACY_PLAN_FILE, PLAN_NAME_PROBLEMS, STUDIES_FILE, judgeStudies, folderKey, planRefs, studiesOf, studyMessage, } from "./domain/study-registry.js";
|
|
24
25
|
import { reproEntriesOf } from "./repro-layout-rule.js";
|
|
26
|
+
import { studyFolder } from "./study-folder.js";
|
|
25
27
|
import { rulePageUrl } from "./venue-rules.js";
|
|
26
28
|
const STATUS_FILE = "PIPELINE-STATUS.md";
|
|
27
|
-
/** The names at the top of `<dir>/repro/` that are symbolic links. */
|
|
28
|
-
const linksIn = (dir, deps) => new Set(deps
|
|
29
|
-
.entries(callerPath(join(dir, REPRO_DIR)))
|
|
30
|
-
.filter((e) => e.kind === "symlink")
|
|
31
|
-
.map((e) => e.name));
|
|
32
|
-
/**
|
|
33
|
-
* The test every reader of a study's folder passes a row through: its folder is one folder name
|
|
34
|
-
* inside `repro/` (`isFolderName`) and not a symbolic link, which would lead the reads anywhere.
|
|
35
|
-
*/
|
|
36
|
-
export const readableFolders = (dir, deps) => {
|
|
37
|
-
const links = linksIn(dir, deps);
|
|
38
|
-
return (folder) => isFolderName(folder) && !links.has(folder);
|
|
39
|
-
};
|
|
40
29
|
/** The text of the file at `p`; null when there is none, or a directory sits there. */
|
|
41
30
|
export const textAt = (files, p) => {
|
|
42
31
|
const b = files.isFile(callerPath(p)) ? files.readBytes(callerPath(p)) : null;
|
|
@@ -58,45 +47,47 @@ const studyFolders = (dir, deps) => reproEntriesOf(dir, deps)
|
|
|
58
47
|
!REPRO_DIRS.includes(e.name) &&
|
|
59
48
|
!REPRO_BYPRODUCTS.includes(e.name))
|
|
60
49
|
.map((e) => e.name);
|
|
61
|
-
/**
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
files.isFile(callerPath(join(dir, REPRO_DIR, p)))));
|
|
50
|
+
/** What each `<folder>/<result_file>` of `r`'s rows is, as the study folder's reader finds it. */
|
|
51
|
+
const resultsOf = (r, folder) => pipe(studiesOf(r), filter(hasResultFile), map((s) => [
|
|
52
|
+
folderKey(s.folder, s.result_file),
|
|
53
|
+
folder.locate(s.folder, s.result_file),
|
|
54
|
+
]), (entries) => new Map(entries));
|
|
55
|
+
/** A row that names a result file. */
|
|
56
|
+
const hasResultFile = (s) => s.result_file !== undefined;
|
|
69
57
|
/**
|
|
70
58
|
* The plan each row of `r` names, read and parsed, by `<folder>/<plan>`; a plan not there is left out.
|
|
71
59
|
* A plan still named `prereg.json` is parsed by the loose schema of its old name.
|
|
72
60
|
*/
|
|
73
|
-
export const plansOf = (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const text = textAt(deps.files, join(dir, REPRO_DIR, key));
|
|
79
|
-
if (text === null)
|
|
80
|
-
return [];
|
|
81
|
-
return [
|
|
82
|
-
[
|
|
83
|
-
key,
|
|
84
|
-
posix.basename(key) === LEGACY_PLAN_FILE
|
|
85
|
-
? deps.codec.parseLegacyPlan(text)
|
|
86
|
-
: deps.codec.parsePlan(text, kind),
|
|
87
|
-
],
|
|
88
|
-
];
|
|
61
|
+
export const plansOf = (r, folder, codec) => new Map((r.kind === "read" ? planRefs(r.registry) : []).flatMap((ref) => {
|
|
62
|
+
const state = planStateOf(ref, folder, codec);
|
|
63
|
+
return state === null
|
|
64
|
+
? []
|
|
65
|
+
: [[folderKey(ref.folder, ref.plan), state]];
|
|
89
66
|
}));
|
|
67
|
+
/** The state of the plan `ref` names, read through `folder`; null when it is not there. */
|
|
68
|
+
const planStateOf = ({ folder: of, plan, kind }, folder, codec) => {
|
|
69
|
+
const read = folder.read(of, plan);
|
|
70
|
+
switch (read.kind) {
|
|
71
|
+
case "absent":
|
|
72
|
+
return null;
|
|
73
|
+
case "linked":
|
|
74
|
+
return { kind: "linked", link: read.link };
|
|
75
|
+
case "text":
|
|
76
|
+
return posix.basename(plan) === LEGACY_PLAN_FILE
|
|
77
|
+
? codec.parseLegacyPlan(read.text)
|
|
78
|
+
: codec.parsePlan(read.text, kind);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
90
81
|
/** Every finding of the paper folder `dir`'s study registry — THE function behind both rules. */
|
|
91
82
|
export function studyFindings(dir, deps) {
|
|
92
|
-
const readable = readableFolders(dir, deps);
|
|
93
83
|
const registry = registryOf(dir, deps);
|
|
84
|
+
const folder = studyFolder(dir, deps);
|
|
94
85
|
return judgeStudies({
|
|
95
86
|
folders: studyFolders(dir, deps),
|
|
96
87
|
registry,
|
|
97
88
|
readme: textAt(deps.files, join(dir, REPRO_DIR, README)),
|
|
98
|
-
|
|
99
|
-
plans: plansOf(
|
|
89
|
+
results: resultsOf(registry, folder),
|
|
90
|
+
plans: plansOf(registry, folder, deps.codec),
|
|
100
91
|
});
|
|
101
92
|
}
|
|
102
93
|
/** The problems `repro/study-registered` reports, each its own message id; the text is `studyMessage`. */
|