-
Notifications
You must be signed in to change notification settings - Fork 50
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
Make command orion db setup
ask for right arguments based on storage backend.
#586
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
548ba2e
Update command prompt `orion db setup` to ask for correct arguments d…
notoraptor f77d186
Add and update testing.
notoraptor 36c6179
Trigger CI
notoraptor 3c71625
Apply isort to code.
notoraptor 1433ae7
Fix documentation syntax.
notoraptor 081d352
Sort databae arguments.
notoraptor 87dd217
Test if command prompt correctly loops when invalid database type is …
notoraptor 78dc86e
Extend utils function `ask_question` with 2 arguments `choice` (optio…
notoraptor 118fe7b
Rename `AbstractDB` method `get_arguments()` to `get_defaults()`.
notoraptor 29f41e4
Make `ask_question()` display available choice when unexpected value …
notoraptor c6d0b09
Check if ask_question prints messsage for unexpected input when an in…
notoraptor 1e2a4a2
Set database host and name from get_defaults() in __init__() if passe…
notoraptor af6b9cf
Fix code format.
notoraptor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could rename this
defaults
instead and use it inside__init__
to make sure the defaults are coherent. Otherwise we are starting to duplicate the defaults and they may diverge. (defaults here vs defaults in orion.config.storage.database)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't understand here, what should be renamed to
defaults
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, the name of the class method,
get_defaults
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok ! Renamed
get_arguments()
toget_defaults()
(in derived classes, too).How should I use it inside
__init__
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inside the init, if a value is set to None or is an empty string, replace with value in
get_defaults
. Also you will need to use the default values as currently set in config here: https://github.com/Epistimio/orion/blob/develop/src/orion/core/__init__.py#L91. This way we harmonize the defaults.See @abergeron 's PR for the defaults on PickledDB: https://github.com/Epistimio/orion/pull/585/files#diff-f4fa1b61f95de078bc5673f3d914867b67cef706344b651be8ee5cbeb2d17ad7R102
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok ! Done !