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

Check virtual environment is active #400

Merged
merged 4 commits into from
Feb 8, 2024
Merged

Check virtual environment is active #400

merged 4 commits into from
Feb 8, 2024

Conversation

hombit
Copy link
Contributor

@hombit hombit commented Feb 7, 2024

Change Description

This PR should prevent user from installing stuff into their global Python paths. It does it in two ways:

  1. Adds a note about this in both Readme and copier output
  2. Checks if conda or venv is active in .prepare_project.sh. It also changes pip to python -m pip to be sure that pip from virtual environment is used, not the global one.

Fixes #399

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

@hombit hombit requested a review from drewoldag February 7, 2024 19:20
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
hombit and others added 2 commits February 7, 2024 17:42
Co-authored-by: Drew Oldag <[email protected]>
Co-authored-by: Drew Oldag <[email protected]>
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.

Thanks for already addressing the naming suggestions. I've left one final comment/concern about the conditional check in .prepare_project.sh. Once I get your feedback on that, then I'm happy to give this the ✔️

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.

Cool, this looks good to me. Thanks for making the changes!

@hombit hombit merged commit 369b30b into main Feb 8, 2024
13 checks passed
@hombit hombit deleted the ask-to-create-venv branch February 8, 2024 18:15
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.

Verify user has virtual environment activated in .prepare_project.sh
2 participants