dataproduct-cli 0.0.1__py3-none-any.whl
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.
- dataproduct/__init__.py +5 -0
- dataproduct/cli.py +81 -0
- dataproduct/command_init.py +33 -0
- dataproduct/command_lint.py +58 -0
- dataproduct/command_publish.py +47 -0
- dataproduct/config/__init__.py +67 -0
- dataproduct/data_product.py +93 -0
- dataproduct/init/__init__.py +0 -0
- dataproduct/init/init_template.py +26 -0
- dataproduct/integration/__init__.py +0 -0
- dataproduct/integration/entropy_data.py +87 -0
- dataproduct/lint/__init__.py +0 -0
- dataproduct/lint/files.py +38 -0
- dataproduct/lint/resolve.py +11 -0
- dataproduct/lint/schema.py +44 -0
- dataproduct/lint/validate.py +61 -0
- dataproduct/model/__init__.py +4 -0
- dataproduct/model/exceptions.py +23 -0
- dataproduct/model/run.py +69 -0
- dataproduct/output/__init__.py +0 -0
- dataproduct/output/output_format.py +6 -0
- dataproduct/output/result_writer.py +77 -0
- dataproduct/py.typed +0 -0
- dataproduct/schemas/odps-1.0.0.init.yaml +37 -0
- dataproduct/schemas/odps-1.0.0.schema.json +517 -0
- dataproduct_cli-0.0.1.dist-info/METADATA +126 -0
- dataproduct_cli-0.0.1.dist-info/RECORD +31 -0
- dataproduct_cli-0.0.1.dist-info/WHEEL +5 -0
- dataproduct_cli-0.0.1.dist-info/entry_points.txt +2 -0
- dataproduct_cli-0.0.1.dist-info/licenses/LICENSE +21 -0
- dataproduct_cli-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
3
|
+
"title": "Open Data Product Standard (ODPS)",
|
|
4
|
+
"description": "An open data product standard descriptor to enable defining data products.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["apiVersion", "kind", "id", "status"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"apiVersion": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"default": "v1.0.0",
|
|
12
|
+
"description": "Version of the standard used to build data product. Default value is v1.0.0.",
|
|
13
|
+
"enum": ["v0.9.0", "v1.0.0"]
|
|
14
|
+
},
|
|
15
|
+
"kind": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"default": "DataProduct",
|
|
18
|
+
"description": "The kind of file this is. Valid value is `DataProduct`.",
|
|
19
|
+
"enum": ["DataProduct"]
|
|
20
|
+
},
|
|
21
|
+
"id": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "A unique identifier used to reduce the risk of dataset name collisions, such as a UUID."
|
|
24
|
+
},
|
|
25
|
+
"name": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Name of the data product."
|
|
28
|
+
},
|
|
29
|
+
"version": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Current version of the data product. Not required, but highly recommended."
|
|
32
|
+
},
|
|
33
|
+
"status": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Current status of the data product.",
|
|
36
|
+
"examples": ["proposed", "draft", "active", "deprecated", "retired"]
|
|
37
|
+
},
|
|
38
|
+
"domain": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Business domain"
|
|
41
|
+
},
|
|
42
|
+
"tenant": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Organization identifier"
|
|
45
|
+
},
|
|
46
|
+
"authoritativeDefinitions": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"description": "List of links to sources that provide more details on the data contract.",
|
|
49
|
+
"items": {
|
|
50
|
+
"$ref": "#/$defs/AuthoritativeDefinition"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"description": {
|
|
54
|
+
"$ref": "#/$defs/Description"
|
|
55
|
+
},
|
|
56
|
+
"customProperties": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"description": "A list of key/value pairs for custom properties.",
|
|
59
|
+
"items": {
|
|
60
|
+
"$ref": "#/$defs/CustomProperty"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"tags": {
|
|
64
|
+
"$ref": "#/$defs/Tags"
|
|
65
|
+
},
|
|
66
|
+
"inputPorts": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"description": "List of objects describing an input port. You need at least one as a data product needs to get data somewhere.",
|
|
69
|
+
"items": {
|
|
70
|
+
"$ref": "#/$defs/InputPort"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"outputPorts": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"description": "List of objects describing an output port. You need at least one, as a data product without output is useless.",
|
|
76
|
+
"items": {
|
|
77
|
+
"$ref": "#/$defs/OutputPort"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"managementPorts": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"description": "Management ports define access points for managing the data product.",
|
|
83
|
+
"items": {
|
|
84
|
+
"$ref": "#/$defs/ManagementPort"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"support": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"description": "Support and communication channels.",
|
|
90
|
+
"items": {
|
|
91
|
+
"$ref": "#/$defs/Support"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"team": {
|
|
95
|
+
"$ref": "#/$defs/Team"
|
|
96
|
+
},
|
|
97
|
+
"productCreatedTs": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"format": "date-time",
|
|
100
|
+
"description": "Timestamp in UTC of when the data product was created, using ISO 8601."
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"$defs": {
|
|
104
|
+
"Tags": {
|
|
105
|
+
"type": "array",
|
|
106
|
+
"description": "A list of tags that may be assigned to the elements (object or property); the tags keyword may appear at any level. Tags may be used to better categorize an element. For example, `finance`, `sensitive`, `employee_record`.",
|
|
107
|
+
"examples": ["finance", "sensitive", "employee_record"],
|
|
108
|
+
"items": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"Description": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"description": "Object containing the descriptions.",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"properties": {
|
|
117
|
+
"purpose": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"description": "Intended purpose for the provided data."
|
|
120
|
+
},
|
|
121
|
+
"limitations": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"description": "Technical, compliance, and legal limitations for data use."
|
|
124
|
+
},
|
|
125
|
+
"usage": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"description": "Recommended usage of the data."
|
|
128
|
+
},
|
|
129
|
+
"authoritativeDefinitions": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"description": "List of links to sources that provide more details on the data contract.",
|
|
132
|
+
"items": {
|
|
133
|
+
"$ref": "#/$defs/AuthoritativeDefinition"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"customProperties": {
|
|
137
|
+
"type": "array",
|
|
138
|
+
"description": "A list of key/value pairs for custom properties.",
|
|
139
|
+
"items": {
|
|
140
|
+
"$ref": "#/$defs/CustomProperty"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"CustomProperty": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"description": "A key/value pair for custom properties.",
|
|
148
|
+
"additionalProperties": false,
|
|
149
|
+
"properties": {
|
|
150
|
+
"property": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "The name of the key. Names should be in camel case, the same as if they were permanent properties in the contract."
|
|
153
|
+
},
|
|
154
|
+
"value": {
|
|
155
|
+
"description": "The value of the key."
|
|
156
|
+
},
|
|
157
|
+
"description": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "Optional description."
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"required": ["property", "value"]
|
|
163
|
+
},
|
|
164
|
+
"AuthoritativeDefinition": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"description": "A type/link pair for authoritative definitions.",
|
|
167
|
+
"additionalProperties": false,
|
|
168
|
+
"properties": {
|
|
169
|
+
"type": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"description": "Type of definition for authority.",
|
|
172
|
+
"examples": ["businessDefinition", "transformationImplementation", "videoTutorial", "tutorial", "implementation"]
|
|
173
|
+
},
|
|
174
|
+
"url": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"format": "uri",
|
|
177
|
+
"description": "URL to the authority."
|
|
178
|
+
},
|
|
179
|
+
"description": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"description": "Optional description."
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"required": ["type", "url"]
|
|
185
|
+
},
|
|
186
|
+
"InputPort": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"description": "An input port describing expectations.",
|
|
189
|
+
"additionalProperties": false,
|
|
190
|
+
"properties": {
|
|
191
|
+
"name": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"description": "Name of the input port."
|
|
194
|
+
},
|
|
195
|
+
"version": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"description": "Version of the input port."
|
|
198
|
+
},
|
|
199
|
+
"contractId": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"description": "Contract ID for the input port."
|
|
202
|
+
},
|
|
203
|
+
"tags": {
|
|
204
|
+
"$ref": "#/$defs/Tags"
|
|
205
|
+
},
|
|
206
|
+
"customProperties": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"description": "Custom properties block.",
|
|
209
|
+
"items": {
|
|
210
|
+
"$ref": "#/$defs/CustomProperty"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"authoritativeDefinitions": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"description": "Authoritative definitions block.",
|
|
216
|
+
"items": {
|
|
217
|
+
"$ref": "#/$defs/AuthoritativeDefinition"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"required": ["name", "version", "contractId"]
|
|
222
|
+
},
|
|
223
|
+
"OutputPort": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"description": "An output port describing promises.",
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"properties": {
|
|
228
|
+
"name": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"description": "Name of the output port."
|
|
231
|
+
},
|
|
232
|
+
"description": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"description": "Human readable short description of the output port."
|
|
235
|
+
},
|
|
236
|
+
"type": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"description": "There can be different types of output ports, each automated and handled differently. Here you can indicate the type."
|
|
239
|
+
},
|
|
240
|
+
"version": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"description": "For each version, a different instance of the output port is listed. The combination of the name and version is the key."
|
|
243
|
+
},
|
|
244
|
+
"contractId": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "Contract ID for the output port."
|
|
247
|
+
},
|
|
248
|
+
"sbom": {
|
|
249
|
+
"type": "array",
|
|
250
|
+
"description": "The SBOM can/should be at the version level.",
|
|
251
|
+
"items": {
|
|
252
|
+
"$ref": "#/$defs/SBOM"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"inputContracts": {
|
|
256
|
+
"type": "array",
|
|
257
|
+
"description": "Dependencies or input contracts.",
|
|
258
|
+
"items": {
|
|
259
|
+
"$ref": "#/$defs/InputContract"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"tags": {
|
|
263
|
+
"$ref": "#/$defs/Tags"
|
|
264
|
+
},
|
|
265
|
+
"customProperties": {
|
|
266
|
+
"type": "array",
|
|
267
|
+
"description": "Custom properties block.",
|
|
268
|
+
"items": {
|
|
269
|
+
"$ref": "#/$defs/CustomProperty"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"authoritativeDefinitions": {
|
|
273
|
+
"type": "array",
|
|
274
|
+
"description": "Authoritative definitions block.",
|
|
275
|
+
"items": {
|
|
276
|
+
"$ref": "#/$defs/AuthoritativeDefinition"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"required": ["name", "version"]
|
|
281
|
+
},
|
|
282
|
+
"SBOM": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"description": "Software Bill of Materials.",
|
|
285
|
+
"additionalProperties": false,
|
|
286
|
+
"properties": {
|
|
287
|
+
"type": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"default": "external",
|
|
290
|
+
"description": "Type of SBOM."
|
|
291
|
+
},
|
|
292
|
+
"url": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"format": "uri",
|
|
295
|
+
"description": "URL to the SBOM."
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"required": ["url"]
|
|
299
|
+
},
|
|
300
|
+
"InputContract": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"description": "Input contract dependency.",
|
|
303
|
+
"additionalProperties": false,
|
|
304
|
+
"properties": {
|
|
305
|
+
"id": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"description": "Contract ID or contractId."
|
|
308
|
+
},
|
|
309
|
+
"version": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"description": "Version of the input contract."
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"required": ["id", "version"]
|
|
315
|
+
},
|
|
316
|
+
"ManagementPort": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"description": "Management port for managing the data product.",
|
|
319
|
+
"additionalProperties": false,
|
|
320
|
+
"properties": {
|
|
321
|
+
"name": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"description": "Endpoint identifier or unique name."
|
|
324
|
+
},
|
|
325
|
+
"content": {
|
|
326
|
+
"type": "string",
|
|
327
|
+
"description": "Content type.",
|
|
328
|
+
"examples": ["discoverability", "observability", "control", "dictionary"]
|
|
329
|
+
},
|
|
330
|
+
"type": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"default": "rest",
|
|
333
|
+
"description": "Type: can be `rest` or `topic`. Default is `rest`.",
|
|
334
|
+
"examples": ["rest", "topic"]
|
|
335
|
+
},
|
|
336
|
+
"url": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"format": "uri",
|
|
339
|
+
"description": "URL to access the endpoint."
|
|
340
|
+
},
|
|
341
|
+
"channel": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"description": "Channel to communicate with the data product."
|
|
344
|
+
},
|
|
345
|
+
"description": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"description": "Purpose and usage."
|
|
348
|
+
},
|
|
349
|
+
"tags": {
|
|
350
|
+
"$ref": "#/$defs/Tags"
|
|
351
|
+
},
|
|
352
|
+
"customProperties": {
|
|
353
|
+
"type": "array",
|
|
354
|
+
"description": "Custom properties block.",
|
|
355
|
+
"items": {
|
|
356
|
+
"$ref": "#/$defs/CustomProperty"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"authoritativeDefinitions": {
|
|
360
|
+
"type": "array",
|
|
361
|
+
"description": "Authoritative definitions block.",
|
|
362
|
+
"items": {
|
|
363
|
+
"$ref": "#/$defs/AuthoritativeDefinition"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"required": ["name", "content"]
|
|
368
|
+
},
|
|
369
|
+
"Support": {
|
|
370
|
+
"type": "object",
|
|
371
|
+
"description": "Support channel.",
|
|
372
|
+
"additionalProperties": false,
|
|
373
|
+
"properties": {
|
|
374
|
+
"channel": {
|
|
375
|
+
"type": "string",
|
|
376
|
+
"description": "Channel name or identifier."
|
|
377
|
+
},
|
|
378
|
+
"url": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"format": "uri",
|
|
381
|
+
"description": "Access URL using normal URL scheme (https, mailto, etc.)."
|
|
382
|
+
},
|
|
383
|
+
"description": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"description": "Description of the channel, free text."
|
|
386
|
+
},
|
|
387
|
+
"tool": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"description": "Name of the tool.",
|
|
390
|
+
"examples": ["email", "slack", "teams", "discord", "ticket", "other"]
|
|
391
|
+
},
|
|
392
|
+
"scope": {
|
|
393
|
+
"type": "string",
|
|
394
|
+
"description": "Scope can be: `interactive`, `announcements`, `issues`.",
|
|
395
|
+
"examples": ["interactive", "announcements", "issues"]
|
|
396
|
+
},
|
|
397
|
+
"invitationUrl": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"format": "uri",
|
|
400
|
+
"description": "Some tools uses invitation URL for requesting or subscribing. Follows the URL scheme."
|
|
401
|
+
},
|
|
402
|
+
"tags": {
|
|
403
|
+
"$ref": "#/$defs/Tags"
|
|
404
|
+
},
|
|
405
|
+
"customProperties": {
|
|
406
|
+
"type": "array",
|
|
407
|
+
"description": "Custom properties block.",
|
|
408
|
+
"items": {
|
|
409
|
+
"$ref": "#/$defs/CustomProperty"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"authoritativeDefinitions": {
|
|
413
|
+
"type": "array",
|
|
414
|
+
"description": "Authoritative definitions block.",
|
|
415
|
+
"items": {
|
|
416
|
+
"$ref": "#/$defs/AuthoritativeDefinition"
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"required": ["channel", "url"]
|
|
421
|
+
},
|
|
422
|
+
"TeamMember": {
|
|
423
|
+
"type": "object",
|
|
424
|
+
"description": "Team member information.",
|
|
425
|
+
"additionalProperties": false,
|
|
426
|
+
"properties": {
|
|
427
|
+
"username": {
|
|
428
|
+
"type": "string",
|
|
429
|
+
"description": "The user's username or email."
|
|
430
|
+
},
|
|
431
|
+
"name": {
|
|
432
|
+
"type": "string",
|
|
433
|
+
"description": "The user's name."
|
|
434
|
+
},
|
|
435
|
+
"description": {
|
|
436
|
+
"type": "string",
|
|
437
|
+
"description": "The user's description."
|
|
438
|
+
},
|
|
439
|
+
"role": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"description": "The user's job role; Examples might be owner, data steward. There is no limit on the role."
|
|
442
|
+
},
|
|
443
|
+
"dateIn": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"format": "date",
|
|
446
|
+
"description": "The date when the user joined the team."
|
|
447
|
+
},
|
|
448
|
+
"dateOut": {
|
|
449
|
+
"type": "string",
|
|
450
|
+
"format": "date",
|
|
451
|
+
"description": "The date when the user ceased to be part of the team."
|
|
452
|
+
},
|
|
453
|
+
"replacedByUsername": {
|
|
454
|
+
"type": "string",
|
|
455
|
+
"description": "The username of the user who replaced the previous user."
|
|
456
|
+
},
|
|
457
|
+
"tags": {
|
|
458
|
+
"$ref": "#/$defs/Tags"
|
|
459
|
+
},
|
|
460
|
+
"customProperties": {
|
|
461
|
+
"type": "array",
|
|
462
|
+
"description": "Custom properties block.",
|
|
463
|
+
"items": {
|
|
464
|
+
"$ref": "#/$defs/CustomProperty"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"authoritativeDefinitions": {
|
|
468
|
+
"type": "array",
|
|
469
|
+
"description": "Authoritative definitions block.",
|
|
470
|
+
"items": {
|
|
471
|
+
"$ref": "#/$defs/AuthoritativeDefinition"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"required": ["username"]
|
|
476
|
+
},
|
|
477
|
+
"Team": {
|
|
478
|
+
"type": "object",
|
|
479
|
+
"description": "Team information.",
|
|
480
|
+
"additionalProperties": false,
|
|
481
|
+
"properties": {
|
|
482
|
+
"name": {
|
|
483
|
+
"type": "string",
|
|
484
|
+
"description": "Team name."
|
|
485
|
+
},
|
|
486
|
+
"description": {
|
|
487
|
+
"type": "string",
|
|
488
|
+
"description": "Team description."
|
|
489
|
+
},
|
|
490
|
+
"members": {
|
|
491
|
+
"type": "array",
|
|
492
|
+
"description": "List of members.",
|
|
493
|
+
"items": {
|
|
494
|
+
"$ref": "#/$defs/TeamMember"
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"tags": {
|
|
498
|
+
"$ref": "#/$defs/Tags"
|
|
499
|
+
},
|
|
500
|
+
"customProperties": {
|
|
501
|
+
"type": "array",
|
|
502
|
+
"description": "Custom properties block.",
|
|
503
|
+
"items": {
|
|
504
|
+
"$ref": "#/$defs/CustomProperty"
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
"authoritativeDefinitions": {
|
|
508
|
+
"type": "array",
|
|
509
|
+
"description": "Authoritative definitions block.",
|
|
510
|
+
"items": {
|
|
511
|
+
"$ref": "#/$defs/AuthoritativeDefinition"
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dataproduct-cli
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: The dataproduct CLI is an open source command-line tool for working with data products. It uses data product YAML files following the Open Data Product Standard (ODPS) to lint the definition against the standard and publish it to Entropy Data. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
|
|
5
|
+
Author-email: Michael Kutz <michael.kutz@entropy-data.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/datacontract/dataproduct-cli
|
|
8
|
+
Project-URL: Repository, https://github.com/datacontract/dataproduct-cli
|
|
9
|
+
Project-URL: Issues, https://github.com/datacontract/dataproduct-cli/issues
|
|
10
|
+
Keywords: data-product,data-products,odps,open-data-product-standard,data-governance,data-mesh,data-engineering
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Information Technology
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Database
|
|
23
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
24
|
+
Requires-Python: <3.15,>=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: typer<0.28,>=0.18.0
|
|
28
|
+
Requires-Dist: click<9.0.0,>=8.1.0
|
|
29
|
+
Requires-Dist: pydantic<2.14.0,>=2.8.2
|
|
30
|
+
Requires-Dist: pyyaml~=6.0.1
|
|
31
|
+
Requires-Dist: requests<2.35,>=2.31
|
|
32
|
+
Requires-Dist: jsonschema<5.0.0,>=4.23.0
|
|
33
|
+
Requires-Dist: rich<16.0,>=13.7
|
|
34
|
+
Requires-Dist: python-dotenv<2.0.0,>=1.0.0
|
|
35
|
+
Requires-Dist: typing-extensions>=4.7.0
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-xdist; extra == "dev"
|
|
39
|
+
Requires-Dist: ruff==0.16.1; extra == "dev"
|
|
40
|
+
Requires-Dist: pre-commit<4.7.0,>=3.7.1; extra == "dev"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# Data Product CLI
|
|
44
|
+
|
|
45
|
+
The `dataproduct` CLI is an open-source command-line tool for working with
|
|
46
|
+
**data products** defined with the
|
|
47
|
+
[Open Data Product Standard (ODPS)](https://bitol-io.github.io/open-data-product-standard/v1.0.0/).
|
|
48
|
+
|
|
49
|
+
It is the data-product sibling of
|
|
50
|
+
[`datacontract-cli`](https://github.com/datacontract/datacontract-cli) (which
|
|
51
|
+
targets the Open Data **Contract** Standard) and mirrors its technology and
|
|
52
|
+
release mechanism. The tool is written in Python and can be used standalone, in
|
|
53
|
+
CI/CD, or as a Python library.
|
|
54
|
+
|
|
55
|
+
> The behavior of each command is specified in [`specs/`](specs/).
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
uv tool install --python python3.11 dataproduct-cli
|
|
61
|
+
# or
|
|
62
|
+
pip install dataproduct-cli
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Commands
|
|
66
|
+
|
|
67
|
+
### `init` — create a data product
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
dataproduct init # writes ./dataproduct.odps.yaml
|
|
71
|
+
dataproduct init my.odps.yaml # custom path
|
|
72
|
+
dataproduct init --overwrite # replace an existing file
|
|
73
|
+
dataproduct init --template <url|path> # seed from a template or existing product
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### `lint` — validate against the ODPS standard
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
dataproduct lint # lints ./dataproduct.odps.yaml
|
|
80
|
+
dataproduct lint my.odps.yaml
|
|
81
|
+
dataproduct lint --all-errors # report every schema violation
|
|
82
|
+
dataproduct lint --output-format junit --output TEST-dataproduct.xml
|
|
83
|
+
dataproduct lint --json-schema ./odps.schema.json # validate against a custom schema
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Validation is schema-only in 0.1: the data product is checked against the
|
|
87
|
+
bundled ODPS v1.0.0 JSON Schema. Exit code is `0` when valid, `1` otherwise.
|
|
88
|
+
|
|
89
|
+
### `publish` — publish to Entropy Data
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
export ENTROPY_DATA_API_KEY=... # from Entropy Data → Settings → API Keys
|
|
93
|
+
dataproduct publish my.odps.yaml
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`publish` sends `PUT {host}/api/dataproducts/{id}` with an `x-api-key` header.
|
|
97
|
+
The host defaults to `https://api.entropy-data.com` and can be overridden with
|
|
98
|
+
`ENTROPY_DATA_HOST`. The referenced `team` must already exist in your org.
|
|
99
|
+
|
|
100
|
+
## Configuration
|
|
101
|
+
|
|
102
|
+
| Purpose | Variable (with fallbacks) |
|
|
103
|
+
|---|---|
|
|
104
|
+
| API host | `ENTROPY_DATA_HOST` → `DATAMESH_MANAGER_HOST` → `DATACONTRACT_MANAGER_HOST` → `https://api.entropy-data.com` |
|
|
105
|
+
| API key | `ENTROPY_DATA_API_KEY` → `DATAMESH_MANAGER_API_KEY` → `DATACONTRACT_MANAGER_API_KEY` |
|
|
106
|
+
|
|
107
|
+
`.env` files are loaded automatically.
|
|
108
|
+
|
|
109
|
+
## Use as a library
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from dataproduct.data_product import DataProduct
|
|
113
|
+
|
|
114
|
+
run = DataProduct(data_product_file="dataproduct.odps.yaml").lint()
|
|
115
|
+
assert run.result == "passed"
|
|
116
|
+
|
|
117
|
+
DataProduct(data_product_file="dataproduct.odps.yaml").publish()
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Development
|
|
121
|
+
|
|
122
|
+
See [AGENTS.md](AGENTS.md).
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
MIT
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
dataproduct/__init__.py,sha256=0f1WpVI48SdLnWWFm0AZ126Mio90p1aX5QucHI-7Pfc,192
|
|
2
|
+
dataproduct/cli.py,sha256=I4ojBWQeHV_pZZeDBRqTF2wFL_IpJPUr-MAGS3bp2A4,2414
|
|
3
|
+
dataproduct/command_init.py,sha256=PhHvNEt4Ylc2uFVNS4PYDV76FU6qNxTGa0tvxdxWLS4,1108
|
|
4
|
+
dataproduct/command_lint.py,sha256=rWbx2ae-41DefKqlcAvzvjzJyYsCSI4l9myWVJfvL7I,1884
|
|
5
|
+
dataproduct/command_publish.py,sha256=HbMrZ8sCyV7rU4WSj8YqHTZPv3dIREpwvLV_8Mp8plw,1577
|
|
6
|
+
dataproduct/data_product.py,sha256=6IPzkLf4u8au87ThksqXY7SsTZsRyQbPKog4-2-XcEw,3544
|
|
7
|
+
dataproduct/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
dataproduct/config/__init__.py,sha256=PKpFxQaHNpCJB11PSHdBvrGWEMal0WdynLiPQO0u358,2047
|
|
9
|
+
dataproduct/init/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
dataproduct/init/init_template.py,sha256=ff7aLFFi9G3VoWx69FbTA5NyvFi1kQWIkBKbejCu6IM,913
|
|
11
|
+
dataproduct/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
dataproduct/integration/entropy_data.py,sha256=sExYYYXgWE9DIHmquAlDOuxJ-H8Wa9o8NmP2V6rQxeo,2871
|
|
13
|
+
dataproduct/lint/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
dataproduct/lint/files.py,sha256=DTqwvnwEk6-KHF8yp6FfoItMczF93FPDdY8eGUb4rkQ,1353
|
|
15
|
+
dataproduct/lint/resolve.py,sha256=O0g7bcG-XWN3SdlmvJRnsvWVAoFkrksjS1-QzuH04go,418
|
|
16
|
+
dataproduct/lint/schema.py,sha256=JYJtUiIzihIJ4w9mu4qwg3zRbovMdSn6FYqMIJfqca0,1541
|
|
17
|
+
dataproduct/lint/validate.py,sha256=2eAgJewBQw7bYWuENAK_T92mbix_7wqrrhHrZsQrOcA,2027
|
|
18
|
+
dataproduct/model/__init__.py,sha256=r5FRAjMqeeXcuGEmS8ABf5-3eRzY6_sh33gDmtftl68,185
|
|
19
|
+
dataproduct/model/exceptions.py,sha256=AuQY7q5qdsMU--wyZremnShl4jYpRpAGdwOIxzyEQws,595
|
|
20
|
+
dataproduct/model/run.py,sha256=6jJHDG1XbiXjVyuNPxFyZhecC7dZOha-2JtY92DwHvI,2049
|
|
21
|
+
dataproduct/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
+
dataproduct/output/output_format.py,sha256=zKNXIi_HEPOr915_hNSE69P8Ytr8-3ZbheyVLS6gcIc,93
|
|
23
|
+
dataproduct/output/result_writer.py,sha256=2zj6rhXZ1446y8NyJYv1u6RQ3c4I-mNzhNq6d_h-tKM,2509
|
|
24
|
+
dataproduct/schemas/odps-1.0.0.init.yaml,sha256=HcuCc8t_-gtUS1zxUbn8aL91CaMyKcarqtZu-yogxDU,812
|
|
25
|
+
dataproduct/schemas/odps-1.0.0.schema.json,sha256=FyTHobuoy_Xalx8rFqNUpdqnm4iLTvSu7v2NPNem008,15782
|
|
26
|
+
dataproduct_cli-0.0.1.dist-info/licenses/LICENSE,sha256=vFIVGn2cFJ7I9qKOdeHR4abFVTcmm_-cXKXqLw20GiA,1070
|
|
27
|
+
dataproduct_cli-0.0.1.dist-info/METADATA,sha256=PqiviDUGSTK12MXYqqwSVpgvI1yUA5R-JtkTNM6aVDU,4795
|
|
28
|
+
dataproduct_cli-0.0.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
29
|
+
dataproduct_cli-0.0.1.dist-info/entry_points.txt,sha256=rYeGFlPpbXI_iTRtPTBwXtTyVGcsBVMGRi39Kfe2jFs,53
|
|
30
|
+
dataproduct_cli-0.0.1.dist-info/top_level.txt,sha256=j6VMVQkfs8ScWyQ76LokrdQuqn4rU2BT0ztmMyD3B60,12
|
|
31
|
+
dataproduct_cli-0.0.1.dist-info/RECORD,,
|