mlhubber / mlhub

Machine Learning Model Repository Hub Command Line Tool.
MIT License
20 stars 12 forks source link

CONFIGURE with private key display current #246

Closed gjwgit closed 3 years ago

gjwgit commented 3 years ago

The new CONFIGURE functionality for handling private: keys asks, if private.json exists, if we want to load that one.

The following file has been found and is assumed to
contain the private information.

    /home/gjw/.mlhub/azspeech/private.json

Use this private information (type 'n' to update) [Y/n]? 

Add another option, d to display the current contents and then ask the same question again.

The following file has been found and is assumed to
contain the private information.

    /home/gjw/.mlhub/azspeech/private.json

Use this private information ('d' to display, 'n' to update) [Y/d/n]? d

{"Azure Speech": 
  {"key": "c49eff13ddbc356fe2d6789ace1901", 
   "location": "westus"
}}

Use this private information ('d' to display, 'n' to update) [Y/d/n]? Y
JingjingShii commented 3 years ago

For the second question, I plan to set two options (Y/n). Users are not able to press 'd' if they have already pressed 'd' in the first question.

The following file has been found and is assumed to
contain the private information.

    /home/gjw/.mlhub/azspeech/private.json

Use this private information ('d' to display, 'n' to update) [Y/d/n]? d

{"Azure Speech": 
  {"key": "c49eff13ddbc356fe2d6789ace1901", 
   "location": "westus"
}}

Use this private information ( 'n' to update) [Y/n]? Y