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

Allow specifying command-line parameters in noxfile #141

Closed
theacodes opened this issue Sep 21, 2018 · 3 comments
Closed

Allow specifying command-line parameters in noxfile #141

theacodes opened this issue Sep 21, 2018 · 3 comments

Comments

@theacodes
Copy link
Collaborator

Related #133, #40, #135.

Noxfiles should be able to specify some of the command-line args in the noxfile, for example:

import nox

nox.options.envdir = ".cache"
nox.options.sessions = ["tests", "lint"]

...

Command-line args should override these "defaults" in the noxfile.

@moshez
Copy link
Contributor

moshez commented Sep 21, 2018

I'm happy to take this on. I've been looking for an excuse to learn about nox internals for a while :)

@theacodes
Copy link
Collaborator Author

@moshez go for it! holler if you run into any trouble or have any questions.

@theacodes
Copy link
Collaborator Author

The exact list of flags that should be specifiable in the noxfile are:

  --envdir ENVDIR       Directory where nox will store virtualenvs.
  -s [SESSIONS [SESSIONS ...]], -e [SESSIONS [SESSIONS ...]], --sessions [SESSIONS [SESSIONS ...]]
                        Which sessions to run, by default, all sessions will
                        run.
  -k KEYWORDS, --keywords KEYWORDS
                        Only run sessions that match the given expression.
  -r, --reuse-existing-virtualenvs
  -x, --stop-on-first-error
  --error-on-missing-interpreters
  --report REPORT
  --nocolor
  --forcecolor

Basically, everything but --noxfile can be specified in the noxfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants