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

New terra pipenv environment pattern #136

Open
andyneff opened this issue Jun 29, 2022 · 0 comments
Open

New terra pipenv environment pattern #136

andyneff opened this issue Jun 29, 2022 · 0 comments

Comments

@andyneff
Copy link
Member

Currently, all terra apps use terra's Pipfile for the terra environment.

Unfortunately the move of pipenv to drop markered packages that are not being used by the currently locking python is causing a ripple affect, that is starting to be noticed as we upgrade some of our pythons.

  • We already knew we could no longer rely on pipenv for cross platform package tracking.
  • This is also limiting our ability to support different versions of python.

To combat this problem and handle other situations, a method of maintaining a terra Pipfile.lock in the project rather than in the external terra is proposed:

  • Start off by copying the external/terra/Pipfile to terra_env/Pipfile.
  • The Terra_Pipenv function can be part of this process, checking if the file is different every time you run Terra_Pipenv, and either tell the user it's out of date, or start an update process
  • This means each terra app can lock to a specific version of python, rather than leaving it in a lose range of support, like terra is.
  • Allows a specific project to use specific versions of packages it may require.
  • If the CLI/workflow/service definition ever needed a third party package, this can be supported (where as now, it cannot without using PYTHONPATH.)
andyneff added a commit that referenced this issue Jun 29, 2022
- If there is no pipenv on terra sync, then terra setup is called
- Upped the default PYTHON_VERSION as a temporary workaround for #136
- Added PIPENV_PYTHON support to Terra_Pipenv so that the right python
  is used when creating a virtualenv

Signed-off-by: Andy Neff <andy@visionsystemsinc.com>
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

No branches or pull requests

1 participant