I tend to put the primary environment just into the Project folder (aftivate .). This way, I always know which primary environment I have associated with the project without the need to remember the path.
It’s also easy to get rid of the project including the environment by just deleting the project folder.
I use a global (standard) environment for utilities.
Is there some benefit to aggregate all project environments in a common directory? I gather, it is easy to create and forget an environment when not having them in the project directory directly.
The reason to have a shared environment is to perform similar analysis of different data sets, without having to setup a new environment for each analysis.
In many other situations having the environment in the current folder is more appropriate.
This is a great help! I feel like I have some meaningful Julia environment understanding! I find myself using @__DIR__ for multiplexing environments, heading scripts with
import Pkg; Pkg.activate("$(@__DIR__)"*"/..")
I like the environments to be 1-1 with the folder or parent folder the script is in.
Wow 1.9 is really great. I know it was a hard one but the “feel” is so much better!
A little nitpick: "$(@__DIR__)" is just a more complicated way to write @__DIR__. Also I would write the whole construction as Pkg.activate(dirname(@__DIR__)).