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

Move the Pipfile/Pipfile.lock fixtures to a clearly named folder #7700

Merged

Conversation

jeffwidman
Copy link
Member

@jeffwidman jeffwidman commented Aug 2, 2023

This does two things:

  1. Moves the files in the lockfiles directory to the pipfile_files directory.
  2. Moves the files in the pipfiles directory to the pipfile_files directory.

All the files in lockfiles are actually specific to pipenv and their pipfile.lock file format. So I was a bit surprised because poetry also has a lockfile format... why aren't those also in the lockfiles directory? But instead those are over in pyproject_locks dir (which is actually much more convenient for navigating the fixtures!).

I think what happened is that when pipenv popularized the Pipfile/Pipfile.lock format, there was a lot of initial excitement that it might become the lockfile format within Python. So Grey may have called it lockfile assuming that other tooling would start to migrate towards this. However, pipenv made some design choices that made it a "fails-to-take-over-the-world-because-it-tries-to-do-too-much" type of tool.

At first I started by merely renaming the folder from lockfiles to pipfile_lockfiles.

However, while I was working regenerating the pipfile.lock files (#7697) I found it a royal pain to jump back and forth between two folders where one holds the input Pipfile and the other holds the output Pipfile.lock files. And the lockfiles already have a .lock suffix. So instead merging them into a single folder makes it easier to spot when a file should be regenerated into a lockfile vs when it'll fail to even generate a lockfile.

So this hopefully makes things a lot clearer / less ambiguous for anyone working on this section of code.

This does two things:
1. Moves the files in the `lockfiles` directory to the `pipfile_files` directory.
2. Moves the files in the `pipfiles` directory to the `pipfile_files`
   directory.

All the files in `lockfiles` are actually specific to `pipenv` and their
`pipfile.lock` file format. So I was a bit surprised because `poetry`
also has a lockfile format... but those are over in `pyproject_locks`
dir.

I think what happened is that when `pipenv` popularized the
`Pipfile`/`Pipfile.lock` format, there was a lot of initial excitement
that it might become _the_ lockfile format within Python. So Grey may
have called it `lockfile` assuming that other tooling would start to
migrate towards this. However, `pipenv` made some design choices that
made it a ["fails-to-take-over-the-world-because-it-tries-to-do-too-much"](https://hynek.me/articles/python-app-deps-2018/) type of
tool.

At first I started by merely renaming the folder from `lockfiles` to
`pipfile_lockfiles`.

However, while I was working regenerating the `pipfile.lock` files
(#7697) I found it a
royal pain to jump back and forth between two folders where one holds the
input `Pipfile` and the other holds the output `Pipfile.lock` files. And
the lockfiles already have a `.lock` suffix. So instead merging them
into a single folder makes it easier to spot when a file should be
regenerated into a lockfile vs when it'll fail to even generate a
lockfile.

So this hopefully makes things a lot clearer / less ambiguous for anyone
working on this section of code.
@jeffwidman jeffwidman requested a review from a team as a code owner August 2, 2023 22:21
@jeffwidman jeffwidman merged commit 6edb248 into main Aug 2, 2023
@jeffwidman jeffwidman deleted the move-pipfiles-pipfile-lockfiles-to-clearly-named-folder branch August 2, 2023 22:53
@jeffwidman jeffwidman added L: elixir:hex Elixir packages via hex Ecosystems Used by the maintainer team for internal-facing project tracking and removed L: python labels Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ecosystems Used by the maintainer team for internal-facing project tracking L: elixir:hex Elixir packages via hex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants