-
-
Notifications
You must be signed in to change notification settings - Fork 151
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: Add session tags #627
feat: Add session tags #627
Conversation
Looks like a nice start. I haven't verified the behavior yet, but I think it's what we want (any thoughts @wntrblm/nox?). Also, I approved the CI runs to discard any failure. |
This is looking good. Although I've checked out your PR and can't seem to get the desired behaviour: # noxfile.py
@nox.session(tags=["hello"])
def hello(session: nox.Session) -> None:
"""
Does something.
"""
session.log("hello") When I run So not sure what's going on there? It would also be really good to incorporate the tags somehow into the output of |
@FollowTheProcess Thanks for reviewing. I tried it with your example and it's working as expected: $ nox -t hello
nox > Running session hello
nox > Creating virtual environment (virtualenv) using python3.9 in .nox/hello
nox > hello
nox > Session hello was successful.
$ nox -k "hello or other"
nox > Running session hello
nox > Creating virtual environment (virtualenv) using python3.9 in .nox/hello
nox > hello
nox > Session hello was successful.
$ noxpy -k "not hello"
nox > No sessions selected after filtering by keyword. |
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.
Weirdly it worked fine for me after I removed and re-cloned the repo 🤷🏻 so obviously something to do with my laptop and not the code so we're all good there.
Just a few minor changes, otherwise this is looking great
Co-authored-by: Tom Fleet <tomfleet2018@gmail.com>
- Name the functions something completely different from the tags to ensure only tags are being to filter. - Confirm that tags are case-insensitive.
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.
LGTM, thanks @edgarrmondragon 🎉
Thanks @edgarrmondragon! 🎉 |
Closes #339