Skip to content

Commit

Permalink
Update behaviour of shpc config get to only show value of key (#661)
Browse files Browse the repository at this point in the history
* client/config.py: use "Unset" when value is not set
* shpc config get now only prints value of key, similar to shpc view get

Signed-off-by: Marco De La Pierre <[email protected]>
  • Loading branch information
marcodelapierre authored Oct 10, 2023
1 parent d7cec0b commit df6a62c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
The versions coincide with releases on pip. Only major versions will be released as tags on Github.

## [0.0.x](https://github.com/singularityhub/singularity-hpc/tree/main) (0.0.x)
- Change format of config command output to only show setting values, not keys, for parseability (0.1.25)
- Allow custom location for wrapper scripts (0.1.24)
- Labels with newlines need additional parsing (0.1.23)
- Do not write directly to output with shpc show (0.1.22)
Expand Down
5 changes: 3 additions & 2 deletions shpc/client/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ def main(args, parser, extra, subparser):
elif command == "get":
for key in args.params:
value = cli.settings.get(key)
value = "is unset" if value is None else value
logger.info("%s %s" % (key.ljust(30), value))
value = "unset" if value is None else value
# similar to view get in view.py
print(value)

else:
logger.error("%s is not a recognized command." % command)
2 changes: 1 addition & 1 deletion shpc/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__copyright__ = "Copyright 2021-2023, Vanessa Sochat"
__license__ = "MPL 2.0"

__version__ = "0.1.24"
__version__ = "0.1.25"
AUTHOR = "Vanessa Sochat"
EMAIL = "[email protected]"
NAME = "singularity-hpc"
Expand Down

0 comments on commit df6a62c

Please sign in to comment.