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

cli: implement filtering by status and search by name #428

Merged
merged 1 commit into from
Oct 15, 2020
Merged

cli: implement filtering by status and search by name #428

merged 1 commit into from
Oct 15, 2020

Conversation

ParthS007
Copy link
Member

closes #427

@ParthS007 ParthS007 self-assigned this Oct 5, 2020
@ParthS007 ParthS007 requested a review from mvidalgarcia October 9, 2020 10:01
Copy link
Member

@mvidalgarcia mvidalgarcia left a comment

Choose a reason for hiding this comment

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

I think there was a misunderstanding with the issue description and I'm sorry about that. The idea behind the issue was making use of the recently added args in reana-server. In other words, passing these args (search and status) directly in this call so the server does the heavy lifting. @tiborsimko Did you understand the same? Probably the issue wasn't well enough explained...

@tiborsimko
Copy link
Member

Yes, I understand it the same, but there were two things, actually: (1) adding new filters and (2) amending old format/filter convention to standardise across various r-client commands... So both parts need to be addressed...

Copy link
Member

@mvidalgarcia mvidalgarcia left a comment

Choose a reason for hiding this comment

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

I get this:

$ reana-client list
Workflow list could not be retrieved: 
local variable 'status_filter' referenced before assignment

Do you get the same?

PS. It seems you need to rebase on top of the latest master.

@ParthS007
Copy link
Member Author

@mvidalgarcia Can you please try now, I rebased it.

@mvidalgarcia mvidalgarcia self-requested a review October 13, 2020 15:57
Copy link
Member

@mvidalgarcia mvidalgarcia left a comment

Choose a reason for hiding this comment

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

A)
Can you reproduce this?

$ reana-client list
NAME           RUN_NUMBER   CREATED               STARTED               ENDED                 STATUS  
roofit-fail    1            2020-10-14T10:42:20   2020-10-14T10:42:21   2020-10-14T10:42:38   failed  
roo            1            2020-10-14T10:23:06   2020-10-14T10:23:06   2020-10-14T10:23:30   finished
root6-roofit   1            2020-10-14T10:22:48   2020-10-14T10:22:49   2020-10-14T10:23:13   finished
$ reana-client list --format status=failed,name=test_workflow  
Workflow list could not be retrieved: 
list.remove(x): x not in list
$ reana-client list --format status=failed,name=roofit-fail  
Workflow list could not be retrieved: 
list.remove(x): x not in list

I might only happen when there are failed workflows (?)

B)
I see that we have --format for listing workflow files, could we amend the variable name to be consistent, i.e. name it _format?

reana_client/cli/workflow.py Outdated Show resolved Hide resolved
reana_client/cli/workflow.py Outdated Show resolved Hide resolved
reana_client/cli/workflow.py Outdated Show resolved Hide resolved
reana_client/cli/workflow.py Outdated Show resolved Hide resolved
reana_client/cli/utils.py Outdated Show resolved Hide resolved
Copy link
Member

@mvidalgarcia mvidalgarcia left a comment

Choose a reason for hiding this comment

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

A couple of more comments, it's looking great 🚀

reana_client/cli/utils.py Outdated Show resolved Hide resolved
reana_client/cli/utils.py Outdated Show resolved Hide resolved
@ParthS007
Copy link
Member Author

A)
Can you reproduce this?

$ reana-client list
NAME           RUN_NUMBER   CREATED               STARTED               ENDED                 STATUS  
roofit-fail    1            2020-10-14T10:42:20   2020-10-14T10:42:21   2020-10-14T10:42:38   failed  
roo            1            2020-10-14T10:23:06   2020-10-14T10:23:06   2020-10-14T10:23:30   finished
root6-roofit   1            2020-10-14T10:22:48   2020-10-14T10:22:49   2020-10-14T10:23:13   finished
$ reana-client list --format status=failed,name=test_workflow  
Workflow list could not be retrieved: 
list.remove(x): x not in list
$ reana-client list --format status=failed,name=roofit-fail  
Workflow list could not be retrieved: 
list.remove(x): x not in list

I might only happen when there are failed workflows (?)

B)
I see that we have --format for listing workflow files, could we amend the variable name to be consistent, i.e. name it _format?

@mvidalgarcia

A ) Yes, It is happening for me as well, I can work on it to fix this in a different issue.

B ) Done 👍

reana_client/config.py Outdated Show resolved Hide resolved
@ParthS007 ParthS007 requested a review from audrium October 15, 2020 10:05
Added test for testing workflow search with filter
closes #427
Copy link
Member

@mvidalgarcia mvidalgarcia left a comment

Choose a reason for hiding this comment

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

🎸!

@mvidalgarcia mvidalgarcia merged commit 8c0c15d into reanahub:master Oct 15, 2020
@ParthS007 ParthS007 deleted the list branch October 15, 2020 15:09
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.

cli: implement filtering by status and search by name
4 participants