-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a241feb
commit dcefeb2
Showing
3 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from .bout_v6_input_file_upgrader import run_general, add_parser_general | ||
|
||
# This should be a list of dicts, each containing "old", "new" and optionally "new_values". | ||
# The values of "old"/"new" keys should be the old/new names of input file values or | ||
# sections. The value of "new_values" is a dict containing replacements for values of the | ||
# option. "old_type" optionally specifies the type of the old value of the option; for | ||
# example this is needed for special handling of boolean values. | ||
REPLACEMENTS = [ | ||
{"old": "timestep", "new": "solver:output_step"}, | ||
{"old": "nout", "new": "solver:nout"}, | ||
{"old": "grid", "new": "mesh:file"}, | ||
] | ||
|
||
DELETED = [] | ||
|
||
|
||
def run(args): | ||
return run_general(REPLACEMENTS, DELETED, args) | ||
|
||
|
||
def add_parser(subcommand, default_args, files_args): | ||
return add_parser_general(subcommand, default_args, files_args, run) |