@tricoteuses/assemblee 3.3.5 → 3.3.7
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/lib/{amendements-C_aR-BVu.js → amendements-Co_qQeCl.js} +1 -1
- package/lib/{amendements-Cpku2Ut-.js → amendements-s-5GIY_X.js} +7 -7
- package/lib/cleaners.js +3 -3
- package/lib/index.js +2 -2
- package/lib/{loaders-DQJLtTmE.js → loaders-Bdc1oCGG.js} +2 -2
- package/lib/loaders.js +1 -1
- package/lib/open_data/artifacts.d.ts +9 -0
- package/lib/parsers/compte_rendu_commission.d.ts +1 -1
- package/lib/parsers/compte_rendu_commission.test.d.ts +1 -0
- package/lib/parsers.js +2 -2
- package/lib/registries.d.ts +8 -8
- package/lib/schemas/clean/acteurs_et_organes.d.ts +37 -37
- package/lib/schemas/clean/amendements.d.ts +12 -12
- package/lib/schemas/clean/debats.d.ts +26 -26
- package/lib/schemas/clean/dossiers_legislatifs.d.ts +16 -16
- package/lib/schemas/clean/questions.d.ts +122 -122
- package/lib/schemas/clean/scrutins.d.ts +2 -2
- package/lib/schemas/enriched/acteurs_et_organes.d.ts +2 -2
- package/lib/schemas/enriched/amendements.d.ts +9 -9
- package/lib/schemas/enriched/dossiers_legislatifs.d.ts +12 -12
- package/lib/schemas/enriched/questions.d.ts +108 -108
- package/lib/schemas/enriched/scrutins.d.ts +2 -2
- package/lib/schemas/raw/acteurs_et_organes.d.ts +132 -132
- package/lib/schemas/raw/agendas.d.ts +97 -97
- package/lib/schemas/raw/amendements.d.ts +83 -83
- package/lib/schemas/raw/debats.d.ts +51 -51
- package/lib/schemas/raw/dossiers_legislatifs.d.ts +171 -171
- package/lib/schemas/raw/questions.d.ts +222 -222
- package/lib/schemas/raw/scrutins.d.ts +164 -164
- package/lib/scripts/cr_commissions_status.d.ts +29 -0
- package/lib/scripts/cr_commissions_status.test.d.ts +1 -0
- package/lib/scripts/data-download.d.ts +1 -1
- package/lib/scripts/data-download.test.d.ts +1 -0
- package/lib/scripts/retrieve_open_data.d.ts +12 -0
- package/lib/{scrutins-BmIhL1xc.js → scrutins-UjCZmd8a.js} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const STATUS_FILENAME = "dataset_status.json";
|
|
2
|
+
export declare const MAX_ERROR_LENGTH = 2000;
|
|
3
|
+
/** A commission report fetch is considered failed if at least this ratio of
|
|
4
|
+
* the fetches failed during one agenda cleaning run. Below that, isolated
|
|
5
|
+
* misses (report not yet published, transient parsing issue) are tolerated:
|
|
6
|
+
* the next run fetches them again. */
|
|
7
|
+
export declare const CR_COMMISSIONS_FAILURE_RATIO_THRESHOLD = 0.1;
|
|
8
|
+
export type CrCommissionsStats = {
|
|
9
|
+
attempts: number;
|
|
10
|
+
failures: number;
|
|
11
|
+
};
|
|
12
|
+
export type DatasetStatusEntry = {
|
|
13
|
+
status: "ok" | "failed";
|
|
14
|
+
lastRunAt: string;
|
|
15
|
+
lastSuccessAt?: string;
|
|
16
|
+
lastFailureAt?: string;
|
|
17
|
+
lastError?: string;
|
|
18
|
+
consecutiveFailures: number;
|
|
19
|
+
firstFailureAt?: string;
|
|
20
|
+
};
|
|
21
|
+
export type DatasetStatusFile = Record<string, DatasetStatusEntry>;
|
|
22
|
+
export declare function resetCrCommissionsStats(): void;
|
|
23
|
+
export declare function getCrCommissionsStats(): CrCommissionsStats;
|
|
24
|
+
export declare function recordCrCommissionFetch(success: boolean): void;
|
|
25
|
+
export declare function crCommissionsDatasetFailed(threshold?: number): boolean;
|
|
26
|
+
/** Record the outcome of one agenda cleaning run for the CR commissions
|
|
27
|
+
* dataset of the given legislature. Nothing is written when no report was
|
|
28
|
+
* fetched: an empty run must not reset or create a status. */
|
|
29
|
+
export declare function writeCrCommissionsDatasetStatus(dataDir: string, legislature: number): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function dataDirArg(argv: string[]): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -119,4 +119,16 @@ export declare function recoverPublication(dataPath: string): Promise<void>;
|
|
|
119
119
|
* @returns {Promise<void>} A promise that resolves when the dataset processing is complete.
|
|
120
120
|
*/
|
|
121
121
|
export declare function processDataset({ dataset, dataDir, options, }: ProcessDatasetArguments): Promise<void>;
|
|
122
|
+
export type DatasetStatusEntry = {
|
|
123
|
+
status: "ok" | "failed";
|
|
124
|
+
lastRunAt: string;
|
|
125
|
+
lastSuccessAt?: string;
|
|
126
|
+
lastFailureAt?: string;
|
|
127
|
+
lastError?: string;
|
|
128
|
+
consecutiveFailures: number;
|
|
129
|
+
firstFailureAt?: string;
|
|
130
|
+
};
|
|
131
|
+
export declare function updateDatasetStatusFile(dataDir: string, chosenDatasets: Array<{
|
|
132
|
+
name: string;
|
|
133
|
+
}>, results: PromiseSettledResult<unknown>[]): Promise<void>;
|
|
122
134
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, Q as t, X as n, Y as r, Z as i, et as a, nt as o, rt as s, tt as c } from "./amendements-
|
|
1
|
+
import { $ as e, Q as t, X as n, Y as r, Z as i, et as a, nt as o, rt as s, tt as c } from "./amendements-s-5GIY_X.js";
|
|
2
2
|
import { z as l } from "zod";
|
|
3
3
|
//#region src/legislatures.ts
|
|
4
4
|
var ee = /* @__PURE__ */ function(e) {
|