Open vlcinsky opened 6 years ago
thanks @vlcinsky this is really useful. When this plugin was started running pipenv within a virtual environment wasn't allowed and pipenv would exit. The last version (1.5.) will execute pipenv graph instead of pip freeze to show you the actual packages and the expected dependencies which I hope other users will find useful.
And to be frank I'm still trying to figure out how these tools should interact and I'm not the only one!
This is a great start, I'll these to the README
Even though there is an issue #7 (Add example into readme), I feel, there are some open questions which is good to have clarified before writing any sort of documentation.
Namely:
How to install
Probably into system python or into the same virtualenv, where is tox installed.
Is
pipsi tox-pipenv
sufficient?Initiate
Pipfile
andPipfile.lock
Is user expected to create
Pipfile
andPipfile.lock
before creating and usingtox.ini
?Probably yes.
Putting files under source control
Is
Pipfile.lock
expected to be under source control? According topipenv
docPipfile.lock
is not recommended under source control if it is going to be used under multiple Python versions.Role of
requirements.txt
fileOften,
tox
users userequirements.txt
which is then referenced from withintox.ini
file as deps.Is this expected usage?
Caveat: if the
requirements.txt
file is created before firstpipenv
usage, it will be automatically used. It may surprise some users.Is
tox.ini
deps
section really in control?It seems to me, that with
tox-pipenv
thePipfile
is always used for any of created virtualenvs and it includes the--dev
dependencies..This sounds contradicting "explicit is better than implicit".
I would prefer similar usage to existing
-rrequirements.txt
indeps
section where I could explicitly require certain dependencies. Alternatively a directive such asinstallfrompipfile
which would take any of options forpipenv install
e.g. nothing (to install all except--dev
),--dev
to install all incl.--dev
), or explicit package names (so we need a list value).Take into account, that
tox.ini
is often used for multiple purposes:--dev
section ofPipfile
are good fitAre we installing into
tox
managed venvs or intopipenv
one?pipenv
allows installing packages into it's own virtualenv. But if there is an activated one, it installs into the activated one.I feel, we shall install into the
tox
created virtualenv.To me it seems (after quick test) that it installs into it's own
pipenv
virtualenv located in.venv
directory. This prevents development scenario, wheretox
is used to create multiple virtualenvs and developer can easily switch from one to another without recreating them.Do we really need special
tox-pipenv
plugin?Sorry for this stupid question.
After elaborating the previous conceptual question I have found alternative method for coexistence of
tox.ini
andPipfile.*
:Simply add into
commands
section thepipenv install --dev
orpipenv instal jinja2
or whatever. As it runs under activated virtual environment it prints out:Conclusions?
We are still in search of proper
tox
andpipenv
usage aspipenv
is still very fresh. I appreciate the effort put into integratingtox
andpipenv
astox
is really my very favourite tool. Please, read my comments as contribution to the discussion, not as disregarding your effort.