digitalhub 0.14.0b1__py3-none-any.whl → 0.14.0b2__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.
Potentially problematic release.
This version of digitalhub might be problematic. Click here for more details.
- digitalhub/entities/_base/executable/entity.py +20 -12
- digitalhub/entities/_base/material/entity.py +8 -4
- digitalhub/entities/_processors/base.py +8 -8
- digitalhub/entities/_processors/context.py +15 -15
- digitalhub/entities/_processors/utils.py +2 -2
- digitalhub/entities/artifact/crud.py +23 -7
- digitalhub/entities/dataitem/crud.py +28 -9
- digitalhub/entities/dataitem/table/entity.py +28 -1
- digitalhub/entities/dataitem/utils.py +4 -0
- digitalhub/entities/function/_base/entity.py +3 -3
- digitalhub/entities/function/crud.py +23 -7
- digitalhub/entities/model/_base/entity.py +51 -9
- digitalhub/entities/model/crud.py +21 -7
- digitalhub/entities/project/_base/entity.py +121 -41
- digitalhub/entities/project/crud.py +20 -6
- digitalhub/entities/run/_base/entity.py +58 -15
- digitalhub/entities/run/crud.py +22 -7
- digitalhub/entities/secret/crud.py +21 -7
- digitalhub/entities/task/_base/entity.py +4 -4
- digitalhub/entities/task/crud.py +18 -6
- digitalhub/entities/trigger/crud.py +23 -7
- digitalhub/entities/workflow/_base/entity.py +3 -3
- digitalhub/entities/workflow/crud.py +23 -7
- digitalhub/factory/entity.py +283 -0
- digitalhub/factory/registry.py +221 -0
- digitalhub/factory/runtime.py +44 -0
- digitalhub/runtimes/_base.py +2 -2
- digitalhub/stores/client/dhcore/client.py +6 -2
- digitalhub/stores/credentials/configurator.py +4 -5
- digitalhub/stores/data/s3/configurator.py +2 -2
- digitalhub/stores/readers/data/pandas/reader.py +9 -3
- {digitalhub-0.14.0b1.dist-info → digitalhub-0.14.0b2.dist-info}/METADATA +1 -1
- {digitalhub-0.14.0b1.dist-info → digitalhub-0.14.0b2.dist-info}/RECORD +36 -34
- digitalhub/factory/factory.py +0 -460
- {digitalhub-0.14.0b1.dist-info → digitalhub-0.14.0b2.dist-info}/WHEEL +0 -0
- {digitalhub-0.14.0b1.dist-info → digitalhub-0.14.0b2.dist-info}/licenses/AUTHORS +0 -0
- {digitalhub-0.14.0b1.dist-info → digitalhub-0.14.0b2.dist-info}/licenses/LICENSE +0 -0
|
@@ -16,9 +16,9 @@ digitalhub/entities/_base/entity/metadata.py,sha256=iX_dwpABPh3EBPTJs5mtSrwnylw4
|
|
|
16
16
|
digitalhub/entities/_base/entity/spec.py,sha256=nGlE8xgAZXT5zs1annWaPLvPRYaqxqzjjrhAhvNiQkA,1608
|
|
17
17
|
digitalhub/entities/_base/entity/status.py,sha256=0txG13WDPJE-vRAUkJQYEHMsSzer6qTvTo7xqzbg66Y,1152
|
|
18
18
|
digitalhub/entities/_base/executable/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
19
|
-
digitalhub/entities/_base/executable/entity.py,sha256=
|
|
19
|
+
digitalhub/entities/_base/executable/entity.py,sha256=UHWBO8q_OIf4Pxnd0AzVoCamqzOFEJU2BHWU7Z_OXYA,13516
|
|
20
20
|
digitalhub/entities/_base/material/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
21
|
-
digitalhub/entities/_base/material/entity.py,sha256=
|
|
21
|
+
digitalhub/entities/_base/material/entity.py,sha256=Agh4M7u4zlWTZbYiSz5cHfsLo-4nOUeoLxxzzS-5rm4,6819
|
|
22
22
|
digitalhub/entities/_base/material/spec.py,sha256=7lF_Pv7zGJUAR2ixmmCt-UPnoASgOLxnb9yffqwBVp8,544
|
|
23
23
|
digitalhub/entities/_base/material/status.py,sha256=vAIb5qti5KxdIPdB9WYmWrCnqwGyUxuF6CpGSpcWxbE,520
|
|
24
24
|
digitalhub/entities/_base/material/utils.py,sha256=diFtnOjCumenzOL1Su0ROA3KdrIJlRq5Jh845axvAtU,2512
|
|
@@ -41,11 +41,11 @@ digitalhub/entities/_constructors/spec.py,sha256=vtCcVTYu8Rg6KRvr5awvtkvCAyLtQGl
|
|
|
41
41
|
digitalhub/entities/_constructors/status.py,sha256=PrnouXDllZxS7t6pzbMohTov8QTne0cx3WVE37JGoSw,1298
|
|
42
42
|
digitalhub/entities/_constructors/uuid.py,sha256=7QhQ9epJAnYLCKUPY6AMXOe72nPT8xZRnNM98p_vTnM,663
|
|
43
43
|
digitalhub/entities/_processors/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
44
|
-
digitalhub/entities/_processors/base.py,sha256=
|
|
45
|
-
digitalhub/entities/_processors/context.py,sha256=
|
|
46
|
-
digitalhub/entities/_processors/utils.py,sha256=
|
|
44
|
+
digitalhub/entities/_processors/base.py,sha256=Xon16WpnIPkf_MmnSZpJ36yQ4qG-iABgMpZOk4mgWZ0,18772
|
|
45
|
+
digitalhub/entities/_processors/context.py,sha256=N_jzKLuqh1OVpaDlXq6xChk8z9T_M-VX3cjQP1MLKj4,46926
|
|
46
|
+
digitalhub/entities/_processors/utils.py,sha256=fzrR0lEzyTvWS_lxtvPni-HptSiayv35Y7gQRn_P0TY,6328
|
|
47
47
|
digitalhub/entities/artifact/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
48
|
-
digitalhub/entities/artifact/crud.py,sha256=
|
|
48
|
+
digitalhub/entities/artifact/crud.py,sha256=C_KjxaLynO4Fa4ejE5H3dzDX9isfM0hvg78OXI2Qa70,8745
|
|
49
49
|
digitalhub/entities/artifact/utils.py,sha256=nBBdTe3XW4ZJQnO9WennEUMJOovYMFkz3esK8IWkdMw,2434
|
|
50
50
|
digitalhub/entities/artifact/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
51
51
|
digitalhub/entities/artifact/_base/builder.py,sha256=IByi2iCzA68WdYQ4BXLUEByamp1cnlcjlphnryWXR3c,2364
|
|
@@ -58,8 +58,8 @@ digitalhub/entities/artifact/artifact/entity.py,sha256=__dfLAo5HHbky-l_XQpPag_IE
|
|
|
58
58
|
digitalhub/entities/artifact/artifact/spec.py,sha256=BAbL-7XtOF_tDnLizR39YLmKAdRAr3sCyMNr1K5FVNI,740
|
|
59
59
|
digitalhub/entities/artifact/artifact/status.py,sha256=Aela65491_2NqqZG2OCvTsY9Gfverb1ng-_sYttcUI8,413
|
|
60
60
|
digitalhub/entities/dataitem/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
61
|
-
digitalhub/entities/dataitem/crud.py,sha256=
|
|
62
|
-
digitalhub/entities/dataitem/utils.py,sha256=
|
|
61
|
+
digitalhub/entities/dataitem/crud.py,sha256=noHNpYRWtFMUXGNx5ar3BeUs9BTKLbP_ZefuU38uBSY,9569
|
|
62
|
+
digitalhub/entities/dataitem/utils.py,sha256=RYZAs4fNfi2sEv-sRWhsKPsLLz2LmUofsOeBE11diFE,7703
|
|
63
63
|
digitalhub/entities/dataitem/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
64
64
|
digitalhub/entities/dataitem/_base/builder.py,sha256=uX5vxDJ8GxVk49NW9mHBKYhinJnfzLBObI7zy4J0TB0,2364
|
|
65
65
|
digitalhub/entities/dataitem/_base/entity.py,sha256=6GrqOY-S2p_sljzUdWgl5o_DlAbSbjIyCp7JJh__U_U,1053
|
|
@@ -77,24 +77,24 @@ digitalhub/entities/dataitem/iceberg/spec.py,sha256=vtfaV9OE1WBKTtTHoYSdMnjQfUey
|
|
|
77
77
|
digitalhub/entities/dataitem/iceberg/status.py,sha256=HMBNAzqQplUxmnnIVb57cCcjhmUQ1v8K3wAGUnYdRlA,310
|
|
78
78
|
digitalhub/entities/dataitem/table/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
79
79
|
digitalhub/entities/dataitem/table/builder.py,sha256=FoXrW09HXCZ0XNnCPHNSZs_iLrIG_8WPCZo_5Vq6_YI,824
|
|
80
|
-
digitalhub/entities/dataitem/table/entity.py,sha256=
|
|
80
|
+
digitalhub/entities/dataitem/table/entity.py,sha256=_eKntvLnUEjL-N6QlUxmDbs_FHLdmaEGg4y2BJm9aGQ,4717
|
|
81
81
|
digitalhub/entities/dataitem/table/models.py,sha256=5wqwm4GQjikdJVtDPEn5hwUR_FWxW_7hwIf-GLikqjQ,1269
|
|
82
82
|
digitalhub/entities/dataitem/table/spec.py,sha256=oYgh5XqFrdzIpGxXe1FW5bsGlFHokUJdHJSamuyFs4k,779
|
|
83
83
|
digitalhub/entities/dataitem/table/status.py,sha256=_-_UrcPZh3maGENDZ99pLA8Gz1yrXapvsxs_lPI1skw,306
|
|
84
84
|
digitalhub/entities/dataitem/table/utils.py,sha256=lKo977VKvjtq3EPLIf-V6-LAwSz7ZPgadvaAmK42ML8,2555
|
|
85
85
|
digitalhub/entities/function/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
86
|
-
digitalhub/entities/function/crud.py,sha256=
|
|
86
|
+
digitalhub/entities/function/crud.py,sha256=MKxEPe_N3efMqOCkUlDcSM--5wm7FMpyhG5eu3yNCBY,7291
|
|
87
87
|
digitalhub/entities/function/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
88
88
|
digitalhub/entities/function/_base/builder.py,sha256=tmpcf5VGi5T24AQaa_lvmdi53mliObGMd59eDAwlWlw,2143
|
|
89
|
-
digitalhub/entities/function/_base/entity.py,sha256=
|
|
89
|
+
digitalhub/entities/function/_base/entity.py,sha256=hv4YaQBwVjixcXh5dgUX3njiNS9Rl8lgEZa9LxaYrew,3229
|
|
90
90
|
digitalhub/entities/function/_base/spec.py,sha256=qDiqfe6zSFYYH-kXPmm4R_LId985V24hO2ikFApv-6U,382
|
|
91
91
|
digitalhub/entities/function/_base/status.py,sha256=wjCUr2HoQQUL4fwTjvPE8eubkCeVxbe2VV8zs0BJ5RY,278
|
|
92
92
|
digitalhub/entities/model/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
93
|
-
digitalhub/entities/model/crud.py,sha256=
|
|
93
|
+
digitalhub/entities/model/crud.py,sha256=lCNMSJSQWcDxxlYUQkfGVNNhYp42_E8SPoQfs4evps0,8491
|
|
94
94
|
digitalhub/entities/model/utils.py,sha256=7YQXr2TbvRAGVrn5okREMWDJQ-Y4PcDu_EyxfTKh6Ck,2431
|
|
95
95
|
digitalhub/entities/model/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
96
96
|
digitalhub/entities/model/_base/builder.py,sha256=6kG8-NNIup2B2GE5ABg9QwV3LoyThnw4KEYABm9kxPg,2343
|
|
97
|
-
digitalhub/entities/model/_base/entity.py,sha256=
|
|
97
|
+
digitalhub/entities/model/_base/entity.py,sha256=N9lFNLl4573r1BUhbsuKMehVDWt3BQ06aZOoSKuIQrE,6631
|
|
98
98
|
digitalhub/entities/model/_base/spec.py,sha256=O0Gk08r6AtSL7tfYPdb-XkK2agqaIOISh9hgk8R1Bqs,973
|
|
99
99
|
digitalhub/entities/model/_base/status.py,sha256=iL7342J6-Dj0gpXANDYh9FOICunKMEgBqTs7SEC8OoI,574
|
|
100
100
|
digitalhub/entities/model/huggingface/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
@@ -120,38 +120,38 @@ digitalhub/entities/model/sklearn/entity.py,sha256=PvjW0xMyLEPH3bO8FAOEdu1H1hp1r
|
|
|
120
120
|
digitalhub/entities/model/sklearn/spec.py,sha256=AEoiRp2T46z8IrQ-BHx1rtd4b_yaEZJSQ_necKjkjjw,409
|
|
121
121
|
digitalhub/entities/model/sklearn/status.py,sha256=YBf5joe8hJH59U92m0JKFlmLCRpNj0EyR3mA7DKiVrQ,295
|
|
122
122
|
digitalhub/entities/project/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
123
|
-
digitalhub/entities/project/crud.py,sha256=
|
|
123
|
+
digitalhub/entities/project/crud.py,sha256=nUqxxHjiMMek5vD1Q31NBczqbET9k2qzYctZiYb8ocA,8791
|
|
124
124
|
digitalhub/entities/project/utils.py,sha256=-w09JUVOETxpfL0BXPv_vzV0gfxUlrSZKwAGjb8zDWI,1119
|
|
125
125
|
digitalhub/entities/project/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
126
126
|
digitalhub/entities/project/_base/builder.py,sha256=PGOqTHUsCn5CtnJusnT6U2zytxKpSNBBsFnXBgBUe2k,3884
|
|
127
|
-
digitalhub/entities/project/_base/entity.py,sha256=
|
|
127
|
+
digitalhub/entities/project/_base/entity.py,sha256=dw-Cbg6SA7uthdHN8ueAtnDG41VUEiI996VzWsdTAMk,60097
|
|
128
128
|
digitalhub/entities/project/_base/models.py,sha256=_TvjQgMd6EwzGIks9dNszBNMT5BHTwtLce-TDTObSoY,482
|
|
129
129
|
digitalhub/entities/project/_base/spec.py,sha256=AHW9qBJvjdhyUOu2V9Fu7CCzcjWawHsFfqNtN9Zhqrk,1777
|
|
130
130
|
digitalhub/entities/project/_base/status.py,sha256=afEb5CGeovM5VLPsxzP4k2QGEZjhhGkpEmVlK0Fh7sE,276
|
|
131
131
|
digitalhub/entities/run/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
132
|
-
digitalhub/entities/run/crud.py,sha256=
|
|
132
|
+
digitalhub/entities/run/crud.py,sha256=vU43rR2ne9i2-lP7w-65hIvmPcZm_1YHU_60h_Jxqto,5637
|
|
133
133
|
digitalhub/entities/run/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
134
134
|
digitalhub/entities/run/_base/builder.py,sha256=nzQln5Hvl9teYJgSql1z5rr-8iizunK0MSz4iIGb-BE,2562
|
|
135
|
-
digitalhub/entities/run/_base/entity.py,sha256=
|
|
135
|
+
digitalhub/entities/run/_base/entity.py,sha256=PHnCSb_93cSDBJahldDcuF6jud5mdZbCQchOnDUBVbU,12825
|
|
136
136
|
digitalhub/entities/run/_base/spec.py,sha256=n6S-hUBJDaHiqHqJCAdOzzAFpp0pvEa96PafND-HYdw,1830
|
|
137
137
|
digitalhub/entities/run/_base/status.py,sha256=BFHUlvFJHXWNsawThd2WpfwisFBnzyTy5KVPAIJGeNM,638
|
|
138
138
|
digitalhub/entities/secret/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
139
|
-
digitalhub/entities/secret/crud.py,sha256=
|
|
139
|
+
digitalhub/entities/secret/crud.py,sha256=69VoC6_tgkAI7AfzV2jYCgGmHU6FHVZD_plB-fJrCig,7659
|
|
140
140
|
digitalhub/entities/secret/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
141
141
|
digitalhub/entities/secret/_base/builder.py,sha256=_jx7lgvbnFNpqbwT8-HYb5GNiNSg_KWA3Ngzz6l9bc4,2303
|
|
142
142
|
digitalhub/entities/secret/_base/entity.py,sha256=LBgVS8FRZJAsLl1QMjvpVDmf_Q1qm3_feZr6F9Fv-_4,1928
|
|
143
143
|
digitalhub/entities/secret/_base/spec.py,sha256=r0wCaHLLBg2MDYPLgud8NbJ0UgjwBCoSkpCFAjvycTw,884
|
|
144
144
|
digitalhub/entities/secret/_base/status.py,sha256=cpHwYdk4hhPIXzjkqgF9cvqSCR5CKFaY-ffyV46LBsA,274
|
|
145
145
|
digitalhub/entities/task/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
146
|
-
digitalhub/entities/task/crud.py,sha256=
|
|
146
|
+
digitalhub/entities/task/crud.py,sha256=rtqGinMKwxZul-Lax8M8wi88v6gN2uYpPhuro1PkiV0,6060
|
|
147
147
|
digitalhub/entities/task/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
148
148
|
digitalhub/entities/task/_base/builder.py,sha256=1aZxj5z_9mlNWZzXJfd1sVCln6zDn-CMbWK7ToFkHQ8,2466
|
|
149
|
-
digitalhub/entities/task/_base/entity.py,sha256=
|
|
149
|
+
digitalhub/entities/task/_base/entity.py,sha256=Iq43XOP98P4oxHn_iAOPgPimKaC82K6f2msKTRZXGR0,3659
|
|
150
150
|
digitalhub/entities/task/_base/models.py,sha256=LGS_BmJG95m4WW1jsGHfjWjIbCBcQIArRwKfVYL4ro8,5851
|
|
151
151
|
digitalhub/entities/task/_base/spec.py,sha256=TQ7IXW_QnTGxFvVDk0M22DlaqMWm9Klq1Yk6LGBAhEM,2608
|
|
152
152
|
digitalhub/entities/task/_base/status.py,sha256=9TazT1vKJT8NRvh__ymKJ89CUUcf7UhnLREcvudrFTU,270
|
|
153
153
|
digitalhub/entities/trigger/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
154
|
-
digitalhub/entities/trigger/crud.py,sha256=
|
|
154
|
+
digitalhub/entities/trigger/crud.py,sha256=gni6hxGl8aZgyfLEXV7-3q4ZKFa7aKG2mBR8nrclXCo,7557
|
|
155
155
|
digitalhub/entities/trigger/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
156
156
|
digitalhub/entities/trigger/_base/builder.py,sha256=JhRVtp6JMue-05zr-bQ3gjm4Dh_g0bnBhzdJi6OR5Y0,1835
|
|
157
157
|
digitalhub/entities/trigger/_base/entity.py,sha256=m_sOX8qkGgsqqo9CpSpNisQaXwMtPk2tlB0sCfW3nes,1322
|
|
@@ -168,18 +168,20 @@ digitalhub/entities/trigger/scheduler/entity.py,sha256=05VLQK0np31QPu0Dwp8mpC2VR
|
|
|
168
168
|
digitalhub/entities/trigger/scheduler/spec.py,sha256=xU6Oh1okj_toJmMyaAy7QufPxIw_QIuwQG6OizVgdm0,784
|
|
169
169
|
digitalhub/entities/trigger/scheduler/status.py,sha256=uSyUnryssv70w-6k6F2qmrnd-OtuUwHarexjN7OconA,309
|
|
170
170
|
digitalhub/entities/workflow/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
171
|
-
digitalhub/entities/workflow/crud.py,sha256=
|
|
171
|
+
digitalhub/entities/workflow/crud.py,sha256=YobKX0zCTjJ21yBzlwmQstVznc0zPMS-dVV5YXCt700,7216
|
|
172
172
|
digitalhub/entities/workflow/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
173
173
|
digitalhub/entities/workflow/_base/builder.py,sha256=G0IyxVzHa_640vZiljTcCKF8hmfBQfrQsOj8QInU2Ok,2143
|
|
174
|
-
digitalhub/entities/workflow/_base/entity.py,sha256=
|
|
174
|
+
digitalhub/entities/workflow/_base/entity.py,sha256=ctb8w_ZleUUDUEU0uR4TxyUWfoPBnkHrnFgogyjMLnk,2652
|
|
175
175
|
digitalhub/entities/workflow/_base/spec.py,sha256=3TKGDnf8_47H5hMl38DWz7rXp2d-zsz8wRzV8fSlFb8,382
|
|
176
176
|
digitalhub/entities/workflow/_base/status.py,sha256=sIZJOUBLB7UKqCMnaGBz1l6Kc3wg9u0518ce1ebHInM,278
|
|
177
177
|
digitalhub/factory/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
178
|
+
digitalhub/factory/entity.py,sha256=frXIajtGAXw9UyXoyfLgMJQ6AirlYya1aIYXNvwyyLI,6770
|
|
178
179
|
digitalhub/factory/enums.py,sha256=PIFRsOkcxy_raOBA4VD0OmY586pLrZEXl07MFmvkI4Q,415
|
|
179
|
-
digitalhub/factory/
|
|
180
|
+
digitalhub/factory/registry.py,sha256=7mXqTYStclIxOSx6UY4W6MFAoKHfksOOPeM6emn-ALo,6883
|
|
181
|
+
digitalhub/factory/runtime.py,sha256=n8Qf8-EUY3sWTSB1M76q-vqpuv0wF8-qc6HoMW3tVNg,1018
|
|
180
182
|
digitalhub/factory/utils.py,sha256=3kqZNpupbJy0xB5BlBhb8osXwui-_epsG_gaBmEMVx8,1689
|
|
181
183
|
digitalhub/runtimes/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
182
|
-
digitalhub/runtimes/_base.py,sha256=
|
|
184
|
+
digitalhub/runtimes/_base.py,sha256=nuu8t2bAOPYGwZL9olAQVq9da7Q8OMRJhr8CxMLv6_4,3095
|
|
183
185
|
digitalhub/runtimes/builder.py,sha256=u49-y40j4ZL3fm4IG8KGHt45xFl5n3mw4unJjsJiZMs,1747
|
|
184
186
|
digitalhub/runtimes/enums.py,sha256=MCaeTOD3Bd6cdXnOlbklmRJ6rBHctJ-iJFiCrRM4Sx0,634
|
|
185
187
|
digitalhub/stores/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
@@ -193,7 +195,7 @@ digitalhub/stores/client/_base/key_builder.py,sha256=hCsufQuDPRqHIzBATiF_46-wtE5
|
|
|
193
195
|
digitalhub/stores/client/_base/params_builder.py,sha256=Vo1yaAcp0X8H43ypJnStB6xP-KH-Cz3K-bjP4537Lys,877
|
|
194
196
|
digitalhub/stores/client/dhcore/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
195
197
|
digitalhub/stores/client/dhcore/api_builder.py,sha256=tKmwPsiWWAGIHmAZ4RNjC7Q9bGTYmuKA4sL93nT-StM,4495
|
|
196
|
-
digitalhub/stores/client/dhcore/client.py,sha256=
|
|
198
|
+
digitalhub/stores/client/dhcore/client.py,sha256=SKhPYEcnzaknLInPHR6rddDYLaDEnq37T9NLlFzEiUM,17070
|
|
197
199
|
digitalhub/stores/client/dhcore/configurator.py,sha256=JUwHH1g_OhvJntYZ2LwkEPIv5ANkoTbBcal0EUMr3p4,16220
|
|
198
200
|
digitalhub/stores/client/dhcore/enums.py,sha256=QpRf7OkoQtUkMix5tp3TXoQXEkAo6sPvlmApxjsF1oI,340
|
|
199
201
|
digitalhub/stores/client/dhcore/error_parser.py,sha256=iQHyk_3WQSK8fue8slgBMHsTjVd-iO-8LkmHhPHqRcI,4618
|
|
@@ -208,7 +210,7 @@ digitalhub/stores/client/local/key_builder.py,sha256=ijISHvPcMyx591gHlSP1IZdiRrF
|
|
|
208
210
|
digitalhub/stores/client/local/params_builder.py,sha256=_hR4bwn0bpGc74iKb3PM3WUJ6s3GAgsc1zcXoWjy560,3589
|
|
209
211
|
digitalhub/stores/credentials/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
210
212
|
digitalhub/stores/credentials/api.py,sha256=mwClY8tCG62eAhbwrmK-kzYQzEJ5ZmCW52WmYsQ-004,738
|
|
211
|
-
digitalhub/stores/credentials/configurator.py,sha256=
|
|
213
|
+
digitalhub/stores/credentials/configurator.py,sha256=9HulQd_tUW4zBtc8Tv2kN66OFQM8mX164p2rAXhmczE,5489
|
|
212
214
|
digitalhub/stores/credentials/enums.py,sha256=uRJ6af0ujk3Ki4DXM9rFqBROyhlbf4EYNWml_CSdJL8,1665
|
|
213
215
|
digitalhub/stores/credentials/handler.py,sha256=CHrs3vmTkCQrtTenvVQ9QlRIntyrOOqZN-9BBJFG6JI,4355
|
|
214
216
|
digitalhub/stores/credentials/ini_module.py,sha256=L-ZVGMHtQ75j4Dg2vK9BaS8xaoIABbyADHk3-EQCqiU,3377
|
|
@@ -224,7 +226,7 @@ digitalhub/stores/data/local/store.py,sha256=epnuwyNAmx6YD5EKK-TdicUG1-ye9xfIVW7
|
|
|
224
226
|
digitalhub/stores/data/remote/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
225
227
|
digitalhub/stores/data/remote/store.py,sha256=DTrBW62zc1ix7UbLnY6YeqN0_8kGeUH_h9k7Br2HY3k,6130
|
|
226
228
|
digitalhub/stores/data/s3/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
227
|
-
digitalhub/stores/data/s3/configurator.py,sha256=
|
|
229
|
+
digitalhub/stores/data/s3/configurator.py,sha256=4mMvwmVamve013rpqECgW66shLWfZlz7gSL32PEKpxg,5086
|
|
228
230
|
digitalhub/stores/data/s3/store.py,sha256=cSEvt0dds4U4qj8pzsqgEt2Uv3ZW11rGZM-hVcIBz5Q,20723
|
|
229
231
|
digitalhub/stores/data/sql/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
230
232
|
digitalhub/stores/data/sql/configurator.py,sha256=NluShAlwoy0GXNcnBeFeoAwEF5b2mUpA6EY2OdqdYjQ,4017
|
|
@@ -238,7 +240,7 @@ digitalhub/stores/readers/data/_base/builder.py,sha256=N_e5qlGrxyqnyr8F7SvbSLrgt
|
|
|
238
240
|
digitalhub/stores/readers/data/_base/reader.py,sha256=q6s37uI_2J1cJlpvRzwr2Az8aD9lDsKvzbi82CUO3PU,1862
|
|
239
241
|
digitalhub/stores/readers/data/pandas/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
240
242
|
digitalhub/stores/readers/data/pandas/builder.py,sha256=ucnW7ReZgQ9XmGifYMkaDxpBVc_0XMMazOyPnUlY4os,804
|
|
241
|
-
digitalhub/stores/readers/data/pandas/reader.py,sha256=
|
|
243
|
+
digitalhub/stores/readers/data/pandas/reader.py,sha256=LLbp_tWSmyQizM8ULpiax3rl7bIfSs5SwVc13afNS5E,8260
|
|
242
244
|
digitalhub/stores/readers/query/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
243
245
|
digitalhub/utils/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
244
246
|
digitalhub/utils/enums.py,sha256=FvvBBkryy2-Ji0MhBMeJC6oLnd_ba0b0y1uCcWT-mvU,377
|
|
@@ -251,8 +253,8 @@ digitalhub/utils/logger.py,sha256=hH3gGE35L8jRxrg8EPXGZZAK1OA5-CvWnayuBZzteBM,54
|
|
|
251
253
|
digitalhub/utils/store_utils.py,sha256=X6pUywqENNdM-kpPwm67w7qx5-VtTHHIdkCdEwL29AI,1023
|
|
252
254
|
digitalhub/utils/types.py,sha256=orCxY43zXMJfKZsOj6FUR85u9wRBPJ0wdkzrBHTnVW8,217
|
|
253
255
|
digitalhub/utils/uri_utils.py,sha256=Go787CxAOo2MMjFIEt8XssomtyV8vTdIrpyjSQK3gAM,4408
|
|
254
|
-
digitalhub-0.14.
|
|
255
|
-
digitalhub-0.14.
|
|
256
|
-
digitalhub-0.14.
|
|
257
|
-
digitalhub-0.14.
|
|
258
|
-
digitalhub-0.14.
|
|
256
|
+
digitalhub-0.14.0b2.dist-info/METADATA,sha256=cSgx6N8uSZicbowLn_DfiaQGcCJklk-44NaUrKV2DQU,18129
|
|
257
|
+
digitalhub-0.14.0b2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
258
|
+
digitalhub-0.14.0b2.dist-info/licenses/AUTHORS,sha256=iDleK_2EAMmh0o8Te_E9mdXQCP4rBfFr9dW9d0-pCno,301
|
|
259
|
+
digitalhub-0.14.0b2.dist-info/licenses/LICENSE,sha256=z3xQCHfGmTnigfoUe3uidW_GUSVeFBdos30w9VNTRec,11361
|
|
260
|
+
digitalhub-0.14.0b2.dist-info/RECORD,,
|
digitalhub/factory/factory.py
DELETED
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
|
|
2
|
-
#
|
|
3
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
import typing
|
|
8
|
-
|
|
9
|
-
from digitalhub.factory.enums import FactoryEnum
|
|
10
|
-
from digitalhub.factory.utils import import_module, list_runtimes
|
|
11
|
-
from digitalhub.utils.exceptions import BuilderError
|
|
12
|
-
|
|
13
|
-
if typing.TYPE_CHECKING:
|
|
14
|
-
from digitalhub.entities._base.entity.builder import EntityBuilder
|
|
15
|
-
from digitalhub.entities._base.entity.entity import Entity
|
|
16
|
-
from digitalhub.entities._base.entity.metadata import Metadata
|
|
17
|
-
from digitalhub.entities._base.entity.spec import Spec, SpecValidator
|
|
18
|
-
from digitalhub.entities._base.entity.status import Status
|
|
19
|
-
from digitalhub.entities._base.runtime_entity.builder import RuntimeEntityBuilder
|
|
20
|
-
from digitalhub.runtimes._base import Runtime
|
|
21
|
-
from digitalhub.runtimes.builder import RuntimeBuilder
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class Factory:
|
|
25
|
-
"""
|
|
26
|
-
Factory for creating and managing entity and runtime builders.
|
|
27
|
-
|
|
28
|
-
This class implements the Factory pattern to manage the creation of
|
|
29
|
-
entities and runtimes through their respective builders. It maintains
|
|
30
|
-
separate registries for entity and runtime builders.
|
|
31
|
-
|
|
32
|
-
Many function arguments are called kind_to_build_from to avoid overwriting
|
|
33
|
-
kind in kwargs.
|
|
34
|
-
|
|
35
|
-
Attributes
|
|
36
|
-
----------
|
|
37
|
-
_entity_builders : dict[str, EntityBuilder | RuntimeEntityBuilder]
|
|
38
|
-
Registry of instantiated entity builders indexed by kind.
|
|
39
|
-
_runtime_builders : dict[str, RuntimeBuilder]
|
|
40
|
-
Registry of instantiated runtime builders indexed by kind.
|
|
41
|
-
|
|
42
|
-
Notes
|
|
43
|
-
-----
|
|
44
|
-
All builder methods may raise BuilderError if the requested kind
|
|
45
|
-
is not found in the registry.
|
|
46
|
-
"""
|
|
47
|
-
|
|
48
|
-
def __init__(self):
|
|
49
|
-
self._entity_builders: dict[str, EntityBuilder | RuntimeEntityBuilder] = {}
|
|
50
|
-
self._runtime_builders: dict[str, RuntimeBuilder] = {}
|
|
51
|
-
self._entities_registered = False
|
|
52
|
-
self._runtimes_registered = False
|
|
53
|
-
|
|
54
|
-
def add_entity_builder(self, name: str, builder: type[EntityBuilder | RuntimeEntityBuilder]) -> None:
|
|
55
|
-
"""
|
|
56
|
-
Register an entity builder.
|
|
57
|
-
|
|
58
|
-
Parameters
|
|
59
|
-
----------
|
|
60
|
-
name : str
|
|
61
|
-
The unique identifier for the builder.
|
|
62
|
-
builder : type[EntityBuilder] | type[RuntimeEntityBuilder]
|
|
63
|
-
The builder class to register. It will be instantiated immediately.
|
|
64
|
-
|
|
65
|
-
Returns
|
|
66
|
-
-------
|
|
67
|
-
None
|
|
68
|
-
|
|
69
|
-
Raises
|
|
70
|
-
------
|
|
71
|
-
BuilderError
|
|
72
|
-
If a builder with the same name already exists.
|
|
73
|
-
"""
|
|
74
|
-
if name in self._entity_builders:
|
|
75
|
-
raise BuilderError(f"Builder {name} already exists.")
|
|
76
|
-
self._entity_builders[name] = builder()
|
|
77
|
-
|
|
78
|
-
def add_runtime_builder(self, name: str, builder: type[RuntimeBuilder]) -> None:
|
|
79
|
-
"""
|
|
80
|
-
Register a runtime builder.
|
|
81
|
-
|
|
82
|
-
Parameters
|
|
83
|
-
----------
|
|
84
|
-
name : str
|
|
85
|
-
The unique identifier for the builder.
|
|
86
|
-
builder : type[RuntimeBuilder]
|
|
87
|
-
The builder class to register. It will be instantiated immediately.
|
|
88
|
-
|
|
89
|
-
Returns
|
|
90
|
-
-------
|
|
91
|
-
None
|
|
92
|
-
|
|
93
|
-
Raises
|
|
94
|
-
------
|
|
95
|
-
BuilderError
|
|
96
|
-
If a builder with the same name already exists.
|
|
97
|
-
"""
|
|
98
|
-
if name in self._runtime_builders:
|
|
99
|
-
raise BuilderError(f"Builder {name} already exists.")
|
|
100
|
-
self._runtime_builders[name] = builder()
|
|
101
|
-
|
|
102
|
-
def build_entity_from_params(self, **kwargs) -> Entity:
|
|
103
|
-
"""
|
|
104
|
-
Build an entity from parameters.
|
|
105
|
-
|
|
106
|
-
Parameters
|
|
107
|
-
----------
|
|
108
|
-
**kwargs
|
|
109
|
-
Entity parameters.
|
|
110
|
-
|
|
111
|
-
Returns
|
|
112
|
-
-------
|
|
113
|
-
Entity
|
|
114
|
-
Entity object.
|
|
115
|
-
"""
|
|
116
|
-
try:
|
|
117
|
-
kind = kwargs["kind"]
|
|
118
|
-
except KeyError:
|
|
119
|
-
raise BuilderError("Missing 'kind' parameter.")
|
|
120
|
-
builder = self._get_entity_builder(kind)
|
|
121
|
-
return builder.build(**kwargs)
|
|
122
|
-
|
|
123
|
-
def build_entity_from_dict(self, obj: dict) -> Entity:
|
|
124
|
-
"""
|
|
125
|
-
Build an entity from a dictionary.
|
|
126
|
-
|
|
127
|
-
Parameters
|
|
128
|
-
----------
|
|
129
|
-
obj : dict
|
|
130
|
-
Dictionary with entity data.
|
|
131
|
-
|
|
132
|
-
Returns
|
|
133
|
-
-------
|
|
134
|
-
Entity
|
|
135
|
-
Entity object.
|
|
136
|
-
"""
|
|
137
|
-
try:
|
|
138
|
-
kind = obj["kind"]
|
|
139
|
-
except KeyError:
|
|
140
|
-
raise BuilderError("Missing 'kind' parameter.")
|
|
141
|
-
builder = self._get_entity_builder(kind)
|
|
142
|
-
return builder.from_dict(obj)
|
|
143
|
-
|
|
144
|
-
def build_spec(self, kind_to_build_from: str, **kwargs) -> Spec:
|
|
145
|
-
"""
|
|
146
|
-
Build an entity spec.
|
|
147
|
-
|
|
148
|
-
Parameters
|
|
149
|
-
----------
|
|
150
|
-
kind_to_build_from : str
|
|
151
|
-
Entity type.
|
|
152
|
-
**kwargs
|
|
153
|
-
Additional spec parameters.
|
|
154
|
-
|
|
155
|
-
Returns
|
|
156
|
-
-------
|
|
157
|
-
Spec
|
|
158
|
-
Spec object.
|
|
159
|
-
"""
|
|
160
|
-
builder = self._get_entity_builder(kind_to_build_from)
|
|
161
|
-
return builder.build_spec(**kwargs)
|
|
162
|
-
|
|
163
|
-
def build_metadata(self, kind_to_build_from: str, **kwargs) -> Metadata:
|
|
164
|
-
"""
|
|
165
|
-
Build an entity metadata.
|
|
166
|
-
|
|
167
|
-
Parameters
|
|
168
|
-
----------
|
|
169
|
-
kind_to_build_from : str
|
|
170
|
-
Entity type.
|
|
171
|
-
**kwargs
|
|
172
|
-
Additional metadata parameters.
|
|
173
|
-
|
|
174
|
-
Returns
|
|
175
|
-
-------
|
|
176
|
-
Metadata
|
|
177
|
-
Metadata object.
|
|
178
|
-
"""
|
|
179
|
-
builder = self._get_entity_builder(kind_to_build_from)
|
|
180
|
-
return builder.build_metadata(**kwargs)
|
|
181
|
-
|
|
182
|
-
def build_status(self, kind_to_build_from: str, **kwargs) -> Status:
|
|
183
|
-
"""
|
|
184
|
-
Build an entity status.
|
|
185
|
-
|
|
186
|
-
Parameters
|
|
187
|
-
----------
|
|
188
|
-
kind_to_build_from : str
|
|
189
|
-
Entity type.
|
|
190
|
-
**kwargs
|
|
191
|
-
Additional status parameters.
|
|
192
|
-
|
|
193
|
-
Returns
|
|
194
|
-
-------
|
|
195
|
-
Status
|
|
196
|
-
Status object.
|
|
197
|
-
"""
|
|
198
|
-
builder = self._get_entity_builder(kind_to_build_from)
|
|
199
|
-
return builder.build_status(**kwargs)
|
|
200
|
-
|
|
201
|
-
def build_runtime(self, kind_to_build_from: str, project: str) -> Runtime:
|
|
202
|
-
"""
|
|
203
|
-
Build a runtime.
|
|
204
|
-
|
|
205
|
-
Parameters
|
|
206
|
-
----------
|
|
207
|
-
kind_to_build_from : str
|
|
208
|
-
Runtime type.
|
|
209
|
-
project : str
|
|
210
|
-
Project name.
|
|
211
|
-
|
|
212
|
-
Returns
|
|
213
|
-
-------
|
|
214
|
-
Runtime
|
|
215
|
-
Runtime object.
|
|
216
|
-
"""
|
|
217
|
-
builder = self._get_runtime_builder(kind_to_build_from)
|
|
218
|
-
return builder.build(project=project)
|
|
219
|
-
|
|
220
|
-
def get_entity_type_from_kind(self, kind: str) -> str:
|
|
221
|
-
"""
|
|
222
|
-
Get entity type from builder.
|
|
223
|
-
|
|
224
|
-
Parameters
|
|
225
|
-
----------
|
|
226
|
-
kind : str
|
|
227
|
-
Entity type.
|
|
228
|
-
|
|
229
|
-
Returns
|
|
230
|
-
-------
|
|
231
|
-
str
|
|
232
|
-
Entity type.
|
|
233
|
-
"""
|
|
234
|
-
builder = self._get_entity_builder(kind)
|
|
235
|
-
return builder.get_entity_type()
|
|
236
|
-
|
|
237
|
-
def get_executable_kind(self, kind: str) -> str:
|
|
238
|
-
"""
|
|
239
|
-
Get executable kind.
|
|
240
|
-
|
|
241
|
-
Parameters
|
|
242
|
-
----------
|
|
243
|
-
kind : str
|
|
244
|
-
Kind.
|
|
245
|
-
|
|
246
|
-
Returns
|
|
247
|
-
-------
|
|
248
|
-
str
|
|
249
|
-
Executable kind.
|
|
250
|
-
"""
|
|
251
|
-
builder = self._get_entity_builder(kind)
|
|
252
|
-
return builder.get_executable_kind()
|
|
253
|
-
|
|
254
|
-
def get_action_from_task_kind(self, kind: str, task_kind: str) -> str:
|
|
255
|
-
"""
|
|
256
|
-
Get action from task.
|
|
257
|
-
|
|
258
|
-
Parameters
|
|
259
|
-
----------
|
|
260
|
-
kind : str
|
|
261
|
-
Kind.
|
|
262
|
-
task_kind : str
|
|
263
|
-
Task kind.
|
|
264
|
-
|
|
265
|
-
Returns
|
|
266
|
-
-------
|
|
267
|
-
str
|
|
268
|
-
Action.
|
|
269
|
-
"""
|
|
270
|
-
builder = self._get_entity_builder(kind)
|
|
271
|
-
return builder.get_action_from_task_kind(task_kind)
|
|
272
|
-
|
|
273
|
-
def get_task_kind_from_action(self, kind: str, action: str) -> list[str]:
|
|
274
|
-
"""
|
|
275
|
-
Get task kinds from action.
|
|
276
|
-
|
|
277
|
-
Parameters
|
|
278
|
-
----------
|
|
279
|
-
kind : str
|
|
280
|
-
Kind.
|
|
281
|
-
action : str
|
|
282
|
-
Action.
|
|
283
|
-
|
|
284
|
-
Returns
|
|
285
|
-
-------
|
|
286
|
-
list of str
|
|
287
|
-
Task kinds.
|
|
288
|
-
"""
|
|
289
|
-
builder = self._get_entity_builder(kind)
|
|
290
|
-
return builder.get_task_kind_from_action(action)
|
|
291
|
-
|
|
292
|
-
def get_run_kind_from_action(self, kind: str, action: str) -> str:
|
|
293
|
-
"""
|
|
294
|
-
Get run kind.
|
|
295
|
-
|
|
296
|
-
Parameters
|
|
297
|
-
----------
|
|
298
|
-
kind : str
|
|
299
|
-
Kind.
|
|
300
|
-
|
|
301
|
-
Returns
|
|
302
|
-
-------
|
|
303
|
-
str
|
|
304
|
-
Run kind.
|
|
305
|
-
"""
|
|
306
|
-
builder = self._get_entity_builder(kind)
|
|
307
|
-
return builder.get_run_kind_from_action(action)
|
|
308
|
-
|
|
309
|
-
def get_all_kinds(self, kind: str) -> list[str]:
|
|
310
|
-
"""
|
|
311
|
-
Get all kinds.
|
|
312
|
-
|
|
313
|
-
Parameters
|
|
314
|
-
----------
|
|
315
|
-
kind : str
|
|
316
|
-
Kind.
|
|
317
|
-
|
|
318
|
-
Returns
|
|
319
|
-
-------
|
|
320
|
-
list of str
|
|
321
|
-
All kinds.
|
|
322
|
-
"""
|
|
323
|
-
builder = self._get_entity_builder(kind)
|
|
324
|
-
return builder.get_all_kinds()
|
|
325
|
-
|
|
326
|
-
def get_spec_validator(self, kind: str) -> SpecValidator:
|
|
327
|
-
"""
|
|
328
|
-
Get spec validators.
|
|
329
|
-
|
|
330
|
-
Parameters
|
|
331
|
-
----------
|
|
332
|
-
kind : str
|
|
333
|
-
Kind.
|
|
334
|
-
|
|
335
|
-
Returns
|
|
336
|
-
-------
|
|
337
|
-
SpecValidator
|
|
338
|
-
Spec validator.
|
|
339
|
-
"""
|
|
340
|
-
builder = self._get_entity_builder(kind)
|
|
341
|
-
return builder.get_spec_validator()
|
|
342
|
-
|
|
343
|
-
def _get_entity_builder(self, kind: str) -> EntityBuilder | RuntimeEntityBuilder:
|
|
344
|
-
"""
|
|
345
|
-
Return the entity builder for the given kind, ensuring lazy runtime registration.
|
|
346
|
-
|
|
347
|
-
Raises
|
|
348
|
-
------
|
|
349
|
-
BuilderError
|
|
350
|
-
If no builder exists for the specified kind.
|
|
351
|
-
"""
|
|
352
|
-
if not self._entities_registered:
|
|
353
|
-
self._ensure_entities_registered()
|
|
354
|
-
if kind not in self._entity_builders:
|
|
355
|
-
if not self._runtimes_registered:
|
|
356
|
-
self._ensure_runtimes_registered()
|
|
357
|
-
if kind not in self._entity_builders:
|
|
358
|
-
raise BuilderError(f"Entity builder for kind '{kind}' not found.")
|
|
359
|
-
return self._entity_builders[kind]
|
|
360
|
-
|
|
361
|
-
def _get_runtime_builder(self, kind: str) -> RuntimeBuilder:
|
|
362
|
-
"""
|
|
363
|
-
Return the runtime builder for the given kind, ensuring lazy runtime registration.
|
|
364
|
-
|
|
365
|
-
Raises
|
|
366
|
-
------
|
|
367
|
-
BuilderError
|
|
368
|
-
If no builder exists for the specified kind.
|
|
369
|
-
"""
|
|
370
|
-
if kind not in self._runtime_builders:
|
|
371
|
-
if not self._runtimes_registered:
|
|
372
|
-
self._ensure_runtimes_registered()
|
|
373
|
-
if kind not in self._runtime_builders:
|
|
374
|
-
raise BuilderError(f"Runtime builder for kind '{kind}' not found.")
|
|
375
|
-
return self._runtime_builders[kind]
|
|
376
|
-
|
|
377
|
-
def _ensure_entities_registered(self) -> None:
|
|
378
|
-
"""
|
|
379
|
-
Ensure core entities are registered on-demand.
|
|
380
|
-
|
|
381
|
-
Returns
|
|
382
|
-
-------
|
|
383
|
-
None
|
|
384
|
-
"""
|
|
385
|
-
if self._entities_registered:
|
|
386
|
-
return
|
|
387
|
-
try:
|
|
388
|
-
self._register_entities()
|
|
389
|
-
self._entities_registered = True
|
|
390
|
-
except Exception as e:
|
|
391
|
-
# Avoid repeated attempts; surface as BuilderError for consistency
|
|
392
|
-
self._entities_registered = True
|
|
393
|
-
raise BuilderError(f"Failed to register core entities: {e}")
|
|
394
|
-
|
|
395
|
-
def _register_entities(self) -> None:
|
|
396
|
-
"""
|
|
397
|
-
Register core entity builders into the factory.
|
|
398
|
-
|
|
399
|
-
Imports the core entities module and registers all entity
|
|
400
|
-
builders with the global factory instance.
|
|
401
|
-
|
|
402
|
-
Returns
|
|
403
|
-
-------
|
|
404
|
-
None
|
|
405
|
-
"""
|
|
406
|
-
try:
|
|
407
|
-
module = import_module(FactoryEnum.REG_ENTITIES.value)
|
|
408
|
-
|
|
409
|
-
# Register core entities
|
|
410
|
-
for k, b in getattr(module, FactoryEnum.REG_ENTITIES_VAR.value, []):
|
|
411
|
-
self.add_entity_builder(k, b)
|
|
412
|
-
|
|
413
|
-
except Exception as e:
|
|
414
|
-
raise RuntimeError("Error registering core entities.") from e
|
|
415
|
-
|
|
416
|
-
def _ensure_runtimes_registered(self) -> None:
|
|
417
|
-
"""
|
|
418
|
-
Ensure runtime entities are registered on-demand.
|
|
419
|
-
|
|
420
|
-
Returns
|
|
421
|
-
-------
|
|
422
|
-
None
|
|
423
|
-
"""
|
|
424
|
-
if self._runtimes_registered:
|
|
425
|
-
return
|
|
426
|
-
try:
|
|
427
|
-
self._register_runtimes_entities()
|
|
428
|
-
self._runtimes_registered = True
|
|
429
|
-
except Exception as e:
|
|
430
|
-
# If registration fails, mark as attempted to avoid infinite loops
|
|
431
|
-
self._runtimes_registered = True
|
|
432
|
-
raise BuilderError(f"Failed to register runtime entities: {e}")
|
|
433
|
-
|
|
434
|
-
def _register_runtimes_entities(self) -> None:
|
|
435
|
-
"""
|
|
436
|
-
Register all runtime builders and their entities into the factory.
|
|
437
|
-
|
|
438
|
-
Imports each runtime package and registers its entity and runtime
|
|
439
|
-
builders with the global factory instance.
|
|
440
|
-
|
|
441
|
-
Returns
|
|
442
|
-
-------
|
|
443
|
-
None
|
|
444
|
-
"""
|
|
445
|
-
try:
|
|
446
|
-
for package in list_runtimes():
|
|
447
|
-
module = import_module(package)
|
|
448
|
-
|
|
449
|
-
# Register workflows, functions, tasks and runs entities builders
|
|
450
|
-
for k, b in getattr(module, FactoryEnum.REG_ENTITIES_VAR.value, []):
|
|
451
|
-
self.add_entity_builder(k, b)
|
|
452
|
-
|
|
453
|
-
# Register runtime builders
|
|
454
|
-
for k, b in getattr(module, FactoryEnum.REG_RUNTIME_VAR.value, []):
|
|
455
|
-
self.add_runtime_builder(k, b)
|
|
456
|
-
except Exception as e:
|
|
457
|
-
raise RuntimeError("Error registering runtime entities.") from e
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
factory = Factory()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|