-
Notifications
You must be signed in to change notification settings - Fork 7
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
Investigate pipenv #31
base: master
Are you sure you want to change the base?
Conversation
Pipfile/Pipfile.lock generated strictly from ``` pipenv install -r requirements.txt ```
Would also encourage you to look at anaconda environments. Many of the same benefits without the drawbacks. |
@pmolfese - What drawbacks are you thinking of? |
@ianbrown9475 - on a topical level - I'm liking this as it brings in the only thing I was really using Anaconda for (the management of virtual environments). Frankly - I also really like the potential of automating the inclusion of any outstanding issues arising from dependencies on external packages in our regulatory documentation as we go through development. For next stages, let's bring this up at the conversation we have planned for 2020.04.29 within the active BEL developers. If the core development team is in general agreement - we can come up with a roadmap to bringing the Python projects into alignment - and that can start with a cleanup of MFFpy in that regard. @mscf, @damian5710, and @ephathaway, as our other primary Python developers, I encourage you to look over this and see if you have any strong feelings for or against what Ian's presenting here. |
I think this tool looks interesting. @ianbrown9475 , do you know how stable it is? If it is stable enough maybe we could give it a chance. |
@damian5710 the project seems to get new commits fairly often. It's been a while since the last release (November 2018), but it looks like the next release will be out within a few days/weeks (see issue 3369). I can't speak too much on the stability of the tool since I've only been using it for about 6 months, meaning I've only ever used one version of it. There's a short section about stability here. The rest of the article has some good criticisms of pipenv, although I do have a few comments about it:
Good call asking about the stability! I hadn't looked into this too much before but it's absolutely something we should consider. |
@ianbrown9475, I think you should go ahead and make the request. Before, it would be great to modify the install/build instructions in the README section. Can you also update the NumPy dependency to v1.17.1? We seem to be using that one now in many other repositories. |
I don't think we should merge this at the moment. Since my initial look, pipenv has had some new releases and I've also heard more anecdotes about poetry being a better option, mainly due to making it easy to publish packages and having more features. I've also seen other anecdotes of individuals deciding to overhaul their organizations' repos to all use pipenv and eventually running into problems causing them to revert. This is a big decision and we should carefully think this through and definitely compare other options like poetry. We should come back to this when we have time, maybe next sprint. |
Also fine with me :) |
I've added a simple Pipfile and Pipfile.lock for demonstration purposes. Here's what I've found so far
package.json
, you can specify if packages are required for production, or if they're just intended for development. This is especially nice for automated deployments, since installation time can be cut way down if things like mypy and pytest aren't required in a production environment.pipenv install
is ran. It requires a version of Python to be installed locally matching the required version in the Pipfile if one is specified.pipenv install --python [version or path of python executable]
. This is useful if you need to test different Python versions, or if you want to run it and feel confident that you have a version of python that should work for your purposes. It will warn you if the Pipfile specifies a different version. You can also dopipenv install [--two | --three]
to use the locally installed Python 2/3 executables respectively.~/.local/share/virtualenvs/[dirname]-[generated ID]
by default. You can print the location of the currently installed virtualenv withpipenv --venv
.pipenv --rm
.npm audit
, pipenv can check for vulnerabilities in existing dependencies withpipenv check
. For example, here is the current output of this:@ViridianForge what are your thoughts/questions? If this is all looking good, I think the next steps would be to turn this draft into an actual PR that migrates from conda + pip to pipenv.