Skip to content

Commit 2732b49

Browse files
Alison WuAlison Wu
authored andcommitted
edited get user prompt
1 parent 4bb5ecf commit 2732b49

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/diffpy/utils/tools.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import importlib.metadata
22
import json
33
import os
4-
import warnings
54
from copy import copy
65
from pathlib import Path
76

@@ -78,11 +77,11 @@ def _sorted_merge(*dicts):
7877

7978
def _create_global_config(args):
8079
username = input(
81-
f"Please enter the name of the user to put in the diffpy global config file "
80+
f"Please enter the name of the user would want future work to be credited to "
8281
f"[{args.get('username', '')}]: "
8382
).strip() or args.get("username", "")
8483
email = input(
85-
f"Please enter the email of the user to put in the diffpy global config file "
84+
f"Please enter the email of the user "
8685
f"[{args.get('email', '')}]: "
8786
).strip() or args.get("email", "")
8887
return_bool = False if username is None or email is None else True
@@ -115,9 +114,8 @@ def get_user_info(args=None):
115114
global_config = load_config(Path().home() / "diffpyconfig.json")
116115
local_config = load_config(Path().cwd() / "diffpyconfig.json")
117116
if global_config is None and local_config is None:
118-
warnings.warn(
117+
print(
119118
"No global config file, please follow prompts below. "
120-
"The global config file is very important in crediting your work in the future. "
121119
"For more information, please refer to www.diffpy.org/diffpy.utils/examples/toolsexample.html"
122120
)
123121
config_bool = _create_global_config(args)

0 commit comments

Comments
 (0)