Skip to content

Commit df6a62c

Browse files
Update behaviour of shpc config get to only show value of key (#661)
* 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]>
1 parent d7cec0b commit df6a62c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
1414
The versions coincide with releases on pip. Only major versions will be released as tags on Github.
1515

1616
## [0.0.x](https://github.com/singularityhub/singularity-hpc/tree/main) (0.0.x)
17+
- Change format of config command output to only show setting values, not keys, for parseability (0.1.25)
1718
- Allow custom location for wrapper scripts (0.1.24)
1819
- Labels with newlines need additional parsing (0.1.23)
1920
- Do not write directly to output with shpc show (0.1.22)

shpc/client/config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ def main(args, parser, extra, subparser):
4747
elif command == "get":
4848
for key in args.params:
4949
value = cli.settings.get(key)
50-
value = "is unset" if value is None else value
51-
logger.info("%s %s" % (key.ljust(30), value))
50+
value = "unset" if value is None else value
51+
# similar to view get in view.py
52+
print(value)
5253

5354
else:
5455
logger.error("%s is not a recognized command." % command)

shpc/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
__copyright__ = "Copyright 2021-2023, Vanessa Sochat"
33
__license__ = "MPL 2.0"
44

5-
__version__ = "0.1.24"
5+
__version__ = "0.1.25"
66
AUTHOR = "Vanessa Sochat"
77
88
NAME = "singularity-hpc"

0 commit comments

Comments
 (0)