tiferet 1.0.0b0__py3-none-any.whl → 1.0.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.
- tiferet/contexts/feature.py +6 -4
- tiferet/handlers/container.py +12 -9
- {tiferet-1.0.0b0.dist-info → tiferet-1.0.0b2.dist-info}/METADATA +1 -1
- {tiferet-1.0.0b0.dist-info → tiferet-1.0.0b2.dist-info}/RECORD +7 -7
- {tiferet-1.0.0b0.dist-info → tiferet-1.0.0b2.dist-info}/WHEEL +0 -0
- {tiferet-1.0.0b0.dist-info → tiferet-1.0.0b2.dist-info}/licenses/LICENSE +0 -0
- {tiferet-1.0.0b0.dist-info → tiferet-1.0.0b2.dist-info}/top_level.txt +0 -0
tiferet/contexts/feature.py
CHANGED
@@ -101,8 +101,6 @@ class FeatureContext(object):
|
|
101
101
|
except Exception as e:
|
102
102
|
if not pass_on_error:
|
103
103
|
raise e
|
104
|
-
finally:
|
105
|
-
print(f'Command {command.attribute_id} execution failed: {e}' if 'e' in locals() else '')
|
106
104
|
|
107
105
|
# If a data key is provided, store the result in the request data.
|
108
106
|
if data_key:
|
@@ -140,21 +138,25 @@ class FeatureContext(object):
|
|
140
138
|
# Execute the feature with the request and commands.
|
141
139
|
for index, cmd in enumerate(commands):
|
142
140
|
|
141
|
+
# Get the feature command from the feature.
|
142
|
+
feature_command = feature.commands[index]
|
143
|
+
|
143
144
|
# Parse the command parameters
|
144
145
|
params = {
|
145
146
|
param: self.feature_service.parse_parameter(value, request)
|
146
|
-
for param, value in
|
147
|
+
for param, value in feature_command.parameters.items()
|
147
148
|
}
|
148
149
|
|
149
150
|
# Execute the command with the request data and parameters.
|
150
151
|
self.handle_command(
|
151
152
|
cmd,
|
152
153
|
request,
|
154
|
+
data_key=feature_command.data_key,
|
155
|
+
pass_on_error=feature_command.pass_on_error,
|
153
156
|
**params,
|
154
157
|
features=self.feature_service,
|
155
158
|
container=self.container,
|
156
159
|
cache=self.cache,
|
157
160
|
**kwargs
|
158
161
|
)
|
159
|
-
|
160
162
|
|
tiferet/handlers/container.py
CHANGED
@@ -22,10 +22,8 @@ class ContainerHandler(ContainerService):
|
|
22
22
|
'''
|
23
23
|
Initialize the container handler.
|
24
24
|
|
25
|
-
:param
|
26
|
-
:type
|
27
|
-
:param dependencies: The dependencies.
|
28
|
-
:type dependencies: dict
|
25
|
+
:param container_repo: The container repository to use for managing container attributes.
|
26
|
+
:type container_repo: ContainerRepository
|
29
27
|
'''
|
30
28
|
|
31
29
|
# Assign the container repository.
|
@@ -69,15 +67,20 @@ class ContainerHandler(ContainerService):
|
|
69
67
|
# If constants are provided, clean the parameters using the parse_parameter command.
|
70
68
|
constants = {k: parse_parameter.execute(v) for k, v in constants.items()}
|
71
69
|
|
72
|
-
# Iterate through each attribute
|
73
|
-
# For each attribute, parse its parameters and add them to the constants dictionary.
|
74
|
-
# For each dependency, parse its parameters and add them to the constants dictionary.
|
70
|
+
# Iterate through each attribute.
|
75
71
|
for attr in attributes:
|
76
|
-
|
77
|
-
|
72
|
+
|
73
|
+
# If flags are provided, check for dependencies with those flags.
|
74
|
+
dependency = attr.get_dependency(*flags)
|
75
|
+
|
76
|
+
# Update the constants dictionary with the parsed parameters from the dependency or the attribute itself.
|
78
77
|
if dependency:
|
79
78
|
constants.update({k: parse_parameter.execute(v) for k, v in dependency.parameters.items()})
|
80
79
|
|
80
|
+
# If no dependency is found, use the attribute's parameters.
|
81
|
+
else:
|
82
|
+
constants.update({k: parse_parameter.execute(v) for k, v in attr.parameters.items()})
|
83
|
+
|
81
84
|
# Return the updated constants dictionary.
|
82
85
|
return constants
|
83
86
|
|
@@ -14,7 +14,7 @@ tiferet/contexts/app.py,sha256=EFjcz3VxBDdCSPTpSxNyyloIeOIFXoRaOv796oMDQOk,8970
|
|
14
14
|
tiferet/contexts/cache.py,sha256=RsklfFmZTnFxzxh7hiKD3nuEg50LX-JuWcie7P6xfTo,1758
|
15
15
|
tiferet/contexts/container.py,sha256=2oC91WlXJtAnuFJo1yyo78wO8fDZyfkwF6638L7UtIQ,3985
|
16
16
|
tiferet/contexts/error.py,sha256=Yr0rJgUTnDSxq5rSobVxUcoibehyYfKT5SrcXClBA48,3804
|
17
|
-
tiferet/contexts/feature.py,sha256=
|
17
|
+
tiferet/contexts/feature.py,sha256=INysGSyvrqcxIyhxMXlkCsLiZP-ik3mUwnspmITw7U8,5380
|
18
18
|
tiferet/contracts/__init__.py,sha256=a8e7mleeLr0s554mRd1K0O0q2clisR7wGpeex1-9hsI,47
|
19
19
|
tiferet/contracts/app.py,sha256=x1biqBRAKhYJtljG6M1MtbVxRk5nAHSGU8X1O16W_sE,1928
|
20
20
|
tiferet/contracts/cache.py,sha256=mr_sHGSe_k5GuE22f8NfX_2ppgHHCiZrnkCK07M53cc,1653
|
@@ -29,7 +29,7 @@ tiferet/data/error.py,sha256=9GYkmHPDkttyOlfk-9t3lHIsoWFGVkpfDN1wMpdOfTM,2189
|
|
29
29
|
tiferet/data/feature.py,sha256=hFUkbe-j9jqaMbnZq0sfo6N64NOl042oDwfadFTfVSY,3501
|
30
30
|
tiferet/data/settings.py,sha256=mJh3EzGHATIX_geKyK6KRcCC6v2185V7swqwnym9mdQ,4277
|
31
31
|
tiferet/handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
|
-
tiferet/handlers/container.py,sha256=
|
32
|
+
tiferet/handlers/container.py,sha256=P9PEpmotUy8jYQseWBRReIf4hz_RQIN1NF8qO4v2fmY,4220
|
33
33
|
tiferet/handlers/error.py,sha256=j0AYMzskNMfzLydFfAh54NGxnaKlKFVzf_J3KpUOa2s,1242
|
34
34
|
tiferet/handlers/feature.py,sha256=ar4j0OnUorZM5tR2thoLQUh2qjx9c0NuKjr1ZgPUzIY,2749
|
35
35
|
tiferet/models/__init__.py,sha256=a8e7mleeLr0s554mRd1K0O0q2clisR7wGpeex1-9hsI,47
|
@@ -44,8 +44,8 @@ tiferet/proxies/yaml/app.py,sha256=qx0b2WtywfxtETN8OPfzrrzvYcuAY6uiyU9ctgpx8QI,2
|
|
44
44
|
tiferet/proxies/yaml/container.py,sha256=raOeZ2CIAbNHTzPNqL2tgPvuad7-LcPL0a1NJ-nmUYY,2971
|
45
45
|
tiferet/proxies/yaml/error.py,sha256=fFAFxbtVZ9dguvYb08TzrIBir1H0NYoe5JHjGm5HuTU,2885
|
46
46
|
tiferet/proxies/yaml/feature.py,sha256=CKIsAqil27U0VjtVIHTiq3U9chNOZM6HAuUyH5VDF_o,2471
|
47
|
-
tiferet-1.0.
|
48
|
-
tiferet-1.0.
|
49
|
-
tiferet-1.0.
|
50
|
-
tiferet-1.0.
|
51
|
-
tiferet-1.0.
|
47
|
+
tiferet-1.0.0b2.dist-info/licenses/LICENSE,sha256=e8_GutFM0sxbRlgUaeVsGvJ5uE-KvruLApOzIoHy_zU,1513
|
48
|
+
tiferet-1.0.0b2.dist-info/METADATA,sha256=rshmptQzPzcXXG_YhpCl1z5H3_oD07Y0SrE5lLZF7kg,741
|
49
|
+
tiferet-1.0.0b2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
50
|
+
tiferet-1.0.0b2.dist-info/top_level.txt,sha256=g19Qw0j_VxPw-fgPF1TMPwbtHjnEhNQs0fa69wJZ6IM,8
|
51
|
+
tiferet-1.0.0b2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|