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

Remove `Pipfile.lock` from repository #138

Closed
vlcinsky opened this issue Apr 2, 2018 · 0 comments

Comments

@vlcinsky
Copy link
Contributor

@vlcinsky vlcinsky commented Apr 2, 2018

pipenv docs states in General Recommendations & Version Control:

Do not keep Pipfile.lock in version control if multiple versions of Python are being targeted.

As maya is python library targeting multiple python versions, we should follow this advice.

Reasoning

Researching this topic, I would summarize the reasoning as follows:

  • maya is python package targeting multiple OSes and different python interpreter versions.
  • Pipfile.lock reflects frozen set of dependent package versions created for given creation context (OS, python version...)
  • Such Pipfile.lock may be simply broken for different context. As it does not contain markers, it is not usable for alternative contexts.
  • The only source of truth for dependent packages (in case of a library) can be just Pipfile, which is likely to be projected into requirements within setup.py (or within requirements.txt if one is using a solution such as pbr).
  • The Pipfile shall provide be strict enough in all cases where we know, things must be that way, but in all other cases it shall allow some degree of freedom. This allows to make the package well behaving in context of other packages (imagine a project, where two different python packages would prescribe exact package version for all dependency and some would be conflicting).

Things to do

If removal of Pipfile.lock is accepted, we should:

  • remove the Pipfile.lock from repository
  • add Pipfile.lock into .gitignore
  • modify tox.ini not to rely on Pipfile.lock, so the line 7 in tox.ini shall read pipenv install --dev --skip-lock
vlcinsky added a commit to vlcinsky/maya that referenced this issue Apr 2, 2018
timofurrer added a commit that referenced this issue Apr 3, 2018
Get rid of Pipfile.lock (issue #138)
@timofurrer timofurrer closed this Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.