diff --git a/news/config-UX.rst b/news/config-UX.rst new file mode 100644 index 00000000..af826723 --- /dev/null +++ b/news/config-UX.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* additional information to users to relieve frustration in finding how to update global config + +**Security:** + +* diff --git a/src/diffpy/utils/tools.py b/src/diffpy/utils/tools.py index 82cca8c9..7e5e858f 100644 --- a/src/diffpy/utils/tools.py +++ b/src/diffpy/utils/tools.py @@ -83,6 +83,11 @@ def _create_global_config(args): return_bool = False if username is None or email is None else True with open(Path().home() / "diffpyconfig.json", "w") as f: f.write(json.dumps({"username": stringify(username), "email": stringify(email)})) + print( + f"You can manually edit the config file at {Path().home() / 'diffpyconfig.json'} using any text editor.\n" + f"Or you can update the config file by passing new values to get_user_info(), " + f"see examples here: https://www.diffpy.org/diffpy.utils/examples/toolsexample.html" + ) return return_bool