Skip to content

Commit 77c0b9e

Browse files
authored
Merge pull request #208 from alisnwu/config-UX
More info on updating global config for users
2 parents 77b884c + 74a740a commit 77c0b9e

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

Diff for: news/config-UX.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
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+
* additional information to users to relieve frustration in finding how to update global config
20+
21+
**Security:**
22+
23+
* <news item>

Diff for: src/diffpy/utils/tools.py

+5
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ 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"
90+
)
8691
return return_bool
8792

8893

0 commit comments

Comments
 (0)