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

Have prepare_project exit on old versions of pip #361

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

jeremykubica
Copy link
Collaborator

Change Description

Closes #333. Check the version of pip at the start of .prepare_project.sh and exit if the user is not using at least version 22.

Checklist

  • This PR is meant for the lincc-frameworks/python-project-template repo and not a downstream one instead.
  • This change is linked to an open issue
  • This change includes integration testing, or is small enough to be covered by existing tests

Copy link
Collaborator

@drewoldag drewoldag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ok to me. I was able to test on a WSL system, and if you tested on mac, then we should be good.

Minor point - would it make sense to make the minimum pip version a variable? i.e. MIN_PIP_VERSION = 22? I'm not sure we'll be hunting around for it, but, since this is a user facing script, perhaps the extra clarity would nice.

@drewoldag
Copy link
Collaborator

If you have a moment, it might also be nice to update the getting started page that references the requirements - https://lincc-ppt.readthedocs.io/en/latest/source/overview.html#prerequisites

We call out pipx as an optional tool, we should probably call out pip >= 22 as well.

@jeremykubica
Copy link
Collaborator Author

I made the minimum pip version a variable and added the documentation as suggested. Thanks.

In doing so, I had a question: Does .prepare_project.sh use pipx if that is installed? Would the script still work if there is an old version of pip but a new version of pipx? If so, I can change the script to check for pipx first.

@drewoldag
Copy link
Collaborator

I've already chatted with Jeremy about this, but to answer the question in a more visible space - .prepare_project.sh should just use pip, not pipx. This is because pipx will install the project (and dependencies) such that it becomes available to all virtual environments.

@jeremykubica jeremykubica merged commit 928ca6f into main Feb 1, 2024
16 checks passed
@jeremykubica jeremykubica deleted the issue/333/old_pip_warning branch February 1, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prepare_project.sh fails on older pip versions
2 participants