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
51697e57
Commit
51697e57
authored
Jan 22, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReadShiftFromSpreadsheet: add a TODO comment
parent
61c6bb23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
dream/plugins/ReadShiftFromSpreadsheet.py
dream/plugins/ReadShiftFromSpreadsheet.py
+4
-3
No files found.
dream/plugins/ReadShiftFromSpreadsheet.py
View file @
51697e57
...
@@ -17,7 +17,7 @@ class ReadShiftFromSpreadsheet(plugin.InputPreparationPlugin):
...
@@ -17,7 +17,7 @@ class ReadShiftFromSpreadsheet(plugin.InputPreparationPlugin):
now
=
strptime
(
data
[
'general'
][
'currentDate'
],
'%Y/%m/%d'
)
now
=
strptime
(
data
[
'general'
][
'currentDate'
],
'%Y/%m/%d'
)
shift_by_station
=
{}
shift_by_station
=
{}
# XXX machine_shift_spreadsheet should be configuration
for
line
in
data
[
'input'
][
'machine_shift_spreadsheet'
][
1
:]:
for
line
in
data
[
'input'
][
'machine_shift_spreadsheet'
][
1
:]:
if
line
[
1
]:
if
line
[
1
]:
# Get the dates, and convert them to simulation clock time units.
# Get the dates, and convert them to simulation clock time units.
...
@@ -31,7 +31,8 @@ class ReadShiftFromSpreadsheet(plugin.InputPreparationPlugin):
...
@@ -31,7 +31,8 @@ class ReadShiftFromSpreadsheet(plugin.InputPreparationPlugin):
shift_by_station
.
setdefault
(
station
,
[]).
append
(
shift_by_station
.
setdefault
(
station
,
[]).
append
(
(
start_time
,
stop_time
)
)
(
start_time
,
stop_time
)
)
if
data
[
'input'
][
'operator_shift_spreadsheet'
]:
# XXX operator_shift_spreadsheet should be configuration
if
data
[
'input'
].
get
(
'operator_shift_spreadsheet'
,
None
):
for
line
in
data
[
'input'
][
'operator_shift_spreadsheet'
][
1
:]:
for
line
in
data
[
'input'
][
'operator_shift_spreadsheet'
][
1
:]:
if
line
[
1
]:
if
line
[
1
]:
# Get the dates, and convert them to simulation clock time units.
# Get the dates, and convert them to simulation clock time units.
...
@@ -53,4 +54,4 @@ class ReadShiftFromSpreadsheet(plugin.InputPreparationPlugin):
...
@@ -53,4 +54,4 @@ class ReadShiftFromSpreadsheet(plugin.InputPreparationPlugin):
node_data
[
'interruptions'
][
'shift'
]
=
{
'shiftPattern'
:
shift_by_station
.
pop
(
node
),
node_data
[
'interruptions'
][
'shift'
]
=
{
'shiftPattern'
:
shift_by_station
.
pop
(
node
),
'endUnfinished'
:
0
}
# XXX shall we make this
'endUnfinished'
:
0
}
# XXX shall we make this
# configurable ?
# configurable ?
return
data
return
data
\ 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