-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessing-config-schema.json
More file actions
240 lines (240 loc) · 10.1 KB
/
processing-config-schema.json
File metadata and controls
240 lines (240 loc) · 10.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
{
"title": "ODS Import Processing Config",
"type": "object",
"layout": "tabs",
"required": ["mode", "url"],
"allOf": [
{
"title": "Action",
"x-i18n-title": { "fr": "Action" },
"layout": {
"children": [
"mode",
{
"if": "data.mode === 'analyse'",
"children": [
{
"markdown": "First step: produces a report on themes, licenses and metadata of the ODS portal. Provides `fetch` snippets ready to paste in the browser console to create the missing topics and licenses in Data-Fair. At the end of the analysis, the \"Import datasets\" option becomes available.",
"x-i18n-markdown": {
"fr": "Première étape : produit un rapport des thématiques, licences et métadonnées du portail ODS. Fournit les snippets `fetch` prêts à coller dans la console du navigateur pour créer les thématiques et licences manquantes dans Data-Fair. À la fin de l'analyse, l'option « Importer les jeux de données » devient disponible."
}
}
]
},
{
"if": "data.mode === 'import'",
"children": [
{
"markdown": "Second step: downloads and synchronises ODS datasets into Data-Fair. Configure the theme mapping in the dedicated tab before running.",
"x-i18n-markdown": {
"fr": "Seconde étape : télécharge et synchronise les jeux de données ODS vers Data-Fair. Configurez le mapping des thématiques dans l'onglet correspondant avant de lancer."
}
}
]
}
]
},
"properties": {
"mode": {
"type": "string",
"title": "Mode",
"default": "analyse",
"oneOf": [
{
"const": "analyse",
"title": "Analyse portal",
"x-i18n-title": { "fr": "Analyser le portail" }
},
{
"const": "import",
"title": "Import datasets",
"x-i18n-title": { "fr": "Importer les jeux de données" },
"layout": { "if": "parent.data.haveList" }
}
]
},
"haveList": {
"type": "boolean",
"layout": "none"
}
}
},
{
"title": "Parameters",
"x-i18n-title": { "fr": "Paramètres" },
"required": ["url"],
"properties": {
"url": {
"type": "string",
"title": "ODS portal URL",
"x-i18n-title": { "fr": "URL du portail ODS" },
"description": "Root URL of the ODS portal, no trailing slash.",
"x-i18n-description": {
"fr": "URL racine du portail ODS, sans slash final."
},
"pattern": "^https?://.*[^/]$",
"errorMessage": "The URL must start with http:// or https:// and must not end with a slash",
"examples": ["https://data.mon-domaine.fr"]
},
"relatedDatasetsThreshold": {
"type": "number",
"title": "Related datasets — minimum similarity score",
"x-i18n-title": { "fr": "Jeux de données liés — score de similarité minimum" },
"description": "Score threshold (ODS dataset_similarity) above which a dataset is added to relatedDatasets. Set to 0 to disable related datasets import. ODS portals typically use 1.5–2.0.",
"x-i18n-description": {
"fr": "Seuil de similarité (dataset_similarity ODS) à partir duquel un jeu de données est ajouté à relatedDatasets. Mettre 0 pour désactiver l'import des jeux de données liés. Les portails ODS utilisent typiquement 1.5–2.0."
},
"default": 1.5,
"minimum": 0
}
}
},
{
"title": "License mapping",
"x-i18n-title": { "fr": "Mapping des licences" },
"layout": {
"if": "parent.data.mode === 'import' && parent.data.haveList",
"children": [
{
"markdown": "You can link a Data Fair license to each ODS license. Data Fair embeds common licenses (e.g. Etalab Open License v2.0, ODbL); additional ones can be created from the <a href=\"/data-fair/settings\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Licenses</strong></a> tab in the settings, or via the snippet provided by the portal analysis step. If no Data Fair license is selected, the ODS title and URL are used as-is.",
"x-i18n-markdown": {
"fr": "Vous pouvez associer à chaque <strong>licence ODS</strong> une <strong>licence Data Fair</strong>. Data Fair embarque les licences courantes (ex. Licence Ouverte Etalab v2.0, ODbL) ; vous pouvez en créer d'autres depuis l'onglet <a href=\"/data-fair/settings\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Licences</strong></a> dans les paramètres, ou via le snippet fourni par l'étape d'analyse du portail. Si aucune licence Data Fair n'est sélectionnée, le titre et l'URL ODS sont utilisés tels quels."
}
},
"licenses"
]
},
"properties": {
"licenses": {
"type": "array",
"title": "",
"layout": {
"comp": "list",
"listEditMode": "inline",
"density": "compact",
"getItems": {
"url": {
"expr": "parent.data.url ? `${parent.data.url}/api/explore/v2.1/catalog/facets?facet=license` : undefined",
"type": "js-eval"
},
"itemsResults": "data.facets[0]?.facets",
"itemKey": "item.value"
}
},
"items": {
"type": "object",
"required": ["value"],
"layout": { "readOnlyPropertiesMode": "show" },
"properties": {
"value": {
"type": "string",
"title": "ODS license",
"x-i18n-title": { "fr": "Licence ODS" },
"readOnly": true,
"layout": { "cols": 6 }
},
"dataFairLicense": {
"type": "object",
"title": "Data Fair license",
"x-i18n-title": { "fr": "Licence Data Fair" },
"layout": {
"props": { "clearable": true },
"cols": 6,
"getItems": {
"url": "/data-fair/api/v1/settings/${context.owner.type}/${context.owner.id}/licenses",
"itemsResults": "data",
"itemKey": "item.href",
"itemTitle": "item.title"
}
},
"additionalProperties": false,
"required": ["title", "href"],
"properties": {
"title": { "type": "string" },
"href": { "type": "string" }
}
}
}
}
}
}
},
{
"title": "Theme mapping",
"x-i18n-title": { "fr": "Mapping des thématiques" },
"layout": {
"if": "parent.data.mode === 'import' && parent.data.haveList",
"children": [
{
"markdown": "You can link one (or several) Data Fair themes to each ODS theme. These topics must first be created in Data Fair, either from the <a href=\"/data-fair/settings\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Topics</strong></a> tab in the settings, or via the snippets provided by the portal analysis step.",
"x-i18n-markdown": {
"fr": "Vous pouvez associer pour chaque <strong>thème ODS</strong> une ou plusieurs <strong>thématiques Data Fair</strong>. Ces thématiques doivent être préalablement créées sur Data Fair, soit depuis l'onglet <a href=\"/data-fair/settings\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Thématiques</strong></a> dans les paramètres, soit via les snippets fournis par l'étape d'analyse du portail."
}
},
"themes"
]
},
"properties": {
"themes": {
"type": "array",
"title": "",
"layout": {
"comp": "list",
"listEditMode": "inline",
"density": "compact",
"getItems": {
"url": {
"expr": "parent.data.url ? `${parent.data.url}/api/explore/v2.1/catalog/facets?facet=theme` : undefined",
"type": "js-eval"
},
"itemsResults": "data.facets[0]?.facets",
"itemKey": "item.value"
}
},
"items": {
"type": "object",
"required": ["value", "dataFairThemes"],
"layout": { "readOnlyPropertiesMode": "show" },
"properties": {
"value": {
"type": "string",
"title": "ODS theme",
"x-i18n-title": { "fr": "Thème ODS" },
"readOnly": true,
"layout": { "cols": 6 }
},
"dataFairThemes": {
"type": "array",
"title": "Data Fair topics",
"x-i18n-title": { "fr": "Thèmes Data Fair" },
"default": [],
"layout": {
"props": { "clearable": true },
"cols": 6,
"getItems": {
"url": "/data-fair/api/v1/settings/${context.owner.type}/${context.owner.id}/topics",
"itemsResults": "data",
"itemKey": "item.title",
"itemTitle": "item.title",
"itemIcon": "item.icon?.svg"
}
},
"items": {
"type": "object",
"additionalProperties": false,
"required": ["title"],
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"color": { "type": "string" },
"icon": { "type": "object" }
}
}
}
}
}
}
}
}
]
}