Skip to content

Conversation

@bxdd
Copy link
Collaborator

@bxdd bxdd commented Nov 11, 2020

Description

fix re about provider_uri & fix 'exit not defined' error in ipython

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@bxdd bxdd requested a review from you-n-g November 11, 2020 13:11
qlib/config.py Outdated
# Windows path is "C:\\"
if rm is None or Path(self["provider_uri"]).exists():
return QlibConfig.LOCAL_URI
if win_rm is None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic could be simpler

win = re.match("^[a-zA-Z]:.*", self["provider_uri"]) is not None  # such as 'C:\\data', 'D:'
nfs_or_win = re.match("^[^/]+:.+", self["provider_uri"]) is not None  # such as 'host:/data/'   (User may define short hostname by themselves)

if nfs_or_win and not win:
     return QlibConfig.NFS_URI
else:
     return QlibConfig.LOCAL_URI

@bxdd bxdd requested a review from you-n-g November 11, 2020 14:23
@you-n-g you-n-g closed this Nov 12, 2020
@bxdd bxdd reopened this Nov 12, 2020
@you-n-g you-n-g merged commit 16f2b5d into microsoft:main Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants