Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
6d879bf5
Commit
6d879bf5
authored
Mar 27, 2015
by
panos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scripts are modified
parent
d5112e95
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
dream/plugins/JobShopKE.py
dream/plugins/JobShopKE.py
+3
-0
dream/plugins/UpdateStationList.py
dream/plugins/UpdateStationList.py
+2
-1
dream/plugins/plugin.py
dream/plugins/plugin.py
+2
-1
No files found.
dream/plugins/JobShopKE.py
View file @
6d879bf5
...
@@ -14,6 +14,9 @@ class JobShopKE(plugin.InputPreparationPlugin):
...
@@ -14,6 +14,9 @@ class JobShopKE(plugin.InputPreparationPlugin):
def
preprocess
(
self
,
data
):
def
preprocess
(
self
,
data
):
from
dream.KnowledgeExtraction.PilotCases.JobShop.DataExtraction
import
DataExtraction
from
dream.KnowledgeExtraction.PilotCases.JobShop.DataExtraction
import
DataExtraction
receivedData
=
DataExtraction
(
"C:
\
Use
r
s
\
P
a
nos
\
Docume
n
ts
\
DB_App
r
oach
\
Jo
b
Shop"
)
receivedData
=
DataExtraction
(
"C:
\
Use
r
s
\
P
a
nos
\
Docume
n
ts
\
DB_App
r
oach
\
Jo
b
Shop"
)
outputJSONString
=
json
.
dumps
(
receivedData
,
indent
=
True
)
outputJSONFile
=
open
(
'dataFromSQL.json'
,
mode
=
'w'
)
outputJSONFile
.
write
(
outputJSONString
)
data
[
'input'
][
'BOM'
]
=
receivedData
data
[
'input'
][
'BOM'
]
=
receivedData
return
data
return
data
dream/plugins/UpdateStationList.py
View file @
6d879bf5
...
@@ -51,7 +51,7 @@ class UpdateStationList(plugin.InputPreparationPlugin):
...
@@ -51,7 +51,7 @@ class UpdateStationList(plugin.InputPreparationPlugin):
self
.
data
=
data
self
.
data
=
data
orders
=
data
[
"input"
].
get
(
"BOM"
,{}).
get
(
"productionOrders"
,{})
orders
=
data
[
"input"
].
get
(
"BOM"
,{}).
get
(
"productionOrders"
,{})
try
:
try
:
stations
=
data
[
"input"
][
"BOM"
][
'stations'
]
stations
=
data
[
"input"
][
"BOM"
][
'stations
1
'
]
except
:
except
:
stations
=
self
.
getStationNames
()
stations
=
self
.
getStationNames
()
nodes
=
data
[
"graph"
][
"node"
]
nodes
=
data
[
"graph"
][
"node"
]
...
@@ -66,6 +66,7 @@ class UpdateStationList(plugin.InputPreparationPlugin):
...
@@ -66,6 +66,7 @@ class UpdateStationList(plugin.InputPreparationPlugin):
step
[
"technology"
]
=
technology
step
[
"technology"
]
=
technology
technologyStations
=
[]
technologyStations
=
[]
for
station
in
stations
:
for
station
in
stations
:
station
=
station
.
replace
(
" "
,
""
).
split
(
"-"
)[
0
]
for
initials
in
self
.
getStationInitials
(
technology
):
for
initials
in
self
.
getStationInitials
(
technology
):
if
station
.
startswith
(
initials
)
\
if
station
.
startswith
(
initials
)
\
and
data
[
"graph"
][
"node"
][
station
][
"_class"
]
in
self
.
STATION_CLASS_SET
:
and
data
[
"graph"
][
"node"
][
station
][
"_class"
]
in
self
.
STATION_CLASS_SET
:
...
...
dream/plugins/plugin.py
View file @
6d879bf5
...
@@ -160,7 +160,8 @@ class PluginRegistry(object):
...
@@ -160,7 +160,8 @@ class PluginRegistry(object):
outputJSONString
=
json
.
dumps
(
data
,
indent
=
5
)
outputJSONString
=
json
.
dumps
(
data
,
indent
=
5
)
outputJSONFile
=
open
(
'sentToManPy.json'
,
mode
=
'w'
)
outputJSONFile
=
open
(
'sentToManPy.json'
,
mode
=
'w'
)
outputJSONFile
.
write
(
outputJSONString
)
outputJSONFile
.
write
(
outputJSONString
)
data
=
self
.
execution_plugin
.
run
(
data
)
data
=
self
.
execution_plugin
.
run
(
data
)
for
output_preparation
in
self
.
output_preparation_list
:
for
output_preparation
in
self
.
output_preparation_list
:
...
...
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