Commit b6493154 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

to discard

parent fb309f64
...@@ -199,17 +199,14 @@ class DataBucketStream(Document): ...@@ -199,17 +199,14 @@ class DataBucketStream(Document):
""" """
Get one bucket Get one bucket
""" """
persistent_string = self._tree[key] return self._tree[key].value
v = persistent_string.value
persistent_string._p_deactivate() # free memory
return v
def getBucketByIndex(self, index=None): def getBucketByIndex(self, index=None):
""" """
Get one bucket Get one bucket
""" """
key = self._long_index_tree[index] key = self._long_index_tree[index]
return self.getBucketByKey(key) return self.getBucketByKey(key).value
def getKeyByIndex(self, index): def getKeyByIndex(self, index):
""" """
...@@ -435,4 +432,4 @@ for index_class in ( ...@@ -435,4 +432,4 @@ for index_class in (
ContainerAssertions[index_class] = 1 ContainerAssertions[index_class] = 1
# Cleanup # Cleanup
del index_class del index_class
\ No newline at end of file
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
</permission> </permission>
<permission type='tuple'> <permission type='tuple'>
<name>Access contents information</name> <name>Access contents information</name>
<role>Anonymous</role>
<role>Assignee</role> <role>Assignee</role>
<role>Assignor</role> <role>Assignor</role>
<role>Associate</role> <role>Associate</role>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
</permission> </permission>
<permission type='tuple'> <permission type='tuple'>
<name>Access contents information</name> <name>Access contents information</name>
<role>Anonymous</role>
<role>Assignee</role> <role>Assignee</role>
<role>Assignor</role> <role>Assignor</role>
<role>Associate</role> <role>Associate</role>
......
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
<string>my_reference</string> <string>my_reference</string>
<string>my_version</string> <string>my_version</string>
<string>my_publication_section_list</string> <string>my_publication_section_list</string>
<string>your_array_dtype</string> <string>my_array_dtype</string>
<string>your_array_shape</string> <string>my_array_shape</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>your_array_dtype</string> </value> <value> <string>my_array_dtype</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>your_array_shape</string> </value> <value> <string>my_array_shape</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -116,19 +116,13 @@ ...@@ -116,19 +116,13 @@
<key> <string>alternate_name</string> </key> <key> <string>alternate_name</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -279,17 +273,4 @@ ...@@ -279,17 +273,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getArrayShape()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
from DateTime import DateTime from DateTime import DateTime
from zExceptions import NotFound
now = DateTime() now = DateTime()
today_string = now.strftime('%Y%m%d') today_string = now.strftime('%Y%m%d')
...@@ -117,23 +116,16 @@ if modify and data_ingestion is None: ...@@ -117,23 +116,16 @@ if modify and data_ingestion is None:
# find ingestion line for current resource # find ingestion line for current resource
input_line = None
operation_line = None
for line in data_ingestion.objectValues(portal_type="Data Ingestion Line"): for line in data_ingestion.objectValues(portal_type="Data Ingestion Line"):
if line.getResourceReference() == resource_reference: if line.getResourceReference() == resource_reference:
input_line = line input_line = line
elif line.getResourceValue().getPortalType() == "Data Operation": elif line.getResourceValue().getPortalType() == "Data Operation":
operation_line = line operation_line = line
if input_line is None:
raise NotFound('No relevant data ingestion line found.')
if modify and input_line.getQuantity() == 0: if modify and input_line.getQuantity() == 0:
init_input_line(input_line, operation_line) init_input_line(input_line, operation_line)
if operation_line is None:
raise NotFound('No relevant data operation found.')
data_operation = operation_line.getResourceValue() data_operation = operation_line.getResourceValue()
parameter_dict = { parameter_dict = {
input_line.getReference(): \ input_line.getReference(): \
{v.getPortalType(): v for v in input_line.getAggregateValueList()}} {v.getPortalType(): v for v in input_line.getAggregateValueList()}}
......
...@@ -261,7 +261,6 @@ class Test(ERP5TypeTestCase): ...@@ -261,7 +261,6 @@ class Test(ERP5TypeTestCase):
key = len(bucket_stream) + 1 key = len(bucket_stream) + 1
bucket_stream.insertBucket(key, bin_string ) bucket_stream.insertBucket(key, bin_string )
self.assertEqual(bin_string, bucket_stream.getBucketByKey(key)) self.assertEqual(bin_string, bucket_stream.getBucketByKey(key))
self.assertEqual(bin_string, bucket_stream.getBucketByIndex(0))
# test sequence # test sequence
self.assertEqual(1, len(bucket_stream)) self.assertEqual(1, len(bucket_stream))
...@@ -591,6 +590,7 @@ class Test(ERP5TypeTestCase): ...@@ -591,6 +590,7 @@ class Test(ERP5TypeTestCase):
self.assertNotEqual(ingestion_policy, None) self.assertNotEqual(ingestion_policy, None)
self.commit()
self.tic() self.tic()
self.addCleanup(self._removeDocument, ingestion_policy) self.addCleanup(self._removeDocument, ingestion_policy)
...@@ -750,6 +750,7 @@ result = [x for x in data_bucket_stream.getBucketIndexKeySequenceByIndex()] ...@@ -750,6 +750,7 @@ result = [x for x in data_bucket_stream.getBucketIndexKeySequenceByIndex()]
for data_analysis_title in data_analysis_title_list: for data_analysis_title in data_analysis_title_list:
self.assertEqual(getDataAnalysisByTitle(data_analysis_title), None) self.assertEqual(getDataAnalysisByTitle(data_analysis_title), None)
self.commit()
self.tic() self.tic()
self.portal.portal_alarms.wendelin_handle_analysis.activeSense() self.portal.portal_alarms.wendelin_handle_analysis.activeSense()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment