Skip to content

Commit

Permalink
Merge pull request #124 from FAIRDataPipeline/hotfix/orcid-url-or-idonly
Browse files Browse the repository at this point in the history
Update message for ID type query
  • Loading branch information
kzscisoft committed Nov 18, 2021
2 parents cd399e3 + d21769b commit 7349d22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fair/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def _get_user_info_and_namespaces() -> typing.Dict[str, typing.Dict]:
_invalid_input = True

while _invalid_input:
_id_type = click.prompt("Use ID (ORCID/ROR/GRID)", default="None")
_id_type = click.prompt("User ID system (ORCID/ROR/GRID/None)", default="None")

if _id_type.upper() == "ORCID":
_user_orcid = click.prompt("ORCID")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_user_info(mocker: pytest_mock.MockerFixture):
"Full Name": "Joseph Bloggs",
"Default input namespace": _namepaces['input'],
"Default output namespace": _namepaces['output'],
"Use ID (ORCID/ROR/GRID)": "None"
"User ID system (ORCID/ROR/GRID/None)": "None"
}

_orcid_override = {
Expand All @@ -126,7 +126,7 @@ def test_user_info(mocker: pytest_mock.MockerFixture):
mocker.patch('uuid.uuid4', lambda: _uuid_override['uuid'])
_noorc = fdp_conf._get_user_info_and_namespaces()

_override["Use ID (ORCID/ROR/GRID)"] = "ORCID"
_override["User ID system (ORCID/ROR/GRID/None)"] = "ORCID"
_override["ORCID"] = "0000-0000-0000"

mocker.patch('click.prompt', lambda x, default=None: _override[x] or default)
Expand Down

0 comments on commit 7349d22

Please sign in to comment.