Skip to content

Commit

Permalink
change suite.rc cycling option name to cycling mode
Browse files Browse the repository at this point in the history
  • Loading branch information
benfitzpatrick committed Jun 19, 2014
1 parent 497907a commit 145299e
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dev/suites/integer/one/suite.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
initial cycle time = 1
final cycle time = 16
runahead factor = 4
cycling = integer
cycling mode = integer
[[special tasks]]
sequential = seq
[[dependencies]]
Expand Down
2 changes: 1 addition & 1 deletion lib/cylc/cfgspec/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def _coerce_cycletime_time_zone( value, keys, args ):
'scheduling' : {
'initial cycle time' : vdr(vtype='cycletime'),
'final cycle time' : vdr(vtype='cycletime'),
'cycling' : vdr(vtype='string', default="gregorian", options=["360","gregorian","integer"] ),
'cycling mode' : vdr(vtype='string', default="gregorian", options=["360","gregorian","integer"] ),
'runahead factor' : vdr(vtype='integer', default=2 ),
'queues' : {
'default' : {
Expand Down
6 changes: 4 additions & 2 deletions lib/cylc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def __init__( self, suite, fpath, template_vars=[],
write_proc=write_proc )
self.cfg = self.pcfg.get(sparse=True)

if 'cycling' not in self.cfg['scheduling']:
if 'cycling mode' not in self.cfg['scheduling']:
# Auto-detect integer cycling for pure async graph suites.
dependency_map = self.cfg.get('scheduling', {}).get(
'dependencies', {})
Expand All @@ -156,7 +156,9 @@ def __init__( self, suite, fpath, template_vars=[],
break
else:
# There aren't any other graphs, so set integer cycling.
self.cfg['scheduling']['cycling'] = INTEGER_CYCLING_TYPE
self.cfg['scheduling']['cycling mode'] = (
INTEGER_CYCLING_TYPE
)
if 'initial cycle time' not in self.cfg['scheduling']:
self.cfg['scheduling']['initial cycle time'] = "1"
if 'final cycle time' not in self.cfg['scheduling']:
Expand Down
2 changes: 1 addition & 1 deletion lib/cylc/cycling/iso8601.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def init_from_cfg(cfg):
initial_cycle_time = cfg['scheduling']['initial cycle time']
final_cycle_time = cfg['scheduling']['final cycle time']
assume_utc = cfg['cylc']['UTC mode']
cycling_mode = cfg['scheduling']['cycling']
cycling_mode = cfg['scheduling']['cycling mode']
test_cycle_time = initial_cycle_time
if initial_cycle_time is None:
test_cycle_time = final_cycle_time
Expand Down
2 changes: 1 addition & 1 deletion lib/cylc/cycling/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def get_sequence_cls(cycling_type=None):


def init_cyclers(cfg):
DefaultCycler.TYPE = cfg['scheduling']['cycling']
DefaultCycler.TYPE = cfg['scheduling']['cycling mode']
if DefaultCycler.TYPE in ['360','gregorian']:
DefaultCycler.TYPE = ISO8601_CYCLING_TYPE
for cycling_type, init_func in INIT_FUNCTIONS.items():
Expand Down
2 changes: 1 addition & 1 deletion lib/cylc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def configure_suite( self, reconfigure=False ):
flags.utc = self.config.cfg['cylc']['UTC mode']

# Capture cycling mode
flags.cycling_mode = self.config.cfg['scheduling']['cycling']
flags.cycling_mode = self.config.cfg['scheduling']['cycling mode']

if not reconfigure:
slog = suite_log( self.suite )
Expand Down
2 changes: 1 addition & 1 deletion tests/cyclers/360/suite.rc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[scheduling]
initial cycle time = 20130228T00
final cycle time = 20130301T00
cycling = 360
cycling mode = 360
[[dependencies]]
[[[ P1D ]]]
graph = foo[-P1D] => foo
Expand Down
2 changes: 1 addition & 1 deletion tests/cyclers/integer1/suite.rc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
initial cycle time = 1
final cycle time = 16
runahead factor = 4
cycling = integer
cycling mode = integer
[[special tasks]]
sequential = seq
[[dependencies]]
Expand Down

0 comments on commit 145299e

Please sign in to comment.