def upg( cfg, descr ): add_bin_dir = converter( lambda x: x + '/bin', "Added + '/bin' to path" ) use_ssh = converter( lambda x: "ssh", "set to 'ssh'" ) u = upgrader(cfg, descr ) u.deprecate( '5.1.1', ['editors','in-terminal'], ['editors','terminal'] ) u.deprecate( '5.1.1', ['task hosts'], ['hosts'] ) u.deprecate( '5.1.1', ['hosts','local'], ['hosts','localhost'] ) u.deprecate( '5.1.1', ['hosts','__MANY__', 'workspace directory'], ['hosts','__MANY__', 'workdirectory'] ) u.deprecate( '5.1.1', ['hosts','__MANY__', 'cylc directory'], ['hosts','__MANY__', 'cylc bin directory'], add_bin_dir ) u.obsolete( '5.2.0', ['hosts','__MANY__', 'cylc bin directory'], ['hosts','__MANY__', 'cylc bin directory'] ) u.deprecate( '5.2.0', ['hosts','__MANY__', 'use ssh messaging'], ['hosts','__MANY__', 'task communication method'], use_ssh ) u.deprecate( '6.1.2', ['task messaging', 'connection timeout in seconds'], ['task messaging', 'connection timeout'] ) u.deprecate( '6.1.2', ['task messaging', 'retry interval in seconds'], ['task messaging', 'retry interval'] ) u.deprecate('6.4.0', ['runtime', '__MANY__', 'global initial scripting'], ['runtime', '__MANY__', 'global init-script']) for batch_sys_name in ['loadleveler', 'lsf', 'pbs', 'sge', 'slurm']: u.deprecate('6.4.1', ['test battery', 'directives', batch_sys_name + ' host'], ['test battery', 'batch systems', batch_sys_name, 'host']) u.deprecate('6.4.1', ['test battery', 'directives', batch_sys_name + ' directives'], ['test battery', 'batch systems', batch_sys_name, 'directives']) u.obsolete('6.4.1', ['test battery', 'directives']) u.upgrade()
def upg(cfg, descr): """Upgrader.""" add_bin_dir = converter(lambda x: x + '/bin', "Added + '/bin' to path") use_ssh = converter(lambda x: "ssh", "set to 'ssh'") u = upgrader(cfg, descr) u.deprecate('5.1.1', ['editors', 'in-terminal'], ['editors', 'terminal']) u.deprecate('5.1.1', ['task hosts'], ['hosts']) u.deprecate('5.1.1', ['hosts', 'local'], ['hosts', 'localhost']) u.deprecate('5.1.1', ['hosts', '__MANY__', 'workspace directory'], ['hosts', '__MANY__', 'workdirectory']) u.deprecate('5.1.1', ['hosts', '__MANY__', 'cylc directory'], ['hosts', '__MANY__', 'cylc bin directory'], add_bin_dir) u.obsolete('5.2.0', ['hosts', '__MANY__', 'cylc bin directory'], ['hosts', '__MANY__', 'cylc bin directory']) u.deprecate('5.2.0', ['hosts', '__MANY__', 'use ssh messaging'], ['hosts', '__MANY__', 'task communication method'], use_ssh) u.deprecate('6.1.2', ['task messaging', 'connection timeout in seconds'], ['task messaging', 'connection timeout']) u.deprecate('6.1.2', ['task messaging', 'retry interval in seconds'], ['task messaging', 'retry interval']) u.deprecate('6.4.0', ['runtime', '__MANY__', 'global initial scripting'], ['runtime', '__MANY__', 'global init-script']) for batch_sys_name in ['loadleveler', 'lsf', 'pbs', 'sge', 'slurm']: u.deprecate('6.4.1', ['test battery', 'directives', batch_sys_name + ' host'], ['test battery', 'batch systems', batch_sys_name, 'host']) u.deprecate( '6.4.1', ['test battery', 'directives', batch_sys_name + ' directives'], ['test battery', 'batch systems', batch_sys_name, 'directives']) u.obsolete('6.4.1', ['test battery', 'directives']) u.obsolete('6.11.0', ['state dump rolling archive length']) u.deprecate('6.11.0', ['cylc', 'event hooks'], ['cylc', 'events']) for key in SPEC['cylc']['events']: u.deprecate('6.11.0', ['cylc', 'event hooks', key], ['cylc', 'events', key]) u.obsolete('7.0.0', ['pyro', 'base port']) u.obsolete('7.0.0', ['pyro', 'maximum number of ports'], ['communication', 'maximum number of ports']) u.obsolete( '7.0.0', ['pyro', 'ports directory'], ) u.obsolete('7.0.0', ['pyro']) u.obsolete('7.0.0', ['authentication', 'hashes']) u.obsolete('7.0.0', ['authentication', 'scan hash']) u.deprecate('7.0.0', ['execution polling intervals'], ['hosts', 'localhost', 'execution polling intervals']) u.deprecate('7.0.0', ['submission polling intervals'], ['hosts', 'localhost', 'submission polling intervals']) u.deprecate('7.3.1', ['hosts', '__MANY__', 'remote shell template'], ['hosts', '__MANY__', 'ssh command']) u.deprecate('7.3.1', ['hosts', '__MANY__', 'remote copy template'], ['hosts', '__MANY__', 'scp command']) # A special remote tail command template is no longer needed. It used to # use 'tail -pid' to kill 'tail' on ssh exit, but we do this in cylc now. u.obsolete('7.6.0', ['hosts', '__MANY__', 'remote tail command template']) u.deprecate('7.6.0', ['hosts', '__MANY__', 'local tail command template'], ['hosts', '__MANY__', 'tail command template']) u.upgrade()
def upg(cfg, descr): """Upgrader.""" add_bin_dir = converter(lambda x: x + '/bin', "Added + '/bin' to path") use_ssh = converter(lambda x: "ssh", "set to 'ssh'") u = upgrader(cfg, descr) u.obsolete('6.4.1', ['test battery', 'directives']) u.obsolete('6.11.0', ['state dump rolling archive length']) # Roll over is always done. u.obsolete('7.8.0', ['suite logging', 'roll over at start-up']) u.obsolete('7.8.1', ['documentation', 'local index']) u.obsolete('7.8.1', ['documentation', 'files', 'pdf user guide']) u.obsolete('7.8.1', ['documentation', 'files', 'single-page html user guide']) u.deprecate('7.8.1', ['documentation', 'files', 'multi-page html user guide'], ['documentation', 'local']) u.deprecate('8.0.0', ['documentation', 'files', 'html index'], ['documentation', 'local']) u.deprecate('8.0.0', ['documentation', 'urls', 'internet homepage'], ['documentation', 'cylc homepage']) u.obsolete('8.0.0', ['suite servers', 'scan hosts']) u.obsolete('8.0.0', ['suite servers', 'scan ports']) u.obsolete('8.0.0', ['communication']) u.upgrade()
def upg( cfg, descr ): add_bin_dir = converter( lambda x: x + '/bin', "Added + '/bin' to path" ) use_ssh = converter( lambda x: "ssh", "set to 'ssh'" ) u = upgrader(cfg, descr ) u.deprecate( '5.1.1', ['editors','in-terminal'], ['editors','terminal'] ) u.deprecate( '5.1.1', ['task hosts'], ['hosts'] ) u.deprecate( '5.1.1', ['hosts','local'], ['hosts','localhost'] ) u.deprecate( '5.1.1', ['hosts','__MANY__', 'workspace directory'], ['hosts','__MANY__', 'workdirectory'] ) u.deprecate( '5.1.1', ['hosts','__MANY__', 'cylc directory'], ['hosts','__MANY__', 'cylc bin directory'], add_bin_dir ) u.obsolete( '5.2.0', ['hosts','__MANY__', 'cylc bin directory'], ['hosts','__MANY__', 'cylc bin directory'] ) u.deprecate( '5.2.0', ['hosts','__MANY__', 'use ssh messaging'], ['hosts','__MANY__', 'task communication method'], use_ssh ) u.upgrade()
def upg(cfg, descr): add_bin_dir = converter(lambda x: x + '/bin', "Added + '/bin' to path") use_ssh = converter(lambda x: "ssh", "set to 'ssh'") u = upgrader(cfg, descr) u.deprecate('5.1.1', ['editors', 'in-terminal'], ['editors', 'terminal']) u.deprecate('5.1.1', ['task hosts'], ['hosts']) u.deprecate('5.1.1', ['hosts', 'local'], ['hosts', 'localhost']) u.deprecate( '5.1.1', ['hosts', '__MANY__', 'workspace directory'], ['hosts', '__MANY__', 'workdirectory']) u.deprecate( '5.1.1', ['hosts', '__MANY__', 'cylc directory'], ['hosts', '__MANY__', 'cylc bin directory'], add_bin_dir) u.obsolete( '5.2.0', ['hosts', '__MANY__', 'cylc bin directory'], ['hosts', '__MANY__', 'cylc bin directory']) u.deprecate( '5.2.0', ['hosts', '__MANY__', 'use ssh messaging'], ['hosts', '__MANY__', 'task communication method'], use_ssh) u.deprecate( '6.1.2', ['task messaging', 'connection timeout in seconds'], ['task messaging', 'connection timeout']) u.deprecate( '6.1.2', ['task messaging', 'retry interval in seconds'], ['task messaging', 'retry interval']) u.deprecate( '6.4.0', ['runtime', '__MANY__', 'global initial scripting'], ['runtime', '__MANY__', 'global init-script']) for batch_sys_name in ['loadleveler', 'lsf', 'pbs', 'sge', 'slurm']: u.deprecate( '6.4.1', ['test battery', 'directives', batch_sys_name + ' host'], ['test battery', 'batch systems', batch_sys_name, 'host']) u.deprecate( '6.4.1', ['test battery', 'directives', batch_sys_name + ' directives'], ['test battery', 'batch systems', batch_sys_name, 'directives']) u.obsolete('6.4.1', ['test battery', 'directives']) u.upgrade()
def upg( cfg, descr ): u = upgrader( cfg, descr ) u.deprecate( '5.2.0', ['cylc','event handler execution'], ['cylc','event handler submission'] ) # TODO - should abort if obsoleted items are encountered u.obsolete( '5.4.7', ['scheduling','special tasks','explicit restart outputs'] ) u.obsolete( '5.4.11', ['cylc', 'accelerated clock'] ) u.obsolete( '6.0.0', ['visualization', 'runtime graph'] ) u.obsolete( '6.0.0', ['development'] ) u.deprecate( '6.0.0', ['scheduling', 'initial cycle time'], ['scheduling', 'initial cycle point'], converter( lambda x: x, 'changed naming to reflect non-date-time cycling' ) ) u.deprecate( '6.0.0', ['scheduling', 'final cycle time'], ['scheduling', 'final cycle point'], converter( lambda x: x, 'changed naming to reflect non-date-time cycling' ) ) u.deprecate( '6.0.0', ['visualization', 'initial cycle time'], ['visualization', 'initial cycle point'], converter( lambda x: x, 'changed naming to reflect non-date-time cycling' ) ) u.deprecate( '6.0.0', ['visualization', 'final cycle time'], ['visualization', 'final cycle point'], converter( lambda x: x, 'changed naming to reflect non-date-time cycling' ) ) u.obsolete('6.0.0', ['scheduling', 'dependencies', '__MANY__', 'daemon']) u.obsolete('6.0.0', ['cylc', 'job submission']) u.obsolete('6.0.0', ['cylc', 'event handler submission']) u.obsolete('6.0.0', ['cylc', 'poll and kill command submission']) u.obsolete('6.0.0', ['cylc', 'lockserver']) u.upgrade() # Force pre cylc-6 "cycling = Yearly" type suites to the explicit # dependency heading form for which backward compatibility is provided: #____________________________ # [scheduling] # cycling = Yearly # [[dependencies]] # [[[2014,2]]] #---------------------------- # Same as (for auto upgrade): #---------------------------- # [scheduling] # [[dependencies]] # [[[Yearly(2014,2)]]] #____________________________ try: old_cycling_mode = cfg['scheduling']['cycling'] except: pass else: if old_cycling_mode in ['Yearly', 'Monthly', 'Daily']: del cfg['scheduling']['cycling'] for old_key, val in cfg['scheduling']['dependencies'].items(): if re.match('\s*\d+,\s*\d+\s*$', old_key): new_key = "%s(%s)" % (old_cycling_mode, old_key) del cfg['scheduling']['dependencies'][old_key] cfg['scheduling']['dependencies'][new_key] = val else: # Could be misspelled new "cycling mode" - leave it to fail. pass
def upg(cfg, descr): """Upgrade old suite configuration.""" u = upgrader(cfg, descr) u.deprecate("5.2.0", ["cylc", "event handler execution"], ["cylc", "event handler submission"]) # TODO - should abort if obsoleted items are encountered u.obsolete("5.4.7", ["scheduling", "special tasks", "explicit restart outputs"]) u.obsolete("5.4.11", ["cylc", "accelerated clock"]) u.obsolete("6.0.0", ["visualization", "runtime graph"]) u.obsolete("6.1.3", ["visualization", "enable live graph movie"]) u.obsolete("6.0.0", ["development"]) u.deprecate( "6.0.0", ["scheduling", "initial cycle time"], ["scheduling", "initial cycle point"], converter(lambda x: x, "changed naming to reflect non-date-time cycling"), ) u.deprecate( "6.0.0", ["scheduling", "final cycle time"], ["scheduling", "final cycle point"], converter(lambda x: x, "changed naming to reflect non-date-time cycling"), ) u.deprecate( "6.0.0", ["visualization", "initial cycle time"], ["visualization", "initial cycle point"], converter(lambda x: x, "changed naming to reflect non-date-time cycling"), ) u.deprecate( "6.0.0", ["visualization", "final cycle time"], ["visualization", "final cycle point"], converter(lambda x: x, "changed naming to reflect non-date-time cycling"), ) u.deprecate("6.0.0", ["scheduling", "cycling"]) u.deprecate("6.0.0", ["scheduling", "special tasks", "sequential"]) u.deprecate("6.0.0", ["scheduling", "special tasks", "start-up"]) u.deprecate("6.0.0", ["scheduling", "special tasks", "cold-start"]) u.obsolete("6.0.0", ["cylc", "job submission"]) u.obsolete("6.0.0", ["cylc", "event handler submission"]) u.obsolete("6.0.0", ["cylc", "poll and kill command submission"]) u.obsolete("6.0.0", ["cylc", "lockserver"]) dep = { "pre-command scripting": "pre-script", "command scripting": "script", "post-command scripting": "post-script", "environment scripting": "env-script", "initial scripting": "init-script", } for old, new in dep.items(): u.deprecate("6.4.0", ["runtime", "__MANY__", old], ["runtime", "__MANY__", new], silent=True) u.deprecate( "6.4.0", ["runtime", "__MANY__", "dummy mode", old], ["runtime", "__MANY__", "dummy mode", new], silent=True ) u.deprecate( "6.5.0", ["scheduling", "special tasks", "clock-triggered"], ["scheduling", "special tasks", "clock-trigger"] ) u.deprecate( "6.5.0", ["scheduling", "special tasks", "external-triggered"], ["scheduling", "special tasks", "external-trigger"], ) for key in SPEC["cylc"]["events"]: u.deprecate("6.11.0", ["cylc", "event hooks", key], ["cylc", "events", key]) u.deprecate("6.11.0", ["cylc", "event hooks"]) for key in SPEC["runtime"]["__MANY__"]["events"]: u.deprecate("6.11.0", ["runtime", "__MANY__", "event hooks", key], ["runtime", "__MANY__", "events", key]) u.deprecate("6.11.0", ["runtime", "__MANY__", "event hooks"]) u.deprecate( "6.11.0", ["runtime", "__MANY__", "job submission", "method"], ["runtime", "__MANY__", "job", "batch system"] ) u.deprecate( "6.11.0", ["runtime", "__MANY__", "job submission", "command template"], ["runtime", "__MANY__", "job", "batch submit command template"], ) u.deprecate("6.11.0", ["runtime", "__MANY__", "job submission", "shell"], ["runtime", "__MANY__", "job", "shell"]) u.deprecate( "6.11.0", ["runtime", "__MANY__", "job submission", "retry delays"], ["runtime", "__MANY__", "job", "submission retry delays"], ) u.deprecate("6.11.0", ["runtime", "__MANY__", "job submission"]) u.deprecate( "6.11.0", ["runtime", "__MANY__", "retry delays"], ["runtime", "__MANY__", "job", "execution retry delays"] ) u.deprecate( "6.11.0", ["runtime", "__MANY__", "submission polling intervals"], ["runtime", "__MANY__", "job", "submission polling intervals"], ) u.deprecate( "6.11.0", ["runtime", "__MANY__", "execution polling intervals"], ["runtime", "__MANY__", "job", "execution polling intervals"], ) u.upgrade() if "cylc" in cfg and "event hooks" in cfg["cylc"]: del cfg["cylc"]["event hooks"] if "runtime" in cfg: for section in cfg["runtime"].values(): for key in ["event hooks", "job submission"]: if key in section: del section[key] # Force pre cylc-6 "cycling = Yearly" type suites to the explicit # dependency heading form for which backward compatibility is provided: # ___________________________ # [scheduling] # cycling = Yearly # [[dependencies]] # [[[2014,2]]] # --------------------------- # Same as (for auto upgrade): # --------------------------- # [scheduling] # [[dependencies]] # [[[Yearly(2014,2)]]] # ___________________________ try: old_cycling_mode = cfg["scheduling"]["cycling"] except KeyError: pass else: if old_cycling_mode in ["Yearly", "Monthly", "Daily"]: del cfg["scheduling"]["cycling"] for old_key, val in cfg["scheduling"]["dependencies"].items(): if re.match("\s*\d+,\s*\d+\s*$", old_key): new_key = "%s(%s)" % (old_cycling_mode, old_key) del cfg["scheduling"]["dependencies"][old_key] cfg["scheduling"]["dependencies"][new_key] = val else: # Could be misspelled new "cycling mode" - leave it to fail. pass
def upg(cfg, descr): """Upgrader.""" add_bin_dir = converter(lambda x: x + '/bin', "Added + '/bin' to path") use_ssh = converter(lambda x: "ssh", "set to 'ssh'") u = upgrader(cfg, descr) u.deprecate('5.1.1', ['editors', 'in-terminal'], ['editors', 'terminal']) u.deprecate('5.1.1', ['task hosts'], ['hosts']) u.deprecate('5.1.1', ['hosts', 'local'], ['hosts', 'localhost']) u.deprecate( '5.1.1', ['hosts', '__MANY__', 'workspace directory'], ['hosts', '__MANY__', 'workdirectory']) u.deprecate( '5.1.1', ['hosts', '__MANY__', 'cylc directory'], ['hosts', '__MANY__', 'cylc bin directory'], add_bin_dir) u.obsolete( '5.2.0', ['hosts', '__MANY__', 'cylc bin directory'], ['hosts', '__MANY__', 'cylc bin directory']) u.deprecate( '5.2.0', ['hosts', '__MANY__', 'use ssh messaging'], ['hosts', '__MANY__', 'task communication method'], use_ssh) u.deprecate( '6.1.2', ['task messaging', 'connection timeout in seconds'], ['task messaging', 'connection timeout']) u.deprecate( '6.1.2', ['task messaging', 'retry interval in seconds'], ['task messaging', 'retry interval']) u.deprecate( '6.4.0', ['runtime', '__MANY__', 'global initial scripting'], ['runtime', '__MANY__', 'global init-script']) for batch_sys_name in ['loadleveler', 'lsf', 'pbs', 'sge', 'slurm']: u.deprecate( '6.4.1', ['test battery', 'directives', batch_sys_name + ' host'], ['test battery', 'batch systems', batch_sys_name, 'host']) u.deprecate( '6.4.1', ['test battery', 'directives', batch_sys_name + ' directives'], ['test battery', 'batch systems', batch_sys_name, 'directives']) u.obsolete('6.4.1', ['test battery', 'directives']) u.obsolete('6.11.0', ['state dump rolling archive length']) u.deprecate('6.11.0', ['cylc', 'event hooks'], ['cylc', 'events']) for key in SPEC['cylc']['events']: u.deprecate( '6.11.0', ['cylc', 'event hooks', key], ['cylc', 'events', key]) u.obsolete( '7.0.0', ['pyro', 'base port'] ) u.obsolete( '7.0.0', ['pyro', 'maximum number of ports'], ['communication', 'maximum number of ports'] ) u.obsolete( '7.0.0', ['pyro', 'ports directory'], ['communication', 'ports directory'] ) u.obsolete( '7.0.0', ['pyro'] ) u.obsolete( '7.0.0', ['authentication', 'hashes'] ) u.obsolete( '7.0.0', ['authentication', 'scan hash'] ) u.deprecate( '7.0.0', ['execution polling intervals'], ['hosts', 'localhost', 'execution polling intervals']) u.deprecate( '7.0.0', ['submission polling intervals'], ['hosts', 'localhost', 'submission polling intervals']) u.upgrade()
def upg(cfg, descr): """Upgrade old suite configuration.""" u = upgrader(cfg, descr) u.deprecate( '5.2.0', ['cylc', 'event handler execution'], ['cylc', 'event handler submission']) # TODO - should abort if obsoleted items are encountered u.obsolete( '5.4.7', ['scheduling', 'special tasks', 'explicit restart outputs']) u.obsolete('5.4.11', ['cylc', 'accelerated clock']) u.obsolete('6.0.0', ['visualization', 'runtime graph']) u.obsolete('6.1.3', ['visualization', 'enable live graph movie']) u.obsolete('6.0.0', ['development']) u.deprecate( '6.0.0', ['scheduling', 'initial cycle time'], ['scheduling', 'initial cycle point'], converter( lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate( '6.0.0', ['scheduling', 'final cycle time'], ['scheduling', 'final cycle point'], converter( lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate( '6.0.0', ['visualization', 'initial cycle time'], ['visualization', 'initial cycle point'], converter( lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate( '6.0.0', ['visualization', 'final cycle time'], ['visualization', 'final cycle point'], converter( lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate( '6.0.0', ['scheduling', 'cycling'] ) u.deprecate( '6.0.0', ['scheduling', 'special tasks', 'sequential'] ) u.deprecate( '6.0.0', ['scheduling', 'special tasks', 'start-up'] ) u.deprecate( '6.0.0', ['scheduling', 'special tasks', 'cold-start'] ) u.obsolete('6.0.0', ['cylc', 'job submission']) u.obsolete('6.0.0', ['cylc', 'event handler submission']) u.obsolete('6.0.0', ['cylc', 'poll and kill command submission']) u.obsolete('6.0.0', ['cylc', 'lockserver']) dep = { 'pre-command scripting': 'pre-script', 'command scripting': 'script', 'post-command scripting': 'post-script', 'environment scripting': 'env-script', 'initial scripting': 'init-script' } for old, new in dep.items(): u.deprecate( '6.4.0', ['runtime', '__MANY__', old], ['runtime', '__MANY__', new], silent=True) u.deprecate( '6.4.0', ['runtime', '__MANY__', 'dummy mode', old], ['runtime', '__MANY__', 'dummy mode', new], silent=True) u.deprecate( '6.5.0', ['scheduling', 'special tasks', 'clock-triggered'], ['scheduling', 'special tasks', 'clock-trigger'], ) u.deprecate( '6.5.0', ['scheduling', 'special tasks', 'external-triggered'], ['scheduling', 'special tasks', 'external-trigger'], ) for key in SPEC['cylc']['events']: u.deprecate( '6.11.0', ['cylc', 'event hooks', key], ['cylc', 'events', key]) u.deprecate('6.11.0', ['cylc', 'event hooks']) for key in SPEC['runtime']['__MANY__']['events']: u.deprecate( '6.11.0', ['runtime', '__MANY__', 'event hooks', key], ['runtime', '__MANY__', 'events', key]) u.deprecate('6.11.0', ['runtime', '__MANY__', 'event hooks']) u.deprecate( '6.11.0', ['runtime', '__MANY__', 'job submission', 'method'], ['runtime', '__MANY__', 'job', 'batch system']) u.deprecate( '6.11.0', ['runtime', '__MANY__', 'job submission', 'command template'], ['runtime', '__MANY__', 'job', 'batch submit command template']) u.deprecate( '6.11.0', ['runtime', '__MANY__', 'job submission', 'shell'], ['runtime', '__MANY__', 'job', 'shell']) u.deprecate( '6.11.0', ['runtime', '__MANY__', 'job submission', 'retry delays'], ['runtime', '__MANY__', 'job', 'submission retry delays']) u.deprecate('6.11.0', ['runtime', '__MANY__', 'job submission']) u.deprecate( '6.11.0', ['runtime', '__MANY__', 'retry delays'], ['runtime', '__MANY__', 'job', 'execution retry delays']) u.deprecate( '6.11.0', ['runtime', '__MANY__', 'submission polling intervals'], ['runtime', '__MANY__', 'job', 'submission polling intervals']) u.deprecate( '6.11.0', ['runtime', '__MANY__', 'execution polling intervals'], ['runtime', '__MANY__', 'job', 'execution polling intervals']) u.upgrade() if 'cylc' in cfg and 'event hooks' in cfg['cylc']: del cfg['cylc']['event hooks'] if 'runtime' in cfg: for section in cfg['runtime'].values(): for key in ['event hooks', 'job submission']: if key in section: del section[key] # Force pre cylc-6 "cycling = Yearly" type suites to the explicit # dependency heading form for which backward compatibility is provided: # ___________________________ # [scheduling] # cycling = Yearly # [[dependencies]] # [[[2014,2]]] # --------------------------- # Same as (for auto upgrade): # --------------------------- # [scheduling] # [[dependencies]] # [[[Yearly(2014,2)]]] # ___________________________ try: old_cycling_mode = cfg['scheduling']['cycling'] except KeyError: pass else: if old_cycling_mode in ['Yearly', 'Monthly', 'Daily']: del cfg['scheduling']['cycling'] for old_key, val in cfg['scheduling']['dependencies'].items(): if re.match('\s*\d+,\s*\d+\s*$', old_key): new_key = "%s(%s)" % (old_cycling_mode, old_key) del cfg['scheduling']['dependencies'][old_key] cfg['scheduling']['dependencies'][new_key] = val else: # Could be misspelled new "cycling mode" - leave it to fail. pass
def upg(cfg, descr): """Upgrade old suite configuration.""" u = upgrader(cfg, descr) u.deprecate('5.2.0', ['cylc', 'event handler execution'], ['cylc', 'event handler submission']) # TODO - should abort if obsoleted items are encountered u.obsolete('5.4.7', ['scheduling', 'special tasks', 'explicit restart outputs']) u.obsolete('5.4.11', ['cylc', 'accelerated clock']) u.obsolete('6.0.0', ['visualization', 'runtime graph']) u.obsolete('6.1.3', ['visualization', 'enable live graph movie']) u.obsolete('6.0.0', ['development']) u.deprecate( '6.0.0', ['scheduling', 'initial cycle time'], ['scheduling', 'initial cycle point'], converter(lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate( '6.0.0', ['scheduling', 'final cycle time'], ['scheduling', 'final cycle point'], converter(lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate( '6.0.0', ['visualization', 'initial cycle time'], ['visualization', 'initial cycle point'], converter(lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate( '6.0.0', ['visualization', 'final cycle time'], ['visualization', 'final cycle point'], converter(lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate('6.0.0', ['scheduling', 'cycling']) u.deprecate('6.0.0', ['scheduling', 'special tasks', 'sequential']) u.deprecate('6.0.0', ['scheduling', 'special tasks', 'start-up']) u.deprecate('6.0.0', ['scheduling', 'special tasks', 'cold-start']) u.obsolete('6.0.0', ['cylc', 'job submission']) u.obsolete('6.0.0', ['cylc', 'event handler submission']) u.obsolete('6.0.0', ['cylc', 'poll and kill command submission']) u.obsolete('6.0.0', ['cylc', 'lockserver']) dep = { 'pre-command scripting': 'pre-script', 'command scripting': 'script', 'post-command scripting': 'post-script', 'environment scripting': 'env-script', 'initial scripting': 'init-script' } for old, new in dep.items(): u.deprecate('6.4.0', ['runtime', '__MANY__', old], ['runtime', '__MANY__', new], silent=True) u.deprecate('6.4.0', ['runtime', '__MANY__', 'dummy mode', old], ['runtime', '__MANY__', 'dummy mode', new], silent=True) u.deprecate( '6.5.0', ['scheduling', 'special tasks', 'clock-triggered'], ['scheduling', 'special tasks', 'clock-trigger'], ) u.deprecate( '6.5.0', ['scheduling', 'special tasks', 'external-triggered'], ['scheduling', 'special tasks', 'external-trigger'], ) for key in SPEC['cylc']['events']: u.deprecate('6.10.3', ['cylc', 'event hooks', key], ['cylc', 'events', key]) u.deprecate('6.10.3', ['cylc', 'event hooks']) for key in SPEC['runtime']['__MANY__']['events']: u.deprecate('6.10.3', ['runtime', '__MANY__', 'event hooks', key], ['runtime', '__MANY__', 'events', key]) u.deprecate('6.10.3', ['runtime', '__MANY__', 'event hooks']) u.deprecate('6.10.3', ['runtime', '__MANY__', 'job submission', 'method'], ['runtime', '__MANY__', 'job', 'batch system']) u.deprecate( '6.10.3', ['runtime', '__MANY__', 'job submission', 'command template'], ['runtime', '__MANY__', 'job', 'batch submit command template']) u.deprecate('6.10.3', ['runtime', '__MANY__', 'job submission', 'shell'], ['runtime', '__MANY__', 'job', 'shell']) u.deprecate('6.10.3', ['runtime', '__MANY__', 'job submission', 'retry delays'], ['runtime', '__MANY__', 'job', 'submission retry delays']) u.deprecate('6.10.3', ['runtime', '__MANY__', 'job submission']) u.deprecate('6.10.3', ['runtime', '__MANY__', 'retry delays'], ['runtime', '__MANY__', 'job', 'execution retry delays']) u.deprecate('6.10.3', ['runtime', '__MANY__', 'submission polling intervals'], ['runtime', '__MANY__', 'job', 'submission polling intervals']) u.deprecate('6.10.3', ['runtime', '__MANY__', 'execution polling intervals'], ['runtime', '__MANY__', 'job', 'execution polling intervals']) u.upgrade() if 'cylc' in cfg and 'event hooks' in cfg['cylc']: del cfg['cylc']['event hooks'] if 'runtime' in cfg: for section in cfg['runtime'].values(): for key in ['event hooks', 'job submission']: if key in section: del section[key] # Force pre cylc-6 "cycling = Yearly" type suites to the explicit # dependency heading form for which backward compatibility is provided: # ___________________________ # [scheduling] # cycling = Yearly # [[dependencies]] # [[[2014,2]]] # --------------------------- # Same as (for auto upgrade): # --------------------------- # [scheduling] # [[dependencies]] # [[[Yearly(2014,2)]]] # ___________________________ try: old_cycling_mode = cfg['scheduling']['cycling'] except KeyError: pass else: if old_cycling_mode in ['Yearly', 'Monthly', 'Daily']: del cfg['scheduling']['cycling'] for old_key, val in cfg['scheduling']['dependencies'].items(): if re.match('\s*\d+,\s*\d+\s*$', old_key): new_key = "%s(%s)" % (old_cycling_mode, old_key) del cfg['scheduling']['dependencies'][old_key] cfg['scheduling']['dependencies'][new_key] = val else: # Could be misspelled new "cycling mode" - leave it to fail. pass
def upg(cfg, descr): u = upgrader(cfg, descr) u.deprecate('5.2.0', ['cylc', 'event handler execution'], ['cylc', 'event handler submission']) # TODO - should abort if obsoleted items are encountered u.obsolete('5.4.7', ['scheduling', 'special tasks', 'explicit restart outputs']) u.obsolete('5.4.11', ['cylc', 'accelerated clock']) u.obsolete('6.0.0', ['visualization', 'runtime graph']) u.obsolete('6.0.0', ['development']) u.deprecate( '6.0.0', ['scheduling', 'initial cycle time'], ['scheduling', 'initial cycle point'], converter(lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate( '6.0.0', ['scheduling', 'final cycle time'], ['scheduling', 'final cycle point'], converter(lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate( '6.0.0', ['visualization', 'initial cycle time'], ['visualization', 'initial cycle point'], converter(lambda x: x, 'changed naming to reflect non-date-time cycling')) u.deprecate( '6.0.0', ['visualization', 'final cycle time'], ['visualization', 'final cycle point'], converter(lambda x: x, 'changed naming to reflect non-date-time cycling')) u.obsolete('6.0.0', ['scheduling', 'dependencies', '__MANY__', 'daemon']) u.obsolete('6.0.0', ['cylc', 'job submission']) u.obsolete('6.0.0', ['cylc', 'event handler submission']) u.obsolete('6.0.0', ['cylc', 'poll and kill command submission']) u.obsolete('6.0.0', ['cylc', 'lockserver']) u.upgrade() # Force pre cylc-6 "cycling = Yearly" type suites to the explicit # dependency heading form for which backward compatibility is provided: #____________________________ # [scheduling] # cycling = Yearly # [[dependencies]] # [[[2014,2]]] #---------------------------- # Same as (for auto upgrade): #---------------------------- # [scheduling] # [[dependencies]] # [[[Yearly(2014,2)]]] #____________________________ try: old_cycling_mode = cfg['scheduling']['cycling'] except: pass else: if old_cycling_mode in ['Yearly', 'Monthly', 'Daily']: del cfg['scheduling']['cycling'] for old_key, val in cfg['scheduling']['dependencies'].items(): if re.match('\s*\d+,\s*\d+\s*$', old_key): new_key = "%s(%s)" % (old_cycling_mode, old_key) del cfg['scheduling']['dependencies'][old_key] cfg['scheduling']['dependencies'][new_key] = val else: # Could be misspelled new "cycling mode" - leave it to fail. pass