-
Notifications
You must be signed in to change notification settings - Fork 117
[feat] Add a tool to convert from the old to the new configuration syntax #1186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
a0cf25b
Add tool that converts the old configuration to json object
ekouts eb31343
Minor fixes
ekouts 09cf1a2
Fix boolean values
ekouts 666790d
Change interface of the tool
ekouts 6815be5
Change json dump function
ekouts e0cc3b5
Fix PEP8 issues
ekouts 381895e
Address PR comments
ekouts 5f2aea3
Add printing function for the configuration
ekouts 76fcedd
Fix typo in formatting function
ekouts 97f8fe0
Fix formatting issues
ekouts 4a46f46
Fixes in the formatting function
ekouts de05bbc
Merge branch 'master' of https://github.com/eth-cscs/reframe into fea…
ekouts 4907255
Add a stand-alone tool for converting configuration files
4e926e4
Add copyright notice
74ce4d7
Validate the converted configuration file
879a7ce
Fix ppretty
ekouts ece4731
Merge branch 'feat/json-config-tool' of https://github.com/ekouts/ref…
ekouts 9e634ce
Fix convert_old_config
ekouts 41b7ef2
Add unittests for ppretty
ekouts a421414
Fix ppretty docstring
ekouts 1dbbb5f
Add more unittests for ppretty
ekouts d2bd624
Minor fixes in config.py
ekouts 22e3490
Add nested dictionary and custom repr unittests
ekouts 74a5efc
Fix unittest for class pprint
ekouts a212600
Merge branch 'master' into feat/json-config-tool
7599c24
Always install ReFrame's requirements in CI
540bf56
Merge branch 'master' into feat/json-config-tool
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,32 @@ | ||
| # Copyright 2016-2020 Swiss National Supercomputing Centre (CSCS/ETH Zurich) | ||
| # ReFrame Project Developers. See the top-level LICENSE file for details. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| import os | ||
| import sys | ||
|
|
||
| sys.path.append(os.path.join(os.path.dirname(__file__), '..')) | ||
|
|
||
| import reframe.core.config as config # noqa: F401, F403 | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| try: | ||
| old_config = sys.argv[1] | ||
| except IndexError: | ||
| print(f'{sys.argv[0]}: too few arguments', file=sys.stderr) | ||
| print(f'Usage: {sys.argv[0]} OLD_CONFIG_FILE', file=sys.stderr) | ||
| sys.exit(1) | ||
|
|
||
| try: | ||
| new_config = config.convert_old_config(old_config) | ||
| except Exception as e: | ||
| print(f'{sys.argv[0]}: could not convert file: {e}', | ||
| file=sys.stderr) | ||
| sys.exit(1) | ||
|
|
||
| print( | ||
| f"Conversion successful! " | ||
| f"Please find the converted file at '{new_config}'." | ||
| ) |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.