-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add a "usage" session to nox #2022
Conversation
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.
It's working for me, just one non-blocking question. How closely does this need to match to the output of nox
? When running nox
you get options like pytest_ops(unit)
.
Then nox -s usage -- pytest_ops(unit)
gives missing delimiter for 'u' glob qualifier
and nox -s usage -- "pytest_ops(unit)"
gives Session usage aborted: Sorry, this isn't a valid nox session.
. nox -s pytest_ops
does work.
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.
Everything worked as described. I'm also seeing what Paul mentioned. nox -s usage -- "build(dev)"
is returning
Docker version 20.10.21, build baeda1f
nox > Running session usage
nox > Re-using existing virtual environment at .nox\usage.
nox > Session usage aborted: Sorry, this isn't a valid nox session.
I can see someone trying to test out that style of command. Maybe it would be possible to detect those sub commands and output the usage info for just that one. I agree that this is non blocking though 👍
This is expected behviour, as it is printing the docstring for a single session (which is a function). There aren't separate docstrings for each parameter, so one must use the session name directly without any specific parameters. For instance after I run a |
Closes #1618
Code Changes
nox
that prints the entire docstring for a given sessionSteps to Confirm
Pre-Merge Checklist
All CI Pipelines SucceededNothing here should affect any CI jobs or code logicCHANGELOG.md
Description Of Changes
Using the standard
nox
command to list out all available sessions is nice and all, but it only shows the first line and isn't practical for showing in-depth information. Many session should contain a lot of usage information due to the complexity of the command given and this new session will allow us to do just that.Example
No posargs provided
Invalid session name provided
Valid session provided