-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/persist #4
Feat/persist #4
Conversation
arlas/cli/collections.py
Outdated
@@ -13,7 +13,7 @@ | |||
|
|||
@collections.callback() | |||
def configuration(config: str = typer.Option(help="Name of the ARLAS configuration to use from your configuration file ({}).".format(variables["configuration_file"]))): | |||
variables["arlas"] = config | |||
variables["arlas"] = config |
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.
trailing spaces
): | ||
config = variables["arlas"] | ||
id = Service.persistence_add_file(config, Resource(location=file), zone=zone, name=name, readers=reader, encode=encode) | ||
print(id) |
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.
It would be better to add a more meaningful message
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.
actually it is the id to be used for different usages. I thought that if I do not put text around, it would be easier to use in a script (e.g. to get the ID and put it in a different command line). I can add more details, but it will make the work of the developper a bit more complex to extract the id. Your opinion?
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 have it in mind, I think it is a good idea to do it like you proposed, otherwise it would have to be on multiple lines to be able to grab the id from the last line maybe, but it makes things complicated. If other methods are to be integrated in scripts such as this one and they have a more complicated output, a "dev" or "short answer" mode with a flag could maybe allow for a more verbose answer as well as a direct one for scripts
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.
yes this (short answer mode flag) is a good idea. For now, I release.
No description provided.