Skip to content
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

[ENH] Rework data upload and some util functions #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

anibalsolon
Copy link
Member

@anibalsolon anibalsolon commented Aug 29, 2022

This PR gives some structure for the cli commands, handling common errors and async/promise instead of callbacks.

For data upload, it uses the commander parsing to verify the arguments.

It solves these two issues + the start for commander upgrade:
#51
https://github.com/brainlife/brainlife/issues/200

@anibalsolon anibalsolon changed the title enh: rework data upload and some util functions [ENH] Rework data upload and some util functions Aug 29, 2022
let program = new commander.Command();
program
.storeOptionsAsProperties(true)
.argument('task-id', 'Id of the task to wait for')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should keep -id --id options to make it backward compatible.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok!

@soichih
Copy link
Contributor

soichih commented Aug 30, 2022

Thanks for the PR @anibalsolon !! Are you going to update other CLIs also? I believe we need to patch all commands since we are upgrading commander?

@anibalsolon
Copy link
Member Author

@soichih Yes! I will work on it

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