reanahub / reana-client

REANA command-line client
http://reana-client.readthedocs.io/
MIT License
10 stars 44 forks source link

cli: implement new share-remove command #681

Open tiborsimko opened 8 months ago

tiborsimko commented 8 months ago

For the workflow sharing sprint, design and implement an initial unshare command allowing to unshare workflow runs with colleagues with whom they previously shared it.

This issue is basically a mirror of #680.

For example, Alice unshares her myanalysis run 42 with Bob:

$ reana-client unshare -w myanalysis.42 --user bob@example.org
myanalysis.42 is now unshared from bob@example.org

Beware of giving nice error messages when asking to unshare with a colleague with whom this analysis run was not shared, and a proper exit status:

$ reana-client unshare -w myanalysis.42 --user bob@example.org
==> ERROR: myanalysis.42 was not shared with bob@example.org previously. 
$ echo $?
1 

Beware of giving nice error messages when users don't exist:

$ reana-client unshare -w myanalysis.42 --user bob@example.org
==> ERROR: The user "bob@example.org" does not exist. 
$ echo $?
2

Note different exit status codes for different kind of error situations.

P.S. This issue depends on reanahub/reana-db#206 and provides a mirror functionality to the share command implemented in #680.