@tricoteuses/assemblee 2.5.2 → 2.5.4
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/LICENSE.md +28 -28
- package/README.md +152 -152
- package/lib/schemas/compte_rendu_commission/CompteRenduCommission.json +63 -63
- package/lib/schemas/debats.json +1 -1
- package/package.json +126 -126
package/LICENSE.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# Tricoteuses-Assemblee
|
|
2
|
-
|
|
3
|
-
## _Retrieve, clean up & handle French Assemblée nationale's open data_
|
|
4
|
-
|
|
5
|
-
By:
|
|
6
|
-
* Henry Boisgibault <mailto:h.boisgibault@gmail.com>
|
|
7
|
-
* Loïc Dachary <mailto:loic@dachary.org>
|
|
8
|
-
* Emmanuel Raviart <mailto:emmanuel@raviart.com>
|
|
9
|
-
|
|
10
|
-
Copyright:
|
|
11
|
-
* © 2019, 2020, 2021 Loïc Dachary & Emmanuel Raviart
|
|
12
|
-
* © 2022 Emmanuel Raviart
|
|
13
|
-
* © 2023 Henry Boisgibault & Emmanuel Raviart
|
|
14
|
-
|
|
15
|
-
https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee
|
|
16
|
-
|
|
17
|
-
> Tricoteuses-Assemblee is free software; you can redistribute it and/or modify
|
|
18
|
-
> it under the terms of the GNU Affero General Public License as
|
|
19
|
-
> published by the Free Software Foundation, either version 3 of the
|
|
20
|
-
> License, or (at your option) any later version.
|
|
21
|
-
>
|
|
22
|
-
> Tricoteuses-Assemblee is distributed in the hope that it will be useful,
|
|
23
|
-
> but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24
|
-
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
25
|
-
> GNU Affero General Public License for more details.
|
|
26
|
-
>
|
|
27
|
-
> You should have received a copy of the GNU Affero General Public License
|
|
28
|
-
> along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
1
|
+
# Tricoteuses-Assemblee
|
|
2
|
+
|
|
3
|
+
## _Retrieve, clean up & handle French Assemblée nationale's open data_
|
|
4
|
+
|
|
5
|
+
By:
|
|
6
|
+
* Henry Boisgibault <mailto:h.boisgibault@gmail.com>
|
|
7
|
+
* Loïc Dachary <mailto:loic@dachary.org>
|
|
8
|
+
* Emmanuel Raviart <mailto:emmanuel@raviart.com>
|
|
9
|
+
|
|
10
|
+
Copyright:
|
|
11
|
+
* © 2019, 2020, 2021 Loïc Dachary & Emmanuel Raviart
|
|
12
|
+
* © 2022 Emmanuel Raviart
|
|
13
|
+
* © 2023 Henry Boisgibault & Emmanuel Raviart
|
|
14
|
+
|
|
15
|
+
https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee
|
|
16
|
+
|
|
17
|
+
> Tricoteuses-Assemblee is free software; you can redistribute it and/or modify
|
|
18
|
+
> it under the terms of the GNU Affero General Public License as
|
|
19
|
+
> published by the Free Software Foundation, either version 3 of the
|
|
20
|
+
> License, or (at your option) any later version.
|
|
21
|
+
>
|
|
22
|
+
> Tricoteuses-Assemblee is distributed in the hope that it will be useful,
|
|
23
|
+
> but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24
|
+
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
25
|
+
> GNU Affero General Public License for more details.
|
|
26
|
+
>
|
|
27
|
+
> You should have received a copy of the GNU Affero General Public License
|
|
28
|
+
> along with this program. If not, see <http://www.gnu.org/licenses/>.
|
package/README.md
CHANGED
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
# Tricoteuses-Assemblee
|
|
2
|
-
|
|
3
|
-
## _Retrieve, clean up & handle French Assemblée nationale's open data_
|
|
4
|
-
|
|
5
|
-
_Tricoteuses Légifrance_ is free and open source software.
|
|
6
|
-
|
|
7
|
-
- [software repository](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee)
|
|
8
|
-
- [GNU Affero General Public License version 3 or greater](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/-/tree/master/LICENSE.md)
|
|
9
|
-
|
|
10
|
-
## documentation
|
|
11
|
-
|
|
12
|
-
- [Architecture](doc/architecture.md)
|
|
13
|
-
- [TypeScript API](doc/api/)
|
|
14
|
-
- Main interfaces:
|
|
15
|
-
- [Acteur : personne physique élue ou nommée dans des organes](doc/api/README/interfaces/Acteur.md)
|
|
16
|
-
- [Amendement](doc/api/README/interfaces/Amendement.md)
|
|
17
|
-
- [CompteRendu : compte-rendu d'un débat parlementaire](doc/api/README/interfaces/CompteRendu.md)
|
|
18
|
-
- [Document : texte d'un projet de loi, d'une proposition de loi, d'un rapport, etc](doc/api/README/interfaces/Document.md)
|
|
19
|
-
- [DossierParlementaire : Dossier de suivi d'un projet ou d'une proposition de loi, d'une résolution, etc](doc/api/README/interfaces/DossierParlementaire.md)
|
|
20
|
-
- [Organe : commission, groupe politique, groupe d'étude, groupe d'amitié, etc](doc/api/README/interfaces/Organe.md)
|
|
21
|
-
- [Question : question au Gouvernement](doc/api/README/interfaces/Question.md)
|
|
22
|
-
- [Reunion : séance publique, réunion de commission, de groupe d'étude, etc](doc/api/README/interfaces/Reunion.md)
|
|
23
|
-
- [Scrutin : vote de chaque député lors d'un scrutin public](doc/api/README/interfaces/Scrutin.md)
|
|
24
|
-
- [JSON Schemas](src/schemas)
|
|
25
|
-
|
|
26
|
-
## Requirements
|
|
27
|
-
|
|
28
|
-
- Node >= 18
|
|
29
|
-
|
|
30
|
-
## Installation
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
git clone https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee
|
|
34
|
-
cd tricoteuses-assemblee/
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npm install
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Download and clean data
|
|
42
|
-
|
|
43
|
-
### Basic usage
|
|
44
|
-
|
|
45
|
-
Create a directory to store the data, then run the following command to download, reorganize and clean the data.
|
|
46
|
-
```bash
|
|
47
|
-
mkdir ../assemblee-data/
|
|
48
|
-
npm run data:download ../assemblee-data
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Available Commands
|
|
52
|
-
|
|
53
|
-
- `npm run data:download <dir>`: Download, reorganize, and clean data
|
|
54
|
-
- `npm run data:retrieve_open_data <dir>`: Download raw data files.
|
|
55
|
-
- `npm run data:reorganize_data <dir>`: Reorganize raw files by entity.
|
|
56
|
-
- `npm run data:clean_data <dir>`: Clean and validate reorganized files.
|
|
57
|
-
- `npm run data:retrieve_deputes_photos <dir>`: Retrieval of députés' pictures from Assemblée nationale's website
|
|
58
|
-
- `npm run data:retrieve_senateurs_photos <dir>`: Retrieval of sénateurs' pictures from Assemblée nationale's website
|
|
59
|
-
- `npm run data:retrieve_documents <dir>`: Retrieval of legislative documents from Assemblée nationale's website
|
|
60
|
-
- `npm run data:retrieve_pending_amendements <dir>`: Retrieval of pending amendments from Assemblée nationale's website (waiting to be processed by Assemblée services)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_Notes_:
|
|
64
|
-
|
|
65
|
-
- Reorganized files (generated by the _data:reorganize_data_ command) are also available in [Tricoteuses / Data / Données brutes de l'Assemblée](https://git.en-root.org/tricoteuses/data/assemblee-brut). They are updated on a regular basis.
|
|
66
|
-
- Split & cleaned files (generated by the _data:clean_data_ command) are also available in [Tricoteuses / Data / Données nettoyées de l'Assemblée](https://git.en-root.org/tricoteuses/data/assemblee-nettoye) with the `_nettoye` suffix. They are updated on a regular basis.
|
|
67
|
-
|
|
68
|
-
### Filtering Options
|
|
69
|
-
|
|
70
|
-
Downloading and cleaning all the data is long and takes up a lot of disk space. It is possible to choose the type of data that you want to retrieve to reduce the load.
|
|
71
|
-
|
|
72
|
-
Examples:
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
# Only download amendments
|
|
76
|
-
npm run data:download ../assemblee-data -- -k Amendements
|
|
77
|
-
|
|
78
|
-
# Only process 16th and 17th legislatures
|
|
79
|
-
npm run data:download ../assemblee-data -- -l 16 -l 17
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Common Options
|
|
83
|
-
|
|
84
|
-
- `--categories` or `-k <name>`: Filter by dataset categories (Available options : `ActeursEtOrganes`, `Agendas`, `Amendements`, `DossiersLegislatifs`, `Photos`, `Scrutins`, `Questions`, `ComptesRendusSeances`)
|
|
85
|
-
|
|
86
|
-
- `--legislature` or `-l <number>`: Specify one or more legislatures to process (e.g., `-l 15 -l 16`)
|
|
87
|
-
- `--dataDir <path>` (Mandatory): Path to the working directory where all data is stored (required)
|
|
88
|
-
- `--silent` or `-s`: Disable logging
|
|
89
|
-
- `--verbose` or `-v`: Enable verbose logging
|
|
90
|
-
- `--fetch` or `-f`: Force re-download of data even if already present
|
|
91
|
-
- `--commit` or `-c`: Automatically commit cleaned data
|
|
92
|
-
- `--pull` or `-p`: Pull repositories before starting
|
|
93
|
-
- `--clone` or `-C <url>`: Clone Git repositories from a remote group or organization
|
|
94
|
-
- `--remote` or `-r <name>`: Push commits to specified Git remote(s)
|
|
95
|
-
|
|
96
|
-
If you use such options, use them in all subsequent commands too (_data:regorganize_data_ and _data:clean_data_).
|
|
97
|
-
|
|
98
|
-
### Options for Cleaning Data
|
|
99
|
-
|
|
100
|
-
- `--dataset` or `-d <name>`: Clean a specific dataset only
|
|
101
|
-
- `--no-reset-after-commit`: Skip Git reset after committing (useful to preserve local changes)
|
|
102
|
-
- `--no-validate` or `-V`: Skip schema validation during cleaning
|
|
103
|
-
- `--fetchDocuments` : Specify to retrieve documents
|
|
104
|
-
- `--parseDocuments`: Specify to parse documents into cleaned json
|
|
105
|
-
- `--fetchVideos`: Retrieve videos
|
|
106
|
-
|
|
107
|
-
### Options for Retrieving Documents
|
|
108
|
-
|
|
109
|
-
- `--full` or `-f`: Retrieve all documents, even those already downloaded
|
|
110
|
-
- `--document-type` or `-T <type>`: Restrict to specific document types (e.g., `PION`)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
## Download using Docker
|
|
114
|
-
|
|
115
|
-
A Docker image that downloads and cleans the data all at once is available. Build it locally or run it from the container registry.
|
|
116
|
-
Use the environment variables `LEGISLATURE` and `CATEGORIES` if needed.
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
docker run --pull always --name tricoteuses-assemblee -v ../assemblee-data:/app/assemblee-data -e LEGISLATURE=17 -d git.tricoteuses.fr/logiciels/tricoteuses-assemblee:latest
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Using the data
|
|
123
|
-
|
|
124
|
-
Once the data is downloaded and cleaned, you can use loaders to retrieve it.
|
|
125
|
-
To use loaders in your project, you can install the _@tricoteuses/assemblee_ package, and import the iterator functions that you need.
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
npm install @tricoteuses/assemblee
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
```js
|
|
132
|
-
import {
|
|
133
|
-
iterLoadAssembleeActeurs,
|
|
134
|
-
iterLoadAssembleeOrganes,
|
|
135
|
-
iterLoadAssembleeReunions,
|
|
136
|
-
iterLoadAssembleeScrutins,
|
|
137
|
-
iterLoadAssembleeDocuments,
|
|
138
|
-
iterLoadAssembleeDossiersParlementaires,
|
|
139
|
-
iterLoadAssembleeAmendements,
|
|
140
|
-
iterLoadAssembleeQuestions,
|
|
141
|
-
iterLoadAssembleeComptesRendus,
|
|
142
|
-
} from "@tricoteuses/assemblee/loaders";
|
|
143
|
-
|
|
144
|
-
// Pass data directory and legislature as arguments
|
|
145
|
-
for (const { acteur } of iterLoadAssembleeActeurs("../assemblee-data", 17)) {
|
|
146
|
-
console.log(acteur.uid)
|
|
147
|
-
}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Generating schemas and documentation (for contributors only)
|
|
151
|
-
|
|
152
|
-
View instructions [here](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/-/blob/master/src/types)
|
|
1
|
+
# Tricoteuses-Assemblee
|
|
2
|
+
|
|
3
|
+
## _Retrieve, clean up & handle French Assemblée nationale's open data_
|
|
4
|
+
|
|
5
|
+
_Tricoteuses Légifrance_ is free and open source software.
|
|
6
|
+
|
|
7
|
+
- [software repository](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee)
|
|
8
|
+
- [GNU Affero General Public License version 3 or greater](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/-/tree/master/LICENSE.md)
|
|
9
|
+
|
|
10
|
+
## documentation
|
|
11
|
+
|
|
12
|
+
- [Architecture](doc/architecture.md)
|
|
13
|
+
- [TypeScript API](doc/api/)
|
|
14
|
+
- Main interfaces:
|
|
15
|
+
- [Acteur : personne physique élue ou nommée dans des organes](doc/api/README/interfaces/Acteur.md)
|
|
16
|
+
- [Amendement](doc/api/README/interfaces/Amendement.md)
|
|
17
|
+
- [CompteRendu : compte-rendu d'un débat parlementaire](doc/api/README/interfaces/CompteRendu.md)
|
|
18
|
+
- [Document : texte d'un projet de loi, d'une proposition de loi, d'un rapport, etc](doc/api/README/interfaces/Document.md)
|
|
19
|
+
- [DossierParlementaire : Dossier de suivi d'un projet ou d'une proposition de loi, d'une résolution, etc](doc/api/README/interfaces/DossierParlementaire.md)
|
|
20
|
+
- [Organe : commission, groupe politique, groupe d'étude, groupe d'amitié, etc](doc/api/README/interfaces/Organe.md)
|
|
21
|
+
- [Question : question au Gouvernement](doc/api/README/interfaces/Question.md)
|
|
22
|
+
- [Reunion : séance publique, réunion de commission, de groupe d'étude, etc](doc/api/README/interfaces/Reunion.md)
|
|
23
|
+
- [Scrutin : vote de chaque député lors d'un scrutin public](doc/api/README/interfaces/Scrutin.md)
|
|
24
|
+
- [JSON Schemas](src/schemas)
|
|
25
|
+
|
|
26
|
+
## Requirements
|
|
27
|
+
|
|
28
|
+
- Node >= 18
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git clone https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee
|
|
34
|
+
cd tricoteuses-assemblee/
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Download and clean data
|
|
42
|
+
|
|
43
|
+
### Basic usage
|
|
44
|
+
|
|
45
|
+
Create a directory to store the data, then run the following command to download, reorganize and clean the data.
|
|
46
|
+
```bash
|
|
47
|
+
mkdir ../assemblee-data/
|
|
48
|
+
npm run data:download ../assemblee-data
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Available Commands
|
|
52
|
+
|
|
53
|
+
- `npm run data:download <dir>`: Download, reorganize, and clean data
|
|
54
|
+
- `npm run data:retrieve_open_data <dir>`: Download raw data files.
|
|
55
|
+
- `npm run data:reorganize_data <dir>`: Reorganize raw files by entity.
|
|
56
|
+
- `npm run data:clean_data <dir>`: Clean and validate reorganized files.
|
|
57
|
+
- `npm run data:retrieve_deputes_photos <dir>`: Retrieval of députés' pictures from Assemblée nationale's website
|
|
58
|
+
- `npm run data:retrieve_senateurs_photos <dir>`: Retrieval of sénateurs' pictures from Assemblée nationale's website
|
|
59
|
+
- `npm run data:retrieve_documents <dir>`: Retrieval of legislative documents from Assemblée nationale's website
|
|
60
|
+
- `npm run data:retrieve_pending_amendements <dir>`: Retrieval of pending amendments from Assemblée nationale's website (waiting to be processed by Assemblée services)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
_Notes_:
|
|
64
|
+
|
|
65
|
+
- Reorganized files (generated by the _data:reorganize_data_ command) are also available in [Tricoteuses / Data / Données brutes de l'Assemblée](https://git.en-root.org/tricoteuses/data/assemblee-brut). They are updated on a regular basis.
|
|
66
|
+
- Split & cleaned files (generated by the _data:clean_data_ command) are also available in [Tricoteuses / Data / Données nettoyées de l'Assemblée](https://git.en-root.org/tricoteuses/data/assemblee-nettoye) with the `_nettoye` suffix. They are updated on a regular basis.
|
|
67
|
+
|
|
68
|
+
### Filtering Options
|
|
69
|
+
|
|
70
|
+
Downloading and cleaning all the data is long and takes up a lot of disk space. It is possible to choose the type of data that you want to retrieve to reduce the load.
|
|
71
|
+
|
|
72
|
+
Examples:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Only download amendments
|
|
76
|
+
npm run data:download ../assemblee-data -- -k Amendements
|
|
77
|
+
|
|
78
|
+
# Only process 16th and 17th legislatures
|
|
79
|
+
npm run data:download ../assemblee-data -- -l 16 -l 17
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Common Options
|
|
83
|
+
|
|
84
|
+
- `--categories` or `-k <name>`: Filter by dataset categories (Available options : `ActeursEtOrganes`, `Agendas`, `Amendements`, `DossiersLegislatifs`, `Photos`, `Scrutins`, `Questions`, `ComptesRendusSeances`)
|
|
85
|
+
|
|
86
|
+
- `--legislature` or `-l <number>`: Specify one or more legislatures to process (e.g., `-l 15 -l 16`)
|
|
87
|
+
- `--dataDir <path>` (Mandatory): Path to the working directory where all data is stored (required)
|
|
88
|
+
- `--silent` or `-s`: Disable logging
|
|
89
|
+
- `--verbose` or `-v`: Enable verbose logging
|
|
90
|
+
- `--fetch` or `-f`: Force re-download of data even if already present
|
|
91
|
+
- `--commit` or `-c`: Automatically commit cleaned data
|
|
92
|
+
- `--pull` or `-p`: Pull repositories before starting
|
|
93
|
+
- `--clone` or `-C <url>`: Clone Git repositories from a remote group or organization
|
|
94
|
+
- `--remote` or `-r <name>`: Push commits to specified Git remote(s)
|
|
95
|
+
|
|
96
|
+
If you use such options, use them in all subsequent commands too (_data:regorganize_data_ and _data:clean_data_).
|
|
97
|
+
|
|
98
|
+
### Options for Cleaning Data
|
|
99
|
+
|
|
100
|
+
- `--dataset` or `-d <name>`: Clean a specific dataset only
|
|
101
|
+
- `--no-reset-after-commit`: Skip Git reset after committing (useful to preserve local changes)
|
|
102
|
+
- `--no-validate` or `-V`: Skip schema validation during cleaning
|
|
103
|
+
- `--fetchDocuments` : Specify to retrieve documents
|
|
104
|
+
- `--parseDocuments`: Specify to parse documents into cleaned json
|
|
105
|
+
- `--fetchVideos`: Retrieve videos
|
|
106
|
+
|
|
107
|
+
### Options for Retrieving Documents
|
|
108
|
+
|
|
109
|
+
- `--full` or `-f`: Retrieve all documents, even those already downloaded
|
|
110
|
+
- `--document-type` or `-T <type>`: Restrict to specific document types (e.g., `PION`)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## Download using Docker
|
|
114
|
+
|
|
115
|
+
A Docker image that downloads and cleans the data all at once is available. Build it locally or run it from the container registry.
|
|
116
|
+
Use the environment variables `LEGISLATURE` and `CATEGORIES` if needed.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
docker run --pull always --name tricoteuses-assemblee -v ../assemblee-data:/app/assemblee-data -e LEGISLATURE=17 -d git.tricoteuses.fr/logiciels/tricoteuses-assemblee:latest
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Using the data
|
|
123
|
+
|
|
124
|
+
Once the data is downloaded and cleaned, you can use loaders to retrieve it.
|
|
125
|
+
To use loaders in your project, you can install the _@tricoteuses/assemblee_ package, and import the iterator functions that you need.
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npm install @tricoteuses/assemblee
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```js
|
|
132
|
+
import {
|
|
133
|
+
iterLoadAssembleeActeurs,
|
|
134
|
+
iterLoadAssembleeOrganes,
|
|
135
|
+
iterLoadAssembleeReunions,
|
|
136
|
+
iterLoadAssembleeScrutins,
|
|
137
|
+
iterLoadAssembleeDocuments,
|
|
138
|
+
iterLoadAssembleeDossiersParlementaires,
|
|
139
|
+
iterLoadAssembleeAmendements,
|
|
140
|
+
iterLoadAssembleeQuestions,
|
|
141
|
+
iterLoadAssembleeComptesRendus,
|
|
142
|
+
} from "@tricoteuses/assemblee/loaders";
|
|
143
|
+
|
|
144
|
+
// Pass data directory and legislature as arguments
|
|
145
|
+
for (const { acteur } of iterLoadAssembleeActeurs("../assemblee-data", 17)) {
|
|
146
|
+
console.log(acteur.uid)
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Generating schemas and documentation (for contributors only)
|
|
151
|
+
|
|
152
|
+
View instructions [here](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/-/blob/master/src/types)
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "CompteRenduCommission",
|
|
4
|
-
"description": "Compte-rendu d'une réunion en commission d'examen d'un texte de loi",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"reunionRef": {
|
|
8
|
-
"description": "Référence vers la réunion",
|
|
9
|
-
"type": "string"
|
|
10
|
-
},
|
|
11
|
-
"interventions": {
|
|
12
|
-
"type": "array",
|
|
13
|
-
"items": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"description": "Prise de parole d'un orateur",
|
|
16
|
-
"properties": {
|
|
17
|
-
"acteurRef": {
|
|
18
|
-
"description": "Référence à l'acteur",
|
|
19
|
-
"type": "string"
|
|
20
|
-
},
|
|
21
|
-
"nomActeur": {
|
|
22
|
-
"description": "Nom de l'orateur",
|
|
23
|
-
"type": "string"
|
|
24
|
-
},
|
|
25
|
-
"groupe": {
|
|
26
|
-
"description": "Groupe parlementaire de l'orateur",
|
|
27
|
-
"type": "string"
|
|
28
|
-
},
|
|
29
|
-
"amendementRef": {
|
|
30
|
-
"description": "Amendement relatif à la prise de parole",
|
|
31
|
-
"type": "string"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"required": [
|
|
35
|
-
"nomActeur"
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"scrutins": {
|
|
40
|
-
"type": "array",
|
|
41
|
-
"items": {
|
|
42
|
-
"type": "object",
|
|
43
|
-
"description": "Prise de parole d'un orateur",
|
|
44
|
-
"properties": {
|
|
45
|
-
"amendementRef": {
|
|
46
|
-
"description": "Référence à l'amendement",
|
|
47
|
-
"type": "string"
|
|
48
|
-
},
|
|
49
|
-
"resultat": {
|
|
50
|
-
"description": "Résultat du scrutin",
|
|
51
|
-
"type": "string"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"required": [
|
|
55
|
-
"amendementRef"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"required": [
|
|
61
|
-
"interventions"
|
|
62
|
-
]
|
|
63
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "CompteRenduCommission",
|
|
4
|
+
"description": "Compte-rendu d'une réunion en commission d'examen d'un texte de loi",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"reunionRef": {
|
|
8
|
+
"description": "Référence vers la réunion",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"interventions": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"description": "Prise de parole d'un orateur",
|
|
16
|
+
"properties": {
|
|
17
|
+
"acteurRef": {
|
|
18
|
+
"description": "Référence à l'acteur",
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"nomActeur": {
|
|
22
|
+
"description": "Nom de l'orateur",
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"groupe": {
|
|
26
|
+
"description": "Groupe parlementaire de l'orateur",
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"amendementRef": {
|
|
30
|
+
"description": "Amendement relatif à la prise de parole",
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": [
|
|
35
|
+
"nomActeur"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"scrutins": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"description": "Prise de parole d'un orateur",
|
|
44
|
+
"properties": {
|
|
45
|
+
"amendementRef": {
|
|
46
|
+
"description": "Référence à l'amendement",
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"resultat": {
|
|
50
|
+
"description": "Résultat du scrutin",
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": [
|
|
55
|
+
"amendementRef"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": [
|
|
61
|
+
"interventions"
|
|
62
|
+
]
|
|
63
|
+
}
|
package/lib/schemas/debats.json
CHANGED
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
}
|
|
690
690
|
},
|
|
691
691
|
"transform": {
|
|
692
|
-
"$comment": "(\
|
|
692
|
+
"$comment": "(\n val: any,\n typ: any,\n getProps: any,\n key: any = \"\",\n parent: any = \"\") => any",
|
|
693
693
|
"type": "object",
|
|
694
694
|
"properties": {
|
|
695
695
|
"namedArgs": {
|
package/package.json
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tricoteuses/assemblee",
|
|
3
|
-
"version": "2.5.
|
|
4
|
-
"description": "Retrieve, clean up & handle French Assemblée nationale's open data",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"Assemblée nationale",
|
|
7
|
-
"France",
|
|
8
|
-
"open data",
|
|
9
|
-
"Parliament"
|
|
10
|
-
],
|
|
11
|
-
"author": "Emmanuel Raviart <emmanuel@raviart.com>",
|
|
12
|
-
"contributors": [
|
|
13
|
-
"Henry Boisgibault <h.boisgibault@gmail.com>",
|
|
14
|
-
"Loïc Dachary <loic@dachary.org>"
|
|
15
|
-
],
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/issues"
|
|
18
|
-
},
|
|
19
|
-
"homepage": "https://tricoteuses.fr/",
|
|
20
|
-
"license": "AGPL-3.0-or-later",
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee.git"
|
|
24
|
-
},
|
|
25
|
-
"type": "module",
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": ">=20.0.0"
|
|
28
|
-
},
|
|
29
|
-
"files": [
|
|
30
|
-
"lib"
|
|
31
|
-
],
|
|
32
|
-
"exports": {
|
|
33
|
-
".": {
|
|
34
|
-
"typedoc": "./src/index.ts",
|
|
35
|
-
"import": "./lib/index.js",
|
|
36
|
-
"types": "./lib/index.d.ts"
|
|
37
|
-
},
|
|
38
|
-
"./cleaners": {
|
|
39
|
-
"typedoc": "./src/cleaners/index.ts",
|
|
40
|
-
"import": "./lib/cleaners.js",
|
|
41
|
-
"types": "./lib/cleaners/index.d.ts"
|
|
42
|
-
},
|
|
43
|
-
"./git": {
|
|
44
|
-
"typedoc": "./src/git.ts",
|
|
45
|
-
"import": "./lib/git.js",
|
|
46
|
-
"types": "./lib/git.d.ts"
|
|
47
|
-
},
|
|
48
|
-
"./loaders": {
|
|
49
|
-
"typedoc": "./src/loaders.ts",
|
|
50
|
-
"import": "./lib/loaders.js",
|
|
51
|
-
"types": "./lib/loaders.d.ts"
|
|
52
|
-
},
|
|
53
|
-
"./parsers": {
|
|
54
|
-
"typedoc": "./src/parsers/index.ts",
|
|
55
|
-
"import": "./lib/parsers.js",
|
|
56
|
-
"types": "./lib/parsers/index.d.ts"
|
|
57
|
-
},
|
|
58
|
-
"./package.json": "./package.json"
|
|
59
|
-
},
|
|
60
|
-
"publishConfig": {
|
|
61
|
-
"access": "public"
|
|
62
|
-
},
|
|
63
|
-
"scripts": {
|
|
64
|
-
"build": "vite build && npm run build:doc:api && npm run build:json-schemas && npm run prettier",
|
|
65
|
-
"build:doc:api": "typedoc --plugin typedoc-plugin-markdown --out ./doc/api --readme none",
|
|
66
|
-
"build:json-schemas": "tsx src/scripts/generate-json-schemas.ts && tsx src/scripts/copy-schemas.ts",
|
|
67
|
-
"clean": "rimraf lib",
|
|
68
|
-
"data:clean_data": "tsx src/scripts/clean_reorganized_data.ts --no-validate",
|
|
69
|
-
"data:download": "tsx src/scripts/data-download.ts",
|
|
70
|
-
"data:reorganize_data": "tsx src/scripts/reorganize_data.ts --no-validate-raw",
|
|
71
|
-
"data:retrieve_deputes_photos": "tsx src/scripts/retrieve_deputes_photos.ts --fetch",
|
|
72
|
-
"data:retrieve_documents": "tsx src/scripts/retrieve_documents.ts",
|
|
73
|
-
"data:retrieve_open_data": "tsx src/scripts/retrieve_open_data.ts --fetch",
|
|
74
|
-
"data:retrieve_pending_amendements": "tsx src/scripts/retrieve_pending_amendments.ts --incremental",
|
|
75
|
-
"data:retrieve_senateurs_photos": "tsx src/scripts/retrieve_senateurs_photos.ts --fetch",
|
|
76
|
-
"lint": "eslint .",
|
|
77
|
-
"prepare": "npm run build",
|
|
78
|
-
"prettier": "prettier --write \"src/**/*.ts\"",
|
|
79
|
-
"test:iter_load": "tsx src/scripts/test_iter_load.ts",
|
|
80
|
-
"type-check": "tsc --noEmit",
|
|
81
|
-
"type-check:watch": "npm run type-check -- --watch"
|
|
82
|
-
},
|
|
83
|
-
"dependencies": {
|
|
84
|
-
"cheerio": "^1.1.0",
|
|
85
|
-
"command-line-args": "^6.0.1",
|
|
86
|
-
"command-line-usage": "^7.0.3",
|
|
87
|
-
"date-fns": "^4.1.0",
|
|
88
|
-
"deep-equal": "^2.2.3",
|
|
89
|
-
"deep-object-diff": "^1.1.0",
|
|
90
|
-
"fast-xml-parser": "^5.0.8",
|
|
91
|
-
"front-matter": "^4.0.2",
|
|
92
|
-
"fs-extra": "^11.2.0",
|
|
93
|
-
"glob": "^11.0.0",
|
|
94
|
-
"js-yaml": "^4.0.0",
|
|
95
|
-
"node-html-parser": "^7.0.1",
|
|
96
|
-
"node-stream-zip": "^1.11.6",
|
|
97
|
-
"p-limit": "^7.2.0",
|
|
98
|
-
"sharp": "^0.34.2"
|
|
99
|
-
},
|
|
100
|
-
"devDependencies": {
|
|
101
|
-
"@eslint/js": "^9.27.0",
|
|
102
|
-
"@types/command-line-args": "^5.2.3",
|
|
103
|
-
"@types/command-line-usage": "^5.0.4",
|
|
104
|
-
"@types/deep-equal": "^1.0.4",
|
|
105
|
-
"@types/fs-extra": "^11.0.4",
|
|
106
|
-
"@types/js-yaml": "^4.0.0",
|
|
107
|
-
"@types/node": "^22.7.6",
|
|
108
|
-
"@types/temp": "^0.9.0",
|
|
109
|
-
"@types/unzipper": "^0.10.3",
|
|
110
|
-
"ajv": "^8.0.4",
|
|
111
|
-
"eslint": "^9.27.0",
|
|
112
|
-
"globals": "^16.1.0",
|
|
113
|
-
"prettier": "^3.5.3",
|
|
114
|
-
"rimraf": "^6.0.1",
|
|
115
|
-
"temp": "^0.9.1",
|
|
116
|
-
"ts-json-schema-generator": "^2.4.0",
|
|
117
|
-
"tslib": "^2.0.2",
|
|
118
|
-
"tsx": "^4.0.0",
|
|
119
|
-
"typedoc": "^0.28.5",
|
|
120
|
-
"typedoc-plugin-markdown": "^4.6.4",
|
|
121
|
-
"typescript": "^5.8.3",
|
|
122
|
-
"typescript-eslint": "^8.32.1",
|
|
123
|
-
"vite": "^7.0.4",
|
|
124
|
-
"vite-plugin-dts": "^4.5.4"
|
|
125
|
-
}
|
|
126
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tricoteuses/assemblee",
|
|
3
|
+
"version": "2.5.4",
|
|
4
|
+
"description": "Retrieve, clean up & handle French Assemblée nationale's open data",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Assemblée nationale",
|
|
7
|
+
"France",
|
|
8
|
+
"open data",
|
|
9
|
+
"Parliament"
|
|
10
|
+
],
|
|
11
|
+
"author": "Emmanuel Raviart <emmanuel@raviart.com>",
|
|
12
|
+
"contributors": [
|
|
13
|
+
"Henry Boisgibault <h.boisgibault@gmail.com>",
|
|
14
|
+
"Loïc Dachary <loic@dachary.org>"
|
|
15
|
+
],
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/issues"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://tricoteuses.fr/",
|
|
20
|
+
"license": "AGPL-3.0-or-later",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee.git"
|
|
24
|
+
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=20.0.0"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"lib"
|
|
31
|
+
],
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"typedoc": "./src/index.ts",
|
|
35
|
+
"import": "./lib/index.js",
|
|
36
|
+
"types": "./lib/index.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./cleaners": {
|
|
39
|
+
"typedoc": "./src/cleaners/index.ts",
|
|
40
|
+
"import": "./lib/cleaners.js",
|
|
41
|
+
"types": "./lib/cleaners/index.d.ts"
|
|
42
|
+
},
|
|
43
|
+
"./git": {
|
|
44
|
+
"typedoc": "./src/git.ts",
|
|
45
|
+
"import": "./lib/git.js",
|
|
46
|
+
"types": "./lib/git.d.ts"
|
|
47
|
+
},
|
|
48
|
+
"./loaders": {
|
|
49
|
+
"typedoc": "./src/loaders.ts",
|
|
50
|
+
"import": "./lib/loaders.js",
|
|
51
|
+
"types": "./lib/loaders.d.ts"
|
|
52
|
+
},
|
|
53
|
+
"./parsers": {
|
|
54
|
+
"typedoc": "./src/parsers/index.ts",
|
|
55
|
+
"import": "./lib/parsers.js",
|
|
56
|
+
"types": "./lib/parsers/index.d.ts"
|
|
57
|
+
},
|
|
58
|
+
"./package.json": "./package.json"
|
|
59
|
+
},
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "vite build && npm run build:doc:api && npm run build:json-schemas && npm run prettier",
|
|
65
|
+
"build:doc:api": "typedoc --plugin typedoc-plugin-markdown --out ./doc/api --readme none",
|
|
66
|
+
"build:json-schemas": "tsx src/scripts/generate-json-schemas.ts && tsx src/scripts/copy-schemas.ts",
|
|
67
|
+
"clean": "rimraf lib",
|
|
68
|
+
"data:clean_data": "tsx src/scripts/clean_reorganized_data.ts --no-validate",
|
|
69
|
+
"data:download": "tsx src/scripts/data-download.ts",
|
|
70
|
+
"data:reorganize_data": "tsx src/scripts/reorganize_data.ts --no-validate-raw",
|
|
71
|
+
"data:retrieve_deputes_photos": "tsx src/scripts/retrieve_deputes_photos.ts --fetch",
|
|
72
|
+
"data:retrieve_documents": "tsx src/scripts/retrieve_documents.ts",
|
|
73
|
+
"data:retrieve_open_data": "tsx src/scripts/retrieve_open_data.ts --fetch",
|
|
74
|
+
"data:retrieve_pending_amendements": "tsx src/scripts/retrieve_pending_amendments.ts --incremental",
|
|
75
|
+
"data:retrieve_senateurs_photos": "tsx src/scripts/retrieve_senateurs_photos.ts --fetch",
|
|
76
|
+
"lint": "eslint .",
|
|
77
|
+
"prepare": "npm run build",
|
|
78
|
+
"prettier": "prettier --write \"src/**/*.ts\"",
|
|
79
|
+
"test:iter_load": "tsx src/scripts/test_iter_load.ts",
|
|
80
|
+
"type-check": "tsc --noEmit",
|
|
81
|
+
"type-check:watch": "npm run type-check -- --watch"
|
|
82
|
+
},
|
|
83
|
+
"dependencies": {
|
|
84
|
+
"cheerio": "^1.1.0",
|
|
85
|
+
"command-line-args": "^6.0.1",
|
|
86
|
+
"command-line-usage": "^7.0.3",
|
|
87
|
+
"date-fns": "^4.1.0",
|
|
88
|
+
"deep-equal": "^2.2.3",
|
|
89
|
+
"deep-object-diff": "^1.1.0",
|
|
90
|
+
"fast-xml-parser": "^5.0.8",
|
|
91
|
+
"front-matter": "^4.0.2",
|
|
92
|
+
"fs-extra": "^11.2.0",
|
|
93
|
+
"glob": "^11.0.0",
|
|
94
|
+
"js-yaml": "^4.0.0",
|
|
95
|
+
"node-html-parser": "^7.0.1",
|
|
96
|
+
"node-stream-zip": "^1.11.6",
|
|
97
|
+
"p-limit": "^7.2.0",
|
|
98
|
+
"sharp": "^0.34.2"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@eslint/js": "^9.27.0",
|
|
102
|
+
"@types/command-line-args": "^5.2.3",
|
|
103
|
+
"@types/command-line-usage": "^5.0.4",
|
|
104
|
+
"@types/deep-equal": "^1.0.4",
|
|
105
|
+
"@types/fs-extra": "^11.0.4",
|
|
106
|
+
"@types/js-yaml": "^4.0.0",
|
|
107
|
+
"@types/node": "^22.7.6",
|
|
108
|
+
"@types/temp": "^0.9.0",
|
|
109
|
+
"@types/unzipper": "^0.10.3",
|
|
110
|
+
"ajv": "^8.0.4",
|
|
111
|
+
"eslint": "^9.27.0",
|
|
112
|
+
"globals": "^16.1.0",
|
|
113
|
+
"prettier": "^3.5.3",
|
|
114
|
+
"rimraf": "^6.0.1",
|
|
115
|
+
"temp": "^0.9.1",
|
|
116
|
+
"ts-json-schema-generator": "^2.4.0",
|
|
117
|
+
"tslib": "^2.0.2",
|
|
118
|
+
"tsx": "^4.0.0",
|
|
119
|
+
"typedoc": "^0.28.5",
|
|
120
|
+
"typedoc-plugin-markdown": "^4.6.4",
|
|
121
|
+
"typescript": "^5.8.3",
|
|
122
|
+
"typescript-eslint": "^8.32.1",
|
|
123
|
+
"vite": "^7.0.4",
|
|
124
|
+
"vite-plugin-dts": "^4.5.4"
|
|
125
|
+
}
|
|
126
|
+
}
|