Skip to content

Commit a6ddd5b

Browse files
Alison WuAlison Wu
authored andcommitted
more info on global config for users
1 parent d8d7fb3 commit a6ddd5b

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

news/config-UX.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* additional information to users to relieve frustration in finding how to update global config
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

src/diffpy/utils/tools.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ def _create_global_config(args):
8383
return_bool = False if username is None or email is None else True
8484
with open(Path().home() / "diffpyconfig.json", "w") as f:
8585
f.write(json.dumps({"username": stringify(username), "email": stringify(email)}))
86+
print(
87+
f"You can manually edit the config file at {Path().home() / 'diffpyconfig.json'} using any text editor.\n"
88+
f"Or you can update the config file by passing new values to get_user_info(), "
89+
f"see examples here: https://www.diffpy.org/diffpy.utils/examples/toolsexample.html")
8690
return return_bool
8791

8892

0 commit comments

Comments
 (0)