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

Add Requirements component for AppEnv #69

Closed
wants to merge 18 commits into from
Closed

Add Requirements component for AppEnv #69

wants to merge 18 commits into from

Conversation

sweh
Copy link
Contributor

@sweh sweh commented Jun 9, 2020

Hello everybody,

with this PullRequest I'd like to introduce you to a component that I use in conjunction with AppEnv in two larger projects. It is used to store a requirements.lock tailored to the current environment for AppEnv.

You can e.g. hand over a list of development packages that will be installed in editable mode. You can also specify your own download server or Pypi. There is also "global version pinnings" that may be needed in larger projects with multiple AppEnvs.

I would be happy if we could discuss the idea here and maybe come up with a solution that fits into the core of batou.

Stay healthy,
Sebastian

@SoerenWeber
Copy link

I use Sebastian's components in another project as well and I'm quite happy with it. It provides a very simple way to setup a virtualenv that contains only a specified set of dependencies and offers some nice features to manage them. In my case, a small and mostly straight-forward deployment, this was the perfect fit.

Some thoughts that may serve as a discussion catalyst:

  • At the moment, the requirements.lock file is generated automatically and without intervention. I think it might be better to generate this file manually and keep it in source control, as to provide everyone with a well-specified environment. I'm not sure how to accomplish this elegantly, though.
  • I'd like to have a strict mode of the Requirements component that fails if any package doesn't have a pinned version.
  • While AppEnv and the component AppEnv do very similar things, it might be confusing that they are named the same.

@ctheune
Copy link
Collaborator

ctheune commented Jun 25, 2020

Yeah, I have a similar feeling. Generating the lock file this way just doesn't feel natural to me - for the same reasons you're giving.

I'm inclined to reject this PR and open up a ticket where we can discuss things further.

About the other points:

  • I have a 'strict' mode in the separate appenv project which works this way: install the environment, and then verify that all the installed packages are exactly the specified ones. This breaks if you don't pin things. (basically: calls pip freeze and compares that to the lock file)

  • The naming is an "intended happy mistake". We ended up with somewhat separate implementations of the same basic concept. The appenv in batou is now something that emulates/shadows a normal virtualenv, whereas the other one shadows a complete application. I'm open for renaming suggestions, I'm leaning towards renaming the thing that lives in batou.

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.

None yet

3 participants