Skip to content

Commit

Permalink
Merge pull request #2102 from oliver-sanders/6.11.x-upgrade-mixed-syntax
Browse files Browse the repository at this point in the history
6.11.x upgrade mixed syntax
  • Loading branch information
hjoliver authored Jan 9, 2017
2 parents 65fef1c + 9df2b89 commit 15c087f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
37 changes: 13 additions & 24 deletions lib/cylc/cfgspec/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,31 +555,27 @@ def upg(cfg, descr):
['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', ['cylc', 'event hooks'], ['cylc', 'events'])
u.deprecate(
'6.11.0',
['runtime', '__MANY__', 'job submission', 'method'],
['runtime', '__MANY__', 'job', 'batch system'])
['runtime', '__MANY__', 'event hooks'],
['runtime', '__MANY__', 'events'])
u.deprecate(
'6.11.0',
['runtime', '__MANY__', 'job submission', 'command template'],
['runtime', '__MANY__', 'job', 'batch submit command template'])
['runtime', '__MANY__', 'job submission'],
['runtime', '__MANY__', 'job'])
u.deprecate(
'6.11.0',
['runtime', '__MANY__', 'job submission', 'shell'],
['runtime', '__MANY__', 'job', 'shell'])
['runtime', '__MANY__', 'job', 'method'],
['runtime', '__MANY__', 'job', 'batch system'])
u.deprecate(
'6.11.0',
['runtime', '__MANY__', 'job', 'command template'],
['runtime', '__MANY__', 'job', 'batch submit command template'])
u.deprecate(
'6.11.0',
['runtime', '__MANY__', 'job submission', 'retry delays'],
['runtime', '__MANY__', 'job', 'retry delays'],
['runtime', '__MANY__', 'job', 'submission retry delays'])
u.deprecate('6.11.0', ['runtime', '__MANY__', 'job submission'])
u.deprecate(
Expand All @@ -595,13 +591,6 @@ def upg(cfg, descr):
['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:
Expand Down
9 changes: 9 additions & 0 deletions lib/parsec/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ def expand(self, upg):
else:
i = -1
nkeys = upg['new']
if nkeys is None: # No new keys defined.
for m in many:
exp_upgs.append({
'old': pre + [m] + post,
'new': None,
'cvt': upg['cvt'],
'silent': upg['silent'],
})
return exp_upgs
npre = []
npost = []
for k in nkeys:
Expand Down

0 comments on commit 15c087f

Please sign in to comment.