Issue
I have a project directory that looks like this
- my_awesome_project (top level folder)
- my_project_folder (generated by django)
- my_project_folder
- manage.py
- .. other app folders
- venv (virtual environment folder)
- my_project_folder (generated by django)
Is this good? I really don't know, and want to hear how other's deal with where their virtual environment folder exists.
I couldn't think of other ways to structure it.
Solution
Short answer is there is no answer. Put it wherever you like.
I do one of 2 things:
- Have it in the project dir
- Have a venv dir under my home somewhere and put them all there.
Both are fine, or elsewhere is also fine.
A couple of caveats:
- Do NOT share venvs between projects - this will lead to headaches when dependencies change.
- If you put your venv within the project dir, add it to your
.gitignore
, becuase you should not be committing it to the repo. There shoule be some form of requirements file which allows it to be rebuilt wherever the project is installed.
And finally - pin as many requirements as you can. Definitely top level dependencies for your project, and potentially all of them using something like pip tools/ pip compile.
Answered By - michjnich
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.