@roomi-fields/grillhouse 0.29.0 → 0.31.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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +769 -0
- package/agents/developpeur.md +0 -1
- package/agents/explorateur.md +0 -1
- package/agents/questionneur.md +0 -1
- package/agents/testwriter.md +0 -1
- package/bin/grillhouse.mjs +79 -18
- package/cadre/templates/projet/.github/workflows/ci.yml +2 -13
- package/cadre/templates/projet/CLAUDE.md +5 -1
- package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
- package/cadre/templates/projet/package.json +2 -2
- package/charte.md +24 -0
- package/dist/temporal/acte.d.ts +24 -0
- package/dist/temporal/acte.js +139 -0
- package/dist/temporal/acte.js.map +1 -0
- package/dist/temporal/attributs.d.ts +6 -0
- package/dist/temporal/attributs.js +15 -0
- package/dist/temporal/attributs.js.map +1 -0
- package/dist/temporal/circuit/activites.d.ts +13 -0
- package/dist/temporal/circuit/activites.js +33 -0
- package/dist/temporal/circuit/activites.js.map +1 -0
- package/dist/temporal/circuit/client.d.ts +72 -0
- package/dist/temporal/circuit/client.js +247 -0
- package/dist/temporal/circuit/client.js.map +1 -0
- package/dist/temporal/circuit/commande.d.ts +2 -0
- package/dist/temporal/circuit/commande.js +238 -0
- package/dist/temporal/circuit/commande.js.map +1 -0
- package/dist/temporal/circuit/contrat.d.ts +305 -0
- package/dist/temporal/circuit/contrat.js +30 -0
- package/dist/temporal/circuit/contrat.js.map +1 -0
- package/dist/temporal/circuit/deroule.d.ts +3 -0
- package/dist/temporal/circuit/deroule.js +540 -0
- package/dist/temporal/circuit/deroule.js.map +1 -0
- package/dist/temporal/client.d.ts +47 -0
- package/dist/temporal/client.js +69 -0
- package/dist/temporal/client.js.map +1 -0
- package/dist/temporal/commande.d.ts +2 -0
- package/dist/temporal/commande.js +94 -0
- package/dist/temporal/commande.js.map +1 -0
- package/dist/temporal/deroules.d.ts +5 -0
- package/dist/temporal/deroules.js +10 -0
- package/dist/temporal/deroules.js.map +1 -0
- package/dist/temporal/etat.d.ts +33 -0
- package/dist/temporal/etat.js +59 -0
- package/dist/temporal/etat.js.map +1 -0
- package/dist/temporal/file/activites.d.ts +10 -0
- package/dist/temporal/file/activites.js +25 -0
- package/dist/temporal/file/activites.js.map +1 -0
- package/dist/temporal/file/client.d.ts +4 -0
- package/dist/temporal/file/client.js +6 -0
- package/dist/temporal/file/client.js.map +1 -0
- package/dist/temporal/file/contrat.d.ts +158 -0
- package/dist/temporal/file/contrat.js +14 -0
- package/dist/temporal/file/contrat.js.map +1 -0
- package/dist/temporal/file/deroule.d.ts +15 -0
- package/dist/temporal/file/deroule.js +235 -0
- package/dist/temporal/file/deroule.js.map +1 -0
- package/dist/temporal/installation.d.ts +120 -0
- package/dist/temporal/installation.js +386 -0
- package/dist/temporal/installation.js.map +1 -0
- package/dist/temporal/places/activites.d.ts +8 -0
- package/dist/temporal/places/activites.js +13 -0
- package/dist/temporal/places/activites.js.map +1 -0
- package/dist/temporal/places/client.d.ts +28 -0
- package/dist/temporal/places/client.js +64 -0
- package/dist/temporal/places/client.js.map +1 -0
- package/dist/temporal/places/contrat.d.ts +106 -0
- package/dist/temporal/places/contrat.js +21 -0
- package/dist/temporal/places/contrat.js.map +1 -0
- package/dist/temporal/places/deroule.d.ts +3 -0
- package/dist/temporal/places/deroule.js +198 -0
- package/dist/temporal/places/deroule.js.map +1 -0
- package/dist/temporal/sonde/activites.d.ts +6 -0
- package/dist/temporal/sonde/activites.js +52 -0
- package/dist/temporal/sonde/activites.js.map +1 -0
- package/dist/temporal/sonde/contrat.d.ts +35 -0
- package/dist/temporal/sonde/contrat.js +10 -0
- package/dist/temporal/sonde/contrat.js.map +1 -0
- package/dist/temporal/sonde/deroule.d.ts +3 -0
- package/dist/temporal/sonde/deroule.js +39 -0
- package/dist/temporal/sonde/deroule.js.map +1 -0
- package/dist/temporal/tickets/activites.d.ts +7 -0
- package/dist/temporal/tickets/activites.js +81 -0
- package/dist/temporal/tickets/activites.js.map +1 -0
- package/dist/temporal/tickets/client.d.ts +10 -0
- package/dist/temporal/tickets/client.js +31 -0
- package/dist/temporal/tickets/client.js.map +1 -0
- package/dist/temporal/tickets/contrat.d.ts +56 -0
- package/dist/temporal/tickets/contrat.js +13 -0
- package/dist/temporal/tickets/contrat.js.map +1 -0
- package/dist/temporal/tickets/deroule.d.ts +3 -0
- package/dist/temporal/tickets/deroule.js +94 -0
- package/dist/temporal/tickets/deroule.js.map +1 -0
- package/dist/temporal/travailleur.d.ts +2 -0
- package/dist/temporal/travailleur.js +69 -0
- package/dist/temporal/travailleur.js.map +1 -0
- package/docs/ARCHITECTURE.md +646 -87
- package/docs/CADRE.md +27 -0
- package/docs/INTERFACE.md +139 -42
- package/hooks/crochet.mjs +19 -2
- package/hooks/hooks.json +11 -0
- package/package.json +16 -4
- package/scripts/activites.mjs +2255 -0
- package/scripts/aiguillage.d.mts +37 -0
- package/scripts/aiguillage.mjs +40 -14
- package/scripts/avancement.mjs +155 -26
- package/scripts/bilan.mjs +137 -43
- package/scripts/cadre.mjs +16 -4
- package/scripts/circuit.mjs +993 -4075
- package/scripts/circuits-cles.d.mts +4 -0
- package/scripts/circuits-cles.mjs +21 -0
- package/scripts/circuits-du-serveur.mjs +105 -0
- package/scripts/codes-de-sortie.mjs +9 -0
- package/scripts/commandes-composees.mjs +45 -41
- package/scripts/commandes-du-path.d.mts +7 -0
- package/scripts/commandes-du-path.mjs +25 -0
- package/scripts/composants-affectes.mjs +64 -21
- package/scripts/composition-des-langages.mjs +18 -12
- package/scripts/conformite.mjs +56 -28
- package/scripts/copies-finies.mjs +52 -47
- package/scripts/depart-du-ticket.d.mts +53 -0
- package/scripts/depart-du-ticket.mjs +124 -0
- package/scripts/dependances-internes.mjs +121 -0
- package/scripts/dernier-vert.mjs +61 -34
- package/scripts/dette.mjs +32 -11
- package/scripts/donnees-cles.mjs +244 -0
- package/scripts/droits.mjs +51 -16
- package/scripts/effets.mjs +352 -0
- package/scripts/empreinte-d-etape.mjs +17 -0
- package/scripts/engendres.mjs +15 -5
- package/scripts/enveloppe/enveloppe.mjs +259 -55
- package/scripts/enveloppe/lancer.sh +14 -18
- package/scripts/enveloppe/paquets-du-plan.mjs +2 -2
- package/scripts/enveloppe/travail-de-la-copie.mjs +41 -13
- package/scripts/etapes.mjs +5 -2
- package/scripts/faits-du-circuit.mjs +493 -0
- package/scripts/file-des-tickets.d.mts +21 -0
- package/scripts/file-des-tickets.mjs +58 -0
- package/scripts/flux-des-paquets.mjs +201 -0
- package/scripts/gardes-du-cadre.mjs +21 -5
- package/scripts/init.mjs +11 -4
- package/scripts/integration/file.mjs +544 -434
- package/scripts/integration/integrer.mjs +87 -43
- package/scripts/integration/rejeu.mjs +45 -13
- package/scripts/jointure.d.ts +151 -28
- package/scripts/langages/cargo/commandes.mjs +383 -124
- package/scripts/langages/cargo/composants.mjs +154 -42
- package/scripts/langages/cargo/exemples.mjs +12 -21
- package/scripts/langages/cargo/index.mjs +22 -8
- package/scripts/langages/cargo/sccache.mjs +8 -14
- package/scripts/langages/cargo/tests-de-head.mjs +25 -9
- package/scripts/langages/python/commandes.mjs +218 -100
- package/scripts/langages/python/composants.mjs +53 -21
- package/scripts/langages/python/exemples.mjs +6 -16
- package/scripts/langages/python/index.mjs +28 -8
- package/scripts/langages/python/lot.mjs +1 -36
- package/scripts/langages/typescript/chemins-des-tests.mjs +6 -2
- package/scripts/langages/typescript/composants.mjs +9 -3
- package/scripts/langages/typescript/consommateurs-arbitres.mjs +40 -14
- package/scripts/langages/typescript/consommateurs.mjs +39 -14
- package/scripts/langages/typescript/construire.mjs +6 -163
- package/scripts/langages/typescript/elements-du-lot.mjs +36 -12
- package/scripts/langages/typescript/exemples.mjs +3 -11
- package/scripts/langages/typescript/frontieres.mjs +66 -22
- package/scripts/langages/typescript/index-interfaces.mjs +36 -13
- package/scripts/langages/typescript/index.mjs +50 -61
- package/scripts/langages/typescript/interfaces-contre-code.mjs +113 -45
- package/scripts/langages/typescript/lecteurs.mjs +36 -11
- package/scripts/langages/typescript/migrations/0.23.0-config-vitest.mjs +15 -5
- package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +6 -2
- package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +6 -2
- package/scripts/langages/typescript/migrations/0.30.0-prefixe-des-tickets.mjs +63 -0
- package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +33 -0
- package/scripts/langages/typescript/migrations/0.30.0-titres-nommant-un-ticket.mjs +40 -0
- package/scripts/langages/typescript/mise-a-jour.mjs +1 -2
- package/scripts/langages/typescript/parcours.mjs +12 -4
- package/scripts/langages/typescript/regle-des-tests.mjs +9 -3
- package/scripts/langages/typescript/resumes.mjs +9 -3
- package/scripts/langages/typescript/tailles-des-tests.mjs +93 -20
- package/scripts/langages/typescript/tests-de-nuit.mjs +15 -10
- package/scripts/langages/typescript/tests.mjs +40 -15
- package/scripts/langages/typescript/titres-de-tests.mjs +320 -0
- package/scripts/langages/typescript/turbo-des-paquets.mjs +327 -81
- package/scripts/langages/typescript/verdict.mjs +4 -2
- package/scripts/langages/typescript/verifier.mjs +58 -20
- package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +15 -5
- package/scripts/langages/typescript/vitest-config/base.mjs +29 -3
- package/scripts/langages/typescript/vitest-config/bornes.mjs +13 -0
- package/scripts/langages/typescript/vitest-config/changements.mjs +21 -8
- package/scripts/langages/typescript/vitest-config/cibles.mjs +36 -14
- package/scripts/langages/typescript/vitest-config/delais.mjs +60 -0
- package/scripts/langages/typescript/vitest-config/delais.setup.mjs +11 -0
- package/scripts/langages/typescript/vitest-config/duree.classement.mjs +108 -0
- package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +56 -59
- package/scripts/langages/typescript/vitest-config/lances.mjs +83 -27
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +10 -0
- package/scripts/langages/typescript/vitest-config/resultats.mjs +3 -1
- package/scripts/langages/typescript/vitest.nuit.config.mjs +4 -0
- package/scripts/lint-des-scripts.mjs +58 -0
- package/scripts/mesure/base-de-passe.mjs +117 -25
- package/scripts/mesure/pression.mjs +12 -6
- package/scripts/mesure-de-la-machine.d.mts +21 -0
- package/scripts/mesure-de-la-machine.mjs +76 -0
- package/scripts/migrations/0.23.0-charte-importee.mjs +6 -2
- package/scripts/migrations/0.23.0-crochets-de-seance.mjs +25 -8
- package/scripts/migrations/0.23.0-marche-du-projet.mjs +18 -6
- package/scripts/migrations/0.23.2-copies-du-cadre.mjs +56 -18
- package/scripts/migrations/0.24.12-tri-des-decouvertes.mjs +6 -2
- package/scripts/migrations/0.25.0-script-des-tests.mjs +15 -5
- package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +124 -0
- package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +81 -0
- package/scripts/migrations.mjs +5 -0
- package/scripts/nuit.sh +25 -3
- package/scripts/outil.mjs +3 -1
- package/scripts/outils-cles.d.mts +24 -0
- package/scripts/outils-cles.mjs +18 -8
- package/scripts/paquet-npm.mjs +157 -0
- package/scripts/paquet.mjs +73 -4
- package/scripts/paquets.mjs +46 -10
- package/scripts/passe-de-la-machine.mjs +71 -0
- package/scripts/places-de-la-machine.mjs +414 -0
- package/scripts/places-du-serveur.mjs +170 -0
- package/scripts/prefixe-des-tickets.mjs +68 -0
- package/scripts/preparation.mjs +25 -8
- package/scripts/registre.mjs +9 -4
- package/scripts/regles-des-places.d.mts +36 -0
- package/scripts/regles-des-places.mjs +70 -0
- package/scripts/reponses-du-circuit.d.mts +6 -0
- package/scripts/reponses-du-circuit.mjs +28 -0
- package/scripts/reprise.mjs +66 -0
- package/scripts/resultats.mjs +112 -46
- package/scripts/retirer-les-copies-finies.mjs +25 -0
- package/scripts/sans-reponse.d.mts +4 -0
- package/scripts/sans-reponse.mjs +13 -0
- package/scripts/seances.mjs +936 -0
- package/scripts/services-du-noyau.mjs +27 -8
- package/scripts/session-start.sh +2 -2
- package/scripts/sortie.mjs +3 -3
- package/scripts/sous-commandes.mjs +41 -10
- package/scripts/style-a-l-ecriture.mjs +260 -0
- package/scripts/superviseur.mjs +122 -111
- package/scripts/tableau.mjs +180 -117
- package/scripts/taches-du-graphe.mjs +348 -0
- package/scripts/ticket-du-circuit.mjs +216 -0
- package/scripts/transitions.d.mts +148 -0
- package/scripts/transitions.mjs +1018 -0
- package/scripts/verrou-de-fichier.mjs +8 -4
- package/scripts/verrou-de-machine.mjs +150 -51
- package/scripts/verrous/commande.mjs +50 -17
- package/scripts/verrous/ticket-du-sous-agent.mjs +9 -3
- package/scripts/verrous/verrou.mjs +42 -14
- package/skills/explorateur/SKILL.md +9 -2
- package/skills/grill/SKILL.md +1 -1
- package/skills/mesure/SKILL.md +3 -0
- package/skills/pitmaster/SKILL.md +17 -18
- package/skills/pitmaster/references/consigne-agent.md +5 -1
- package/skills/release/SKILL.md +3 -3
- package/skills/relecteur/SKILL.md +5 -3
- package/skills/testwriter/SKILL.md +49 -31
- package/scripts/demon.mjs +0 -251
- package/scripts/integration/file-attente.mjs +0 -61
- package/scripts/langages/cargo/touches.mjs +0 -93
- package/scripts/langages/typescript/script-des-tests.mjs +0 -6
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// `commandes`; run by `grillhouse <commande>` in the root of the project, its arguments after.
|
|
5
5
|
//
|
|
6
6
|
// npx grillhouse tests [--force] [<chemin>…] [--<option>…] tester
|
|
7
|
+
// npx grillhouse tests-du-paquet <chemin>… [--<option>…] tests-du-paquet
|
|
7
8
|
// npx grillhouse verifier [--tout | --gardes] verifier
|
|
8
9
|
// node commandes.mjs typer typer
|
|
9
10
|
// npx grillhouse preparer preparer
|
|
@@ -13,34 +14,54 @@
|
|
|
13
14
|
// - Each command plays in the folder of each package (./composants.mjs), one after the other, by
|
|
14
15
|
// uv, which reads its pyproject.toml, its uv.lock (`--locked`: a lock out of date is refused, as
|
|
15
16
|
// `npm ci`), and the Python its `requires-python` and its `.python-version` ask.
|
|
16
|
-
// - `tester` plays
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
// `
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
// (
|
|
37
|
-
//
|
|
17
|
+
// - `tester` plays the tests of the packages as tasks of Turborepo, the way of the module
|
|
18
|
+
// typescript's (scripts/langages/typescript/tests.mjs): `turbo run test:unit --filter=<projet>…`
|
|
19
|
+
// on the projects of the graph, each one a package with its own `package.json`
|
|
20
|
+
// (scripts/paquet-npm.mjs), the task of a project whose inputs did not move replayed from
|
|
21
|
+
// Turborepo's cache; the frame selects nothing by the last green. A path, written from the root,
|
|
22
|
+
// chooses the project that holds it (only its task plays) and reaches the task, made absolute, in
|
|
23
|
+
// the variable `GRILLHOUSE_TESTS` (`TESTS_CIBLES`, scripts/taches-du-graphe.mjs) beside the
|
|
24
|
+
// options, which the `env` of the task names: it enters its hash, so a run by path of a project
|
|
25
|
+
// unchanged replays from the cache, and another path moves the hash. `--force` carries the moment
|
|
26
|
+
// of the run in the variable instead (`rejouer`), which no cached run holds: the task plays for
|
|
27
|
+
// real (`npm run test:forcer`). A path out of every project, or in a project that is no package
|
|
28
|
+
// of the graph, is refused, named, and nothing plays (code 2). The exit code is Turborepo's.
|
|
29
|
+
// - `tests-du-paquet <chemin>…` is the body of that task, which the `test:unit` script of a project
|
|
30
|
+
// calls (`grillhouse tests-du-paquet <dossier du projet>`, written with the package): it never
|
|
31
|
+
// runs Turborepo, so `tester` and the task do not loop. It plays pytest in the project:
|
|
32
|
+
// `uv run --locked --group test pytest`, the group `test` holding pytest and what the tests
|
|
33
|
+
// depend on, its JUnit report in the family `xunit1` (./verdict.mjs). A path, written from the
|
|
34
|
+
// root, chooses the project that holds it, and pytest plays that path alone; the paths of the
|
|
35
|
+
// variable `GRILLHOUSE_TESTS` that lie in the project replace the folder the script names. A path
|
|
36
|
+
// out of every project is refused, named, and nothing plays (code 2). The night tests
|
|
37
|
+
// (`*_nuit_test.py`, the one class out of the day: Python has no time budget bench) are left out
|
|
38
|
+
// of every folder, played whole or named (`--ignore-glob`), and a night test named is refused,
|
|
39
|
+
// named, and nothing plays (code 2), as the module cargo's: the night alone plays it. `--force` changes nothing here:
|
|
40
|
+
// pytest keeps no result to replay. Another option goes to pytest. A project played whole (its
|
|
41
|
+
// own folder named) whose pytest collects no test (code 5) is green, as `cargo test` on a crate
|
|
42
|
+
// without a test and the skeleton typescript's `passWithNoTests`; a path within the project that
|
|
43
|
+
// collects no test stays red, as a run whose paths name no test fails in every language.
|
|
44
|
+
// - `verifier` plays the typing and the tests of the projects as the tasks of Turborepo (`turbo run
|
|
45
|
+
// typecheck test:unit --filter=<projet>…`, the cache of the tasks selecting those that play
|
|
46
|
+
// again; `--tout` plays the tests for real, the moment of the pass in the variable
|
|
47
|
+
// `GRILLHOUSE_TESTS`). It keeps no green: the one pass of the verification keeps it
|
|
48
|
+
// (scripts/dernier-vert.mjs, scripts/langages/typescript/verifier.mjs). Beside the module of
|
|
49
|
+
// package.json, whose pass plays every task of the graph, the composed command sets
|
|
50
|
+
// `GRAPHE_JOUE` and `verifier` plays nothing again. It plays on a place of
|
|
51
|
+
// the machine and under its lock (`avecLaMachineEtUnePlace` of ./jointure), as the module cargo's. `verifier --gardes` plays
|
|
52
|
+
// the guards alone: the project's root scripts `grillhouse:gardes` then `gardes` the package.json
|
|
53
|
+
// holds.
|
|
38
54
|
// - `typer`: `uv run --locked python -m compileall`, the folders whose name begins with a dot (the
|
|
39
55
|
// `.venv`) left out. `preparer`: `uv sync --locked --group test`.
|
|
40
56
|
// - `tests-de-nuit`: pytest on the night tests of each package that holds some; none, nothing
|
|
41
57
|
// plays and the code is 0. The night (scripts/nuit.sh) runs it.
|
|
42
|
-
// -
|
|
43
|
-
//
|
|
58
|
+
// - `construire --echec <fichier> <plan>` is the launcher's build of the copy
|
|
59
|
+
// (scripts/enveloppe/lancer.sh), the core's one for every language
|
|
60
|
+
// (`construireDepuisLesArguments` of scripts/taches-du-graphe.mjs): the plan and its providers by
|
|
61
|
+
// `turbo run build --filter=<paquet>…`. `construire <chemin>` syncs one project, as the script
|
|
62
|
+
// `build` of its package.
|
|
63
|
+
// - `tests-du-paquet`, `tests-de-nuit`, `verifier`, `typer` and `preparer` play under a temporary
|
|
64
|
+
// directory of their pass, the guard of the temporary directory: a base (`ouvrirBase` of ./jointure) named in TMPDIR, TMP and TEMP, removed at the
|
|
44
65
|
// end of the pass, green, red or interrupted; what the tests left there fails the pass (code 1),
|
|
45
66
|
// each name written on the error stream, the lock files uv takes there (`uv-<hash>.lock`) apart,
|
|
46
67
|
// which the base removes with the rest. A test makes its temporary
|
|
@@ -67,16 +88,22 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
|
67
88
|
import { RESULTATS } from '../../resultats.mjs';
|
|
68
89
|
import {
|
|
69
90
|
AttenteDeLaMachine,
|
|
70
|
-
|
|
91
|
+
surUnePlace,
|
|
92
|
+
avecLaMachineEtUnePlace,
|
|
71
93
|
cacheDeCompilation,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
94
|
+
cheminsDeLaTache,
|
|
95
|
+
construireDepuisLesArguments,
|
|
96
|
+
GRAPHE_JOUE,
|
|
97
|
+
lancerLesTaches,
|
|
75
98
|
ligneDesRestes,
|
|
76
|
-
|
|
99
|
+
nomDuPaquet,
|
|
77
100
|
ouvrirBase,
|
|
78
101
|
retirerALInterruption,
|
|
102
|
+
SCRIPT_DES_TESTS,
|
|
103
|
+
testsCibles,
|
|
104
|
+
travailleursDeLaSeance,
|
|
79
105
|
} from '../../services-du-noyau.mjs';
|
|
106
|
+
import { TYPAGE } from '../../paquets.mjs';
|
|
80
107
|
import {
|
|
81
108
|
composantDans,
|
|
82
109
|
composants,
|
|
@@ -85,11 +112,20 @@ import {
|
|
|
85
112
|
GROUPE,
|
|
86
113
|
joueDesTests,
|
|
87
114
|
} from './composants.mjs';
|
|
88
|
-
import { touchesDesFichiers } from './lot.mjs';
|
|
89
115
|
import { JUNIT, TACHES } from './verdict.mjs';
|
|
90
116
|
|
|
91
117
|
const ICI = fileURLToPath(import.meta.url);
|
|
92
|
-
export const NOMS = [
|
|
118
|
+
export const NOMS = [
|
|
119
|
+
'tester',
|
|
120
|
+
'tests-du-paquet',
|
|
121
|
+
'verifier',
|
|
122
|
+
'typer',
|
|
123
|
+
'construire',
|
|
124
|
+
'preparer',
|
|
125
|
+
'tests-de-nuit',
|
|
126
|
+
];
|
|
127
|
+
// The task runner of the graph of the packages.
|
|
128
|
+
const OUTIL = 'turbo';
|
|
93
129
|
const A_REPASSER = 75;
|
|
94
130
|
const RACINE = '//';
|
|
95
131
|
/** The night tests, which the day leaves out. */
|
|
@@ -199,22 +235,20 @@ const UV_RUN = ['run', '--locked'];
|
|
|
199
235
|
// The code of pytest for « no tests collected », distinct from a failure (1).
|
|
200
236
|
const AUCUN_TEST = 5;
|
|
201
237
|
|
|
202
|
-
// The selection of pytest for the paths <chemins> of
|
|
203
|
-
// whole package): the night left out of every folder (`--ignore-glob`), as the module cargo's;
|
|
204
|
-
//
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
});
|
|
217
|
-
return [`--ignore-glob=${DE_NUIT}`, ...nommes];
|
|
238
|
+
// The selection of pytest for the paths <chemins> of a package, from its folder (empty: the
|
|
239
|
+
// whole package): the night left out of every folder (`--ignore-glob`), as the module cargo's; a
|
|
240
|
+
// night file named never reaches it (`choisir` refuses it).
|
|
241
|
+
function selection(chemins) {
|
|
242
|
+
return [`--ignore-glob=${DE_NUIT}`, ...chemins];
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Whether the pyproject of the package at <dossier> declares pytest-xdist, which `-n` needs.
|
|
246
|
+
function declareXdist(dossier) {
|
|
247
|
+
try {
|
|
248
|
+
return /pytest-xdist/.test(readFileSync(path.join(dossier, 'pyproject.toml'), 'utf8'));
|
|
249
|
+
} catch {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
218
252
|
}
|
|
219
253
|
|
|
220
254
|
// Plays pytest in the run <p> for each `{ c, chemins }` of <choix>, `chemins` from the package's
|
|
@@ -226,29 +260,20 @@ function jouerLesTests(p, choix, options) {
|
|
|
226
260
|
const cache = path.join(p.racine, CACHE_DE_PYTEST, path.relative(p.racine, c.dossier));
|
|
227
261
|
const args = [...UV_RUN, '--group', GROUPE, 'pytest', '-o', `cache_dir=${cache}`];
|
|
228
262
|
args.push(...p.junit(c.nom, c.dossier));
|
|
263
|
+
// The workers of a session of an agent (GRILLHOUSE_TRAVAILLEURS): `-n` of pytest-xdist, for a
|
|
264
|
+
// package whose test group declares it; a heavy pass, without the variable, plays alone.
|
|
265
|
+
const travailleurs = travailleursDeLaSeance(process.env);
|
|
266
|
+
if (travailleurs !== null && declareXdist(c.dossier)) {
|
|
267
|
+
args.push('-n', String(travailleurs));
|
|
268
|
+
}
|
|
229
269
|
const entier = chemins.every(ch => ch === '.');
|
|
230
270
|
p.jouer(
|
|
231
|
-
p.prevoir(c.nom, c.dossier, 'pytest', true, [...args, ...selection(
|
|
271
|
+
p.prevoir(c.nom, c.dossier, 'pytest', true, [...args, ...selection(chemins), ...options]),
|
|
232
272
|
entier ? [AUCUN_TEST] : []
|
|
233
273
|
);
|
|
234
274
|
}
|
|
235
275
|
}
|
|
236
276
|
|
|
237
|
-
// The packages the changes since the last green of <racine> touch; every package with <tout> or
|
|
238
|
-
// without a last green that counts. `{ choix, m }`, `m` the measure.
|
|
239
|
-
function depuisLeVert(racine, tous, tout, env) {
|
|
240
|
-
const m = mesure(racine, { tout, dans: env.TMPDIR });
|
|
241
|
-
process.stderr.write(`${m.ligne}\n`);
|
|
242
|
-
const f = m.env[CHANGEMENTS];
|
|
243
|
-
if (!f) {
|
|
244
|
-
return { choix: tous, m };
|
|
245
|
-
}
|
|
246
|
-
const ch = JSON.parse(readFileSync(f, 'utf8'));
|
|
247
|
-
const t = touchesDesFichiers(racine, [...ch.fichiers, ...ch.supprimes]);
|
|
248
|
-
const nommes = new Set(t.touches.map(c => c.dossier));
|
|
249
|
-
return { choix: tous.filter(c => nommes.has(c.dossier)), m };
|
|
250
|
-
}
|
|
251
|
-
|
|
252
277
|
// The packages the paths <chemins> choose in <racine>: `{ choix }`, or `{ refus }`.
|
|
253
278
|
function choisir(racine, tous, chemins) {
|
|
254
279
|
const parDossier = new Map();
|
|
@@ -259,6 +284,13 @@ function choisir(racine, tous, chemins) {
|
|
|
259
284
|
refus.push(`${chemin} : hors de tout paquet Python (pyproject.toml)`);
|
|
260
285
|
continue;
|
|
261
286
|
}
|
|
287
|
+
// A night test plays at night alone (`tests-de-nuit`): a targeted run refuses it, named.
|
|
288
|
+
if (estDeNuit(path.basename(chemin))) {
|
|
289
|
+
refus.push(
|
|
290
|
+
`${chemin} : un test de nuit se joue la nuit seulement (npx grillhouse nuit le joue)`
|
|
291
|
+
);
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
262
294
|
const rel = path.relative(c.dossier, path.resolve(racine, chemin)) || '.';
|
|
263
295
|
const deja = parDossier.get(c.dossier) ?? { c, chemins: [] };
|
|
264
296
|
deja.chemins.push(rel);
|
|
@@ -267,12 +299,40 @@ function choisir(racine, tous, chemins) {
|
|
|
267
299
|
return refus.length ? { refus } : { choix: [...parDossier.values()] };
|
|
268
300
|
}
|
|
269
301
|
|
|
270
|
-
// The
|
|
302
|
+
// The graph packages of the projects <projets>: `{ noms, absents }`, the names of those that are
|
|
303
|
+
// packages of the graph, and the names of the projects that are not.
|
|
304
|
+
function nomsDuGraphe(racine, projets) {
|
|
305
|
+
const noms = new Set();
|
|
306
|
+
const absents = [];
|
|
307
|
+
for (const c of projets) {
|
|
308
|
+
const nom = nomDuPaquet(racine, c.dossier);
|
|
309
|
+
if (nom === null) {
|
|
310
|
+
absents.push(c.nom);
|
|
311
|
+
} else {
|
|
312
|
+
noms.add(nom);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return { noms, absents };
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Says, on the error stream, each project of <absents> that is no package of the graph: its tests
|
|
319
|
+
// do not play, as a package without a `package.json` is out of Turborepo's tasks.
|
|
320
|
+
function direLesAbsents(absents) {
|
|
321
|
+
for (const nom of absents) {
|
|
322
|
+
process.stderr.write(
|
|
323
|
+
`⚠️ ${nom} : pas un paquet du graphe (package.json absent) ; ses tests ne se jouent pas : npx grillhouse maj\n`
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// The pass of `tester` in <racine>, its arguments <args>, under <env>: the tasks `test:unit` of the
|
|
329
|
+
// projects the paths choose (every project that plays tests without a path) as Turborepo's, the
|
|
330
|
+
// exit code its.
|
|
271
331
|
function tester(racine, args, env) {
|
|
272
|
-
const p = passe(racine, env);
|
|
273
332
|
const tous = composants(racine);
|
|
274
333
|
const chemins = args.filter(a => !a.startsWith('-'));
|
|
275
334
|
const options = args.filter(a => a.startsWith('-') && a !== '--force');
|
|
335
|
+
let choisis = tous.filter(c => joueDesTests(racine, c));
|
|
276
336
|
if (chemins.length) {
|
|
277
337
|
const r = choisir(racine, tous, chemins);
|
|
278
338
|
if (r.refus) {
|
|
@@ -281,48 +341,83 @@ function tester(racine, args, env) {
|
|
|
281
341
|
}
|
|
282
342
|
return 2;
|
|
283
343
|
}
|
|
284
|
-
|
|
285
|
-
return p.code();
|
|
344
|
+
choisis = r.choix.map(x => x.c);
|
|
286
345
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
346
|
+
const { noms, absents } = nomsDuGraphe(racine, choisis);
|
|
347
|
+
if (chemins.length && absents.length) {
|
|
348
|
+
process.stderr.write(
|
|
349
|
+
`⛔ ${absents.join(', ')} : pas un paquet du graphe (package.json absent) : npx grillhouse maj\n`
|
|
350
|
+
);
|
|
351
|
+
return 2;
|
|
291
352
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
|
|
353
|
+
direLesAbsents(absents);
|
|
354
|
+
if (noms.size === 0) {
|
|
355
|
+
return 0;
|
|
356
|
+
}
|
|
357
|
+
return lancerLesTaches({
|
|
358
|
+
outil: OUTIL,
|
|
359
|
+
racine,
|
|
360
|
+
taches: [SCRIPT_DES_TESTS],
|
|
361
|
+
noms,
|
|
362
|
+
tests: testsCibles({
|
|
363
|
+
arguments: [...chemins.map(c => path.resolve(racine, c)), ...options],
|
|
364
|
+
force: args.includes('--force'),
|
|
365
|
+
}),
|
|
366
|
+
env,
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// The pass of `tests-du-paquet` in <racine>, its arguments <args>, under <env>: the body of the task
|
|
371
|
+
// `test:unit` of a project. The paths its script names, completed by those of the variable of the
|
|
372
|
+
// task that lie in the same project.
|
|
373
|
+
function testsDuPaquet(racine, args, env) {
|
|
374
|
+
const tous = composants(racine);
|
|
375
|
+
const donnes = args.filter(a => !a.startsWith('-'));
|
|
376
|
+
if (donnes.length === 0) {
|
|
377
|
+
process.stderr.write(
|
|
378
|
+
'⛔ tests-du-paquet : aucun chemin (un dossier de projet, ou un fichier de test).\n'
|
|
379
|
+
);
|
|
380
|
+
return 2;
|
|
381
|
+
}
|
|
382
|
+
const dossierDe = abs => composantDans(tous, racine, abs)?.dossier ?? null;
|
|
383
|
+
const { chemins, options } = cheminsDeLaTache({ racine, donnes, env, dossierDe });
|
|
384
|
+
const r = choisir(racine, tous, chemins);
|
|
385
|
+
if (r.refus) {
|
|
386
|
+
for (const l of r.refus) {
|
|
387
|
+
process.stderr.write(`⛔ ${l}\n`);
|
|
388
|
+
}
|
|
389
|
+
return 2;
|
|
297
390
|
}
|
|
391
|
+
const p = passe(racine, env);
|
|
392
|
+
jouerLesTests(p, r.choix, [...args.filter(a => a.startsWith('-')), ...options]);
|
|
298
393
|
return p.code();
|
|
299
394
|
}
|
|
300
395
|
|
|
301
396
|
// The pass of `verifier` in <racine>, under the lock of the machine: the typing and the tests of
|
|
302
|
-
// the
|
|
397
|
+
// the projects as tasks of Turborepo (the tests played for real with <args> `--tout`). It keeps no
|
|
398
|
+
// green.
|
|
303
399
|
function verifier(racine, args, env) {
|
|
304
|
-
const p = passe(racine, env);
|
|
305
400
|
if (args.includes('--gardes')) {
|
|
306
|
-
return gardes(racine,
|
|
401
|
+
return gardes(racine, passe(racine, env));
|
|
307
402
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
[]
|
|
317
|
-
);
|
|
318
|
-
const code = p.code();
|
|
319
|
-
if (code === 0 && m.etat) {
|
|
320
|
-
garderLeVert(m.etat);
|
|
321
|
-
}
|
|
322
|
-
return code;
|
|
323
|
-
} finally {
|
|
324
|
-
m.retirer();
|
|
403
|
+
// Beside the module of package.json (composed command), its pass has played the tasks.
|
|
404
|
+
if (env[GRAPHE_JOUE]) {
|
|
405
|
+
return 0;
|
|
406
|
+
}
|
|
407
|
+
const { noms, absents } = nomsDuGraphe(racine, composants(racine));
|
|
408
|
+
direLesAbsents(absents);
|
|
409
|
+
if (noms.size === 0) {
|
|
410
|
+
return 0;
|
|
325
411
|
}
|
|
412
|
+
const code = lancerLesTaches({
|
|
413
|
+
outil: OUTIL,
|
|
414
|
+
racine,
|
|
415
|
+
taches: [TYPAGE, SCRIPT_DES_TESTS],
|
|
416
|
+
noms,
|
|
417
|
+
tests: testsCibles({ arguments: [], force: args.includes('--tout') }),
|
|
418
|
+
env,
|
|
419
|
+
});
|
|
420
|
+
return code === 0 ? 0 : 1;
|
|
326
421
|
}
|
|
327
422
|
|
|
328
423
|
// The typing of the package <c> in the run <p>: compileall, the folders of a dot left out.
|
|
@@ -390,7 +485,10 @@ function sousLaBase(genre, env, jouer) {
|
|
|
390
485
|
*/
|
|
391
486
|
export function lancer(nom, args, { racine = process.cwd(), env = process.env } = {}) {
|
|
392
487
|
if (nom === 'tester') {
|
|
393
|
-
return
|
|
488
|
+
return surUnePlace(e => tester(racine, args, e), { env });
|
|
489
|
+
}
|
|
490
|
+
if (nom === 'tests-du-paquet') {
|
|
491
|
+
return sousLaBase('tests', env, e => testsDuPaquet(racine, args, e));
|
|
394
492
|
}
|
|
395
493
|
if (nom === 'tests-de-nuit') {
|
|
396
494
|
return sousLaBase('tests', env, e => {
|
|
@@ -411,7 +509,7 @@ export function lancer(nom, args, { racine = process.cwd(), env = process.env }
|
|
|
411
509
|
const dire = l => process.stdout.write(`${l}\n`);
|
|
412
510
|
try {
|
|
413
511
|
return sousLaBase('verification', env, envBase =>
|
|
414
|
-
|
|
512
|
+
avecLaMachineEtUnePlace(envMachine => verifier(racine, args, envMachine), {
|
|
415
513
|
env: envBase,
|
|
416
514
|
racine,
|
|
417
515
|
dire,
|
|
@@ -425,10 +523,30 @@ export function lancer(nom, args, { racine = process.cwd(), env = process.env }
|
|
|
425
523
|
return e.code;
|
|
426
524
|
}
|
|
427
525
|
}
|
|
428
|
-
|
|
526
|
+
// The launcher's `construire` (`--echec <fichier> <plan>`, scripts/enveloppe/lancer.sh) builds
|
|
527
|
+
// the copy for a session, the plan and its providers, as every language's.
|
|
528
|
+
if (nom === 'construire' && args.includes('--echec')) {
|
|
529
|
+
return construireDepuisLesArguments(OUTIL, args, racine);
|
|
530
|
+
}
|
|
531
|
+
if (nom === 'typer' || nom === 'preparer' || nom === 'construire') {
|
|
532
|
+
// `construire` and `typer` with a path: the one project of that folder, as Turborepo's task of
|
|
533
|
+
// one package; `typer` alone types them all, `preparer` syncs them all.
|
|
534
|
+
let choisis = composants(racine);
|
|
535
|
+
if (nom === 'construire' || (nom === 'typer' && args.length)) {
|
|
536
|
+
const [chemin, ...autres] = args;
|
|
537
|
+
const abs = chemin === undefined ? null : path.resolve(racine, chemin);
|
|
538
|
+
const c = abs === null ? undefined : choisis.find(x => x.dossier === abs);
|
|
539
|
+
if (!c || autres.length) {
|
|
540
|
+
process.stderr.write(
|
|
541
|
+
`⛔ ${nom} : ${chemin ?? 'aucun chemin'} ne désigne pas un projet Python (un dossier de pyproject.toml, une fois).\n`
|
|
542
|
+
);
|
|
543
|
+
return 2;
|
|
544
|
+
}
|
|
545
|
+
choisis = [c];
|
|
546
|
+
}
|
|
429
547
|
return sousLaBase('tests', env, e => {
|
|
430
548
|
const p = passe(racine, e);
|
|
431
|
-
for (const c of
|
|
549
|
+
for (const c of choisis) {
|
|
432
550
|
if (nom === 'typer') {
|
|
433
551
|
typerLePaquet(p, c);
|
|
434
552
|
} else {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The components of a project of Python, as uv finds a project (PEP 621, `pyproject.toml`): the
|
|
2
2
|
// packages the module python answers the join with (scripts/jointure.d.ts, `composants`,
|
|
3
|
-
// `composantDe`, `matieres`, `joueDesTests`, `lecteurs`, `estUnTest`, `
|
|
3
|
+
// `composantDe`, `matieres`, `joueDesTests`, `lecteurs`, `estUnTest`, `arbreDAvant`, `manifestes`,
|
|
4
4
|
// `entreesDeLIndex`).
|
|
5
5
|
//
|
|
6
6
|
// - A component is a folder that holds a pyproject.toml, found under the root, the folders whose
|
|
@@ -19,10 +19,9 @@
|
|
|
19
19
|
// any file under a folder `tests/` of a component, his helpers and his data. Of the manifests
|
|
20
20
|
// (`manifestes`): the group `test` of the table `[dependency-groups]` of a pyproject.toml (PEP
|
|
21
21
|
// 735), what the tests depend on, and the uv.lock of a component, which uv brings in line with
|
|
22
|
-
// it; a change of any other part of a pyproject.toml is named by it.
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
// `<nom>_circuit_avant_nuit_test.py`. The pyproject.toml is read
|
|
22
|
+
// it; a change of any other part of a pyproject.toml is named by it. HEAD's version of a test
|
|
23
|
+
// file (`arbreDAvant`) plays in a tree of its own, under the file's name, which the proof of the
|
|
24
|
+
// red builds. The pyproject.toml is read
|
|
26
25
|
// with smol-toml, a tool of this module (`outils`), an optional peer of the package loaded when a
|
|
27
26
|
// manifest is judged.
|
|
28
27
|
// - The readers of a package: none read by the module (a dependency between two packages of
|
|
@@ -148,23 +147,12 @@ export function estUnTest(chemin, racine) {
|
|
|
148
147
|
}
|
|
149
148
|
|
|
150
149
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* beside a night test `<nom>_nuit_test.py`, so that it stays one; a name pytest collects by
|
|
155
|
-
* default (`python_files`), its tests named in its report as the file's; null for a file pytest
|
|
156
|
-
* does not play.
|
|
150
|
+
* Whether HEAD's version of the test file <chemin> (from <racine>) plays in a tree of its own,
|
|
151
|
+
* under the file's own name, so that its tests are named in its report as the file's, of its
|
|
152
|
+
* kind (day, night); false for a file pytest does not play.
|
|
157
153
|
*/
|
|
158
|
-
export function
|
|
159
|
-
|
|
160
|
-
return null;
|
|
161
|
-
}
|
|
162
|
-
if (estDeNuit(path.basename(chemin))) {
|
|
163
|
-
return chemin.replace(/_nuit_test\.py$/, '_circuit_avant_nuit_test.py');
|
|
164
|
-
}
|
|
165
|
-
return chemin.endsWith('_test.py')
|
|
166
|
-
? chemin.replace(/_test\.py$/, '_circuit_avant_test.py')
|
|
167
|
-
: chemin.replace(/\.py$/, '_circuit_avant.py');
|
|
154
|
+
export function arbreDAvant(chemin, racine) {
|
|
155
|
+
return Boolean(estUnTest(chemin, racine)?.joue);
|
|
168
156
|
}
|
|
169
157
|
|
|
170
158
|
// The parts of the parsed manifests <a> and <b> that differ, out of the group of the tests: each
|
|
@@ -224,6 +212,50 @@ function horsDesTests(chemin, racine, avant, apres) {
|
|
|
224
212
|
/** What the testwriter writes of the manifests (scripts/jointure.d.ts, `manifestes`). */
|
|
225
213
|
export const manifestes = { verrous: [VERROU], horsDesTests };
|
|
226
214
|
|
|
215
|
+
/**
|
|
216
|
+
* The name a pyproject.toml <texte> gives its project: the `name` of its `[project]`; null for none.
|
|
217
|
+
* @param {string} texte
|
|
218
|
+
*/
|
|
219
|
+
export function nomDuManifeste(texte) {
|
|
220
|
+
let section = null;
|
|
221
|
+
for (const l of texte.split('\n')) {
|
|
222
|
+
const s = /^\s*\[([^\]]+)\]\s*(?:#.*)?$/.exec(l);
|
|
223
|
+
if (s) {
|
|
224
|
+
section = s[1].trim();
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
const n = /^\s*name\s*=\s*["']([^"']+)["']/.exec(l);
|
|
228
|
+
if (section === 'project' && n) {
|
|
229
|
+
return n[1];
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* The internal dependencies of the project at <chemin> (from <racine>): each entry of
|
|
237
|
+
* `[tool.uv.sources]` with a `path` (named by <nomA> of the folder there, else by its key) or
|
|
238
|
+
* `workspace = true` (named by its key).
|
|
239
|
+
* @param {string} racine
|
|
240
|
+
* @param {string} chemin
|
|
241
|
+
* @param {(dossier: string) => string | null} nomA
|
|
242
|
+
*/
|
|
243
|
+
export function liensDuManifeste(racine, chemin, nomA) {
|
|
244
|
+
const { parse } = require('smol-toml');
|
|
245
|
+
const dossier = path.join(racine, chemin);
|
|
246
|
+
const f = path.join(dossier, MANIFESTE);
|
|
247
|
+
const m = existsSync(f) ? parse(readFileSync(f, 'utf8')) : {};
|
|
248
|
+
const noms = new Set();
|
|
249
|
+
for (const [cle, spec] of Object.entries(m.tool?.uv?.sources ?? {})) {
|
|
250
|
+
if (typeof spec?.path === 'string') {
|
|
251
|
+
noms.add(nomA(path.resolve(dossier, spec.path)) ?? cle);
|
|
252
|
+
} else if (spec?.workspace === true) {
|
|
253
|
+
noms.add(cle);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return { noms: [...noms], table: '[tool.uv.sources]', outil: 'uv' };
|
|
257
|
+
}
|
|
258
|
+
|
|
227
259
|
/** The readers of the packages <noms>: none; a name no component bears, without provider. */
|
|
228
260
|
export function lecteurs(_racine, { composants: liste, noms }) {
|
|
229
261
|
const elements = [];
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
// - A project of two packages, declared python in its architecture: `site` (its project
|
|
6
6
|
// `generateur`, a test of the day `pages/test_pages.py`, a night test, a `conftest.py`, its
|
|
7
7
|
// interface) and `outil` (its project `outil`, no test); the root's interface, and the index of
|
|
8
|
-
// the interfaces they give, up to date. Committed: `projet`; the same
|
|
9
|
-
// changed and a file out of every package added: `change`, measured from its commit; the same
|
|
8
|
+
// the interfaces they give, up to date. Committed: `projet`; the same
|
|
10
9
|
// with a second commit that changes `site`, adds the package `neuf` and removes `outil`: `lot`;
|
|
11
10
|
// the same, the interface of `site` then changed, its index late: `enRetard`.
|
|
12
11
|
// - A directory without pyproject.toml: `vide`.
|
|
@@ -129,10 +128,6 @@ export default {
|
|
|
129
128
|
const aJour = projet(dans);
|
|
130
129
|
const vide = mkdtempSync(path.join(dans, 'vide-'));
|
|
131
130
|
writeFileSync(path.join(vide, 'README.md'), 'aucun paquet\n');
|
|
132
|
-
const change = projet(dans);
|
|
133
|
-
const depuis = tete(change);
|
|
134
|
-
writeFileSync(path.join(change, 'site/pages/generer.py'), 'def generer():\n return 2\n');
|
|
135
|
-
writeFileSync(path.join(change, 'notes.txt'), 'hors des paquets\n');
|
|
136
131
|
const lot = projet(dans);
|
|
137
132
|
const avantLeLot = tete(lot);
|
|
138
133
|
const ecrireLot = ecrireDans(lot);
|
|
@@ -150,7 +145,7 @@ export default {
|
|
|
150
145
|
const site = path.join(aJour, 'site');
|
|
151
146
|
return {
|
|
152
147
|
racine: aJour,
|
|
153
|
-
depots: { projet: aJour,
|
|
148
|
+
depots: { projet: aJour, lot, avantLeLot, enRetard, vide },
|
|
154
149
|
composants: {
|
|
155
150
|
valide: vide,
|
|
156
151
|
invalide: aJour,
|
|
@@ -173,11 +168,6 @@ export default {
|
|
|
173
168
|
invalide: { racine: aJour, noms: ['generateur', 'absent'] },
|
|
174
169
|
attendu: ['absent : sans fournisseur'],
|
|
175
170
|
},
|
|
176
|
-
touches: {
|
|
177
|
-
valide: { racine: aJour, depuis: 'HEAD' },
|
|
178
|
-
invalide: { racine: change, depuis },
|
|
179
|
-
attendu: ['touché site', 'hors notes.txt'],
|
|
180
|
-
},
|
|
181
171
|
commandes: {
|
|
182
172
|
valide: ['tester', 'verifier', 'typer', 'preparer', 'tests-de-nuit', 'index-interfaces'],
|
|
183
173
|
invalide: ['tester', 'deployer'],
|
|
@@ -234,16 +224,16 @@ export default {
|
|
|
234
224
|
'site/tests/donnees.json',
|
|
235
225
|
'README.md',
|
|
236
226
|
],
|
|
237
|
-
// A
|
|
227
|
+
// A test file plays in a tree, under its own name, a night test as a night test.
|
|
238
228
|
invalide: [
|
|
239
229
|
'site/pages/test_pages.py',
|
|
240
230
|
'site/pages/pages_test.py',
|
|
241
231
|
'site/pages/site_nuit_test.py',
|
|
242
232
|
],
|
|
243
233
|
attendu: [
|
|
244
|
-
'site/pages/test_pages.py →
|
|
245
|
-
'site/pages/pages_test.py →
|
|
246
|
-
'site/pages/site_nuit_test.py →
|
|
234
|
+
'site/pages/test_pages.py → un arbre',
|
|
235
|
+
'site/pages/pages_test.py → un arbre',
|
|
236
|
+
'site/pages/site_nuit_test.py → un arbre',
|
|
247
237
|
],
|
|
248
238
|
},
|
|
249
239
|
fichiersEngendres: {
|