@tricoteuses/senat 2.5.5 → 2.5.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/README.md CHANGED
@@ -48,16 +48,16 @@ Data from other sources is also available :
48
48
  # Retrieval of textes and rapports from Sénat's website
49
49
  # Available options for optional `formats` parameter : xml, html, pdf
50
50
  # Available options for optional `types` parameter : textes, rapports
51
- npm run data:retrieve_documents ../senat-data -- --fromSession 2023 [--formats xml pdf] [--types textes]
51
+ npm run data:retrieve_documents ../senat-data -- --fromSession 2022 [--formats xml pdf] [--types textes]
52
52
 
53
53
  # Retrieval & parsing (textes in xml format only for now)
54
- npm run data:retrieve_documents ../senat-data -- --fromSession 2023 --parseDocuments
54
+ npm run data:retrieve_documents ../senat-data -- --fromSession 2022 --parseDocuments
55
55
 
56
56
  # Parsing only
57
57
  npm run data:parse_textes_lois ../senat-data
58
58
 
59
59
  # Retrieval (& parsing) of agenda from Sénat's website
60
- npm run data:retrieve_agenda ../senat-data -- --fromSession 2023 [--parseAgenda]
60
+ npm run data:retrieve_agenda ../senat-data -- --fromSession 2022 [--parseAgenda]
61
61
 
62
62
  # Retrieval of sénateurs' pictures from Sénat's website
63
63
  npm run data:retrieve_senateurs_photos ../senat-data
@@ -97,3 +97,18 @@ for (const { item: question } of iterLoadSenatQuestions("../senat-data", 17)) {
97
97
  ```bash
98
98
  npm run data:generate_schemas ../senat-data
99
99
  ```
100
+
101
+ ## Publishing
102
+
103
+ To publish a new version of this package onto npm, bump the package version and publish.
104
+
105
+ ```bash
106
+ npm version x.y.z # Bumps version in package.json and creates a new tag x.y.z
107
+ npm publish
108
+ ```
109
+
110
+ The Docker image will be automatically built during a CI Workflow if you push the tag to the remote repository.
111
+
112
+ ```bash
113
+ git push --tags
114
+ ```
@@ -49,12 +49,12 @@ function getStartAndEndTimes(timeStr) {
49
49
  if (timeMatches?.groups) {
50
50
  const { startTime, endTime } = timeMatches.groups;
51
51
  return {
52
- startTime: startTime ? DateTime.fromFormat(startTime, "H'h'mm").setZone(FR_TZ).toISOTime() : null,
53
- endTime: endTime ? DateTime.fromFormat(endTime, "H'h'mm").setZone(FR_TZ).toISOTime() : null,
52
+ startTime: startTime ? DateTime.fromFormat(startTime, "H'h'mm", { zone: FR_TZ }).toISOTime() : null,
53
+ endTime: endTime ? DateTime.fromFormat(endTime, "H'h'mm", { zone: FR_TZ }).toISOTime() : null,
54
54
  };
55
55
  }
56
56
  return {
57
- startTime: normalizedTime ? DateTime.fromFormat(normalizedTime, "H'h'mm").setZone(FR_TZ).toISOTime() : null,
57
+ startTime: normalizedTime ? DateTime.fromFormat(normalizedTime, "H'h'mm", { zone: FR_TZ }).toISOTime() : null,
58
58
  endTime: null,
59
59
  };
60
60
  }
@@ -104,6 +104,7 @@ declare const findAllQuery: import("kysely").SelectQueryBuilder<{
104
104
  libelle_organisme: string | null;
105
105
  code_organisme: string | null;
106
106
  ordre_lecture_assemblee: string;
107
+ session: string | null;
107
108
  textes: {
108
109
  url: string;
109
110
  date: string;
@@ -169,6 +170,7 @@ export declare function findAll(): AsyncIterableIterator<{
169
170
  libelle_organisme: string | null;
170
171
  code_organisme: string | null;
171
172
  ordre_lecture_assemblee: string;
173
+ session: string | null;
172
174
  textes: {
173
175
  url: string;
174
176
  date: string;
@@ -106,6 +106,7 @@ function lecturesAssemblee(lectureId) {
106
106
  "org.orgnom as libelle_organisme",
107
107
  "org.senorgcod as code_organisme",
108
108
  "lecass.ordreass as ordre_lecture_assemblee",
109
+ "lecass.sesann as session",
109
110
  textes(ref("lecass.lecassidt")).as("textes"),
110
111
  rapports(ref("lecass.lecassidt")).as("rapports"),
111
112
  datesSeances(ref("lecass.lecassidt")).as("dates_seances"),
@@ -13,8 +13,8 @@ export const dataDirDefaultOption = {
13
13
  type: String,
14
14
  };
15
15
  export const fromSessionOption = {
16
- defaultValue: 2023,
17
- help: "session year to retrieve data from; default 2023",
16
+ defaultValue: 2022,
17
+ help: "session year to retrieve data from; default 2022",
18
18
  name: "fromSession",
19
19
  type: Number,
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tricoteuses/senat",
3
- "version": "2.5.5",
3
+ "version": "2.5.7",
4
4
  "description": "Handle French Sénat's open data",
5
5
  "keywords": [
6
6
  "France",
@@ -45,7 +45,7 @@
45
45
  "data:convert_data": "tsx src/scripts/convert_data.ts",
46
46
  "data:download": "bash -c 'npm run data:retrieve_open_data -- $@ && npm run data:convert_data -- $@' bash",
47
47
  "data:generate_schemas": "tsx src/scripts/retrieve_open_data.ts --schema",
48
- "data:retrieve_agenda": "tsx src/scripts/retrieve_agenda.ts",
48
+ "data:retrieve_agenda": "TZ='Etc/UTC' tsx src/scripts/retrieve_agenda.ts",
49
49
  "data:retrieve_documents": "tsx src/scripts/retrieve_documents.ts",
50
50
  "data:retrieve_open_data": "tsx src/scripts/retrieve_open_data.ts --all",
51
51
  "data:retrieve_senateurs_photos": "tsx src/scripts/retrieve_senateurs_photos.ts --fetch",