Skip to content

More info on updating global config for users #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions news/config-UX.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* additional information to users to relieve frustration in finding how to update global config

**Security:**

* <news item>
5 changes: 5 additions & 0 deletions src/diffpy/utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Loading