Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
wendelin
Commits
1ab24793
Commit
1ab24793
authored
Jan 20, 2025
by
Paul Graydon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_wendelin: Add system preference for Data Analysis sharing
parent
fa51cfc2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
311 additions
and
16 deletions
+311
-16
bt5/erp5_wendelin/PropertySheetTemplateItem/portal_property_sheets/WendelinShareDataAnalysisPreference.xml
...l_property_sheets/WendelinShareDataAnalysisPreference.xml
+66
-0
bt5/erp5_wendelin/PropertySheetTemplateItem/portal_property_sheets/WendelinShareDataAnalysisPreference/preferred_enable_data_analysis_sharing_property.xml
...rence/preferred_enable_data_analysis_sharing_property.xml
+40
-0
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
...al_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
+12
-9
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/SystemPreference_viewWendelin.xml
...tal_skins/erp5_wendelin/SystemPreference_viewWendelin.xml
+1
-0
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/SystemPreference_viewWendelin/my_preferred_enable_data_analysis_sharing.xml
...iewWendelin/my_preferred_enable_data_analysis_sharing.xml
+184
-0
bt5/erp5_wendelin/bt/template_document_id_list
bt5/erp5_wendelin/bt/template_document_id_list
+4
-4
bt5/erp5_wendelin/bt/template_property_sheet_id_list
bt5/erp5_wendelin/bt/template_property_sheet_id_list
+4
-3
No files found.
bt5/erp5_wendelin/PropertySheetTemplateItem/portal_property_sheets/WendelinShareDataAnalysisPreference.xml
0 → 100644
View file @
1ab24793
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Property Sheet"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WendelinShareDataAnalysisPreference
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Sheet
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
bt5/erp5_wendelin/PropertySheetTemplateItem/portal_property_sheets/WendelinShareDataAnalysisPreference/preferred_enable_data_analysis_sharing_property.xml
0 → 100644
View file @
1ab24793
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/boolean
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Enable using the same Data Analysis for data ingestions with the same project and the same source.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
preferred_enable_data_analysis_sharing_property
</string>
</value>
</item>
<item>
<key>
<string>
preference
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: True
</string>
</value>
</item>
<item>
<key>
<string>
write_permission
</string>
</key>
<value>
<string>
Manage properties
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
View file @
1ab24793
...
...
@@ -8,8 +8,11 @@ from Products.ERP5Type.Errors import UnsupportedWorkflowMethod
portal
=
context
.
getPortalObject
()
portal_catalog
=
portal
.
portal_catalog
portal_preferences
=
portal
.
portal_preferences
today
=
DateTime
().
strftime
(
'%d%m%Y'
)
share_data_analysis_pref
=
portal_preferences
.
getPreference
(
'preferred_enable_data_analysis_sharing'
)
if
not
include_delivered
:
batch_simulation_state
=
"stopped"
stream_simulation_state
=
"started"
...
...
@@ -57,7 +60,7 @@ for movement in portal_catalog(query = query):
transformation_list
.
append
(
transformation
)
for
transformation
in
transformation_list
:
is_shared_data_analysis
=
False
data_analysis_is_shared
=
False
data_analysis_id
=
"%s-%s-%s"
%
(
today
,
delivery
.
getId
(),
transformation
.
getId
())
# Check if analysis already exists
...
...
@@ -75,9 +78,9 @@ for movement in portal_catalog(query = query):
if
data_analysis
is
not
None
:
continue
#
for first level analysis check if same kind of data analysis with same project and same source already exists
# If yes,
then later add additional input lines to this shared data analysis
if
delivery
.
getPortalType
()
==
"Data Ingestion"
:
#
If the system preference is enabled, check if a data analysis with the same project and source already exists.
# If yes,
add additional input lines to this shared data analysis later on
if
share_data_analysis_pref
and
delivery
.
getPortalType
()
==
"Data Ingestion"
:
data_analysis
=
portal_catalog
.
getResultValue
(
portal_type
=
"Data Analysis"
,
specialise_relative_url
=
transformation
.
getRelativeUrl
(),
...
...
@@ -86,9 +89,9 @@ for movement in portal_catalog(query = query):
if
data_analysis
is
not
None
:
data_analysis
.
setDefaultCausalityValue
(
delivery
)
data_analysis
.
setSpecialiseValueSet
(
data_analysis
.
getSpecialiseValueList
()
+
data_supply_list
)
is_shared_data_analysis
=
True
data_analysis_is_shared
=
True
else
:
# Create
A
nalysis
# Create
the data a
nalysis
data_analysis
=
portal
.
data_analysis_module
.
newContent
(
portal_type
=
"Data Analysis"
,
title
=
transformation
.
getTitle
(),
...
...
@@ -115,8 +118,8 @@ for movement in portal_catalog(query = query):
if
isinstance
(
quantity
,
tuple
):
quantity
=
quantity
[
0
]
# In case of
shared data anyl
sis only add additional input lines
if
is_shared_data_analysis
and
quantity
>
-
1
:
# In case of
a shared data analy
sis only add additional input lines
if
data_analysis_is_shared
and
quantity
>
-
1
:
continue
aggregate_set
=
set
()
...
...
@@ -214,7 +217,7 @@ for movement in portal_catalog(query = query):
quantity_unit
=
transformation_line
.
getQuantityUnit
(),
use_list
=
transformation_line
.
getUseList
(),
aggregate_set
=
aggregate_set
)
# for in
tput lines of first level
analysis set causality and specialise
# for in
put lines of a shared data
analysis set causality and specialise
if
quantity
<
0
and
delivery
.
getPortalType
()
==
"Data Ingestion"
:
data_analysis_line
.
edit
(
causality_value
=
delivery
,
...
...
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/SystemPreference_viewWendelin.xml
View file @
1ab24793
...
...
@@ -98,6 +98,7 @@
<value>
<list>
<string>
my_preferred_data_product_individual_variation_base_category_list
</string>
<string>
my_preferred_enable_data_analysis_sharing
</string>
</list>
</value>
</item>
...
...
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/SystemPreference_viewWendelin/my_preferred_enable_data_analysis_sharing.xml
0 → 100644
View file @
1ab24793
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"CheckBoxField"
module=
"Products.Formulator.StandardFields"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_preferred_enable_data_analysis_sharing
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
<item>
<key>
<string>
required_not_found
</string>
</key>
<value>
<string>
This field is mandatory.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Enable using the same Data Analysis for data ingestions with the same project and the same source.
</string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Enable Data Analysis Sharing
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_wendelin/bt/template_document_id_list
View file @
1ab24793
document.erp5.IngestionPolicyTool
document.erp5.IngestionPolicy
document.erp5.DataArray
document.erp5.DataArrayLine
document.erp5.DataArrayLineExistenceConstraint
document.erp5.DataArrayView
document.erp5.DataArrayViewLine
document.erp5.DataArrayLineExistenceConstraint
document.erp5.DataBucketStream
document.erp5.DataMapping
document.erp5.DataStream
document.erp5.DataTransformation
document.erp5.DataMapping
\ No newline at end of file
document.erp5.IngestionPolicy
document.erp5.IngestionPolicyTool
\ No newline at end of file
bt5/erp5_wendelin/bt/template_property_sheet_id_list
View file @
1ab24793
IngestionPolicy
DataArray
DataArrayLine
DataDescriptor
DataEvent
DataDescriptor
DataEvent
DataMovement
DataOperation
IngestionPolicy
OffsetIndex
WendelinProductDataPreference
\ No newline at end of file
WendelinProductDataPreference
WendelinShareDataAnalysisPreference
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment