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

Negate option for projects and tags options in log/report commands #225

Conversation

arnaudcordier
Copy link

Hi,

One use case I usually need in a log or a report is to show all projects but one or two, or frames with all tags but one.

So here is --exclude-tags and --exclude-projects flag option that exclude given tags or projects by --tag or --project options in log and report command.

In order to be able to type:
watson log -Gd -p coding -T personal --exclude-tags
to have log of code activity of the day, but not the personal ones.

boolean flag to filter out frames having same project given by the projects list argument
boolean flag to filter out frames having same tag given by the tags list argument
…command

those flags are used to filter out tags or projects given by --tag ou --project options
…eport command

those flags are used to filter out tags or projects given by --tag ou --project options
for frame in foo_projects:
assert frame.project == 'foo'
len += 1
assert len == 2
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would find the following more readable:

assert all(frame.project == 'foo' for frame in foo_projects)
assert len(foo_projects) == 2

This is true for all the other cases of course :) .

@jmaupetit
Copy link
Contributor

@arnaudcordier is there any chance that you pursue this work or not? The second is perfectly fine if you don't have time for this.

In fact, your work on the report command has already been merged (see #288), but not for the log command.

Anyway, thank you again for this 🙏

@arnaudcordier
Copy link
Author

Hi, sorry I didn't really follow this issue.
Anyway I reworked on it and made a new PR using work that had been done on the project command : #317

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.

4 participants