-
Notifications
You must be signed in to change notification settings - Fork 91
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
Where nox should be installed #109
Comments
The pip command installs Nox globally, into a user-specific directory. Poetry’s virtual environment for your project is not activated in a normal shell. You use the poetry commands to modify it. |
Thank you for responding so quickly. I have some questions, I use |
Without seeing your project, two things come to mind. The first is to re-use the virtualenv by passing --reuse-existing-virtualenvs to Nox. While The second idea is a little more subtle. Do you use the |
Can You explain to me a little better what you do inside your sessions. You create in each run of your session the file requirements.txt and then install with pip -r? or do you create it once with poetry and then use it every session, and update it every time you install new modules? PD: You were right in the second assumption, I use
|
The requirements.txt file is generated every time the session is run. It is not installed with Note that pylint and the plugins are also installed in the Poetry environment. So if you just need to quickly lint some files, you can always A third option is to run pylint via pre-commit. This will check files staged for a commit, and only perform installs the first time the check runs. |
Piggybacking off of this to ask some questions as well. First, thank you very much @cjolowicz for your series of blog posts! They were super enlightening for me. A recurring issue I'm having with those Nox sessions is that for the sessions you advised using Have you encountered this issue yourself, and if so how what guidance would you have to deal with it? |
@wanderrful This is a known issue. Please see #111 (which has further links). |
In the second chapter of Hypermodern Python you use
pip install --user --upgrade nox
to install nox did you do this inside the virtualenvironment created by poetry? OR youdeactivate
the virtualenvironment and install globally nox?If you did it inside poetry virtualenvironment you use pip instead of poetry so that it doesn't stay in the pyptoject.toml packages?
The text was updated successfully, but these errors were encountered: