1. Primers
  2. Julia – Environments – Global vs project
  • (Just enough) Julia for scientific informatics, modeling, and reasoning
  • Introduction
  • Basic frameworks and mechanisms
    • Orientation
    • Basics of setting up and running Julia
    • Basics of visualizing mathematical models
    • Basics of working with randomness and probabilities
    • Basics of working with data tables
  • Basics of specialized workflows
    • Basics of paleobiological fossil collection analyses
    • Basics of agent-based modeling: spatial epidemic dynamics with Agents.jl
      • Basics of agent-based modeling: spatial epidemic dynamics with Agents.jl
    • Basics of species distribution modeling
  • Primers
    • Bernoulli trial
    • Pathogen fitness as a function of virulence (Frank, 1996)
    • Virulence-transmission trade-off (Frank, 1996)
    • Julia – Environments – Global vs project
    • Julia: Functions, methods, and signatures
    • Markov property
    • Probabilty distributions–Essential concepts
    • Pseudo-random number generators
    • Pseudo-random number generators: best practices
    • Pseudo-random number generators: continuous values from discrete machines
  1. Primers
  2. Julia – Environments – Global vs project

Julia – Environments – Global vs project

Author

Jeet Sukumaran

Global installs are convenient, with packages available to any Julia program you run. Some workflows benefit from a “heavy” global environment with most common packages installed there DataFrames.jl, CSV.jl, XLSX.jl, Makie.jl, Distributions.jl and universally available to every project, with project-specific installs limited to specialized needs.

On the other hand, the lack of isolation between global and project-specific environments can result in globally-installed packages leaking into project tests, dependency chains, and so on. Workflows incorporating software engineering best practices typically benefit from having light global environments and heavy project environments: little to no packages installed globally, with all packages installed into project specific environments.

I prefer and recommend the latter approach, not just due to my software developer vocation, but also for robustness and replicability.

One way to achieve both the convenience of a global with just a little more friction is to created a dedicated scratch environment into which you can dump all the commonly used packages useful for many tasks and workflows before anything “escalates” into a fully-siloed project.

alias jc='julia --project=~/.julia-gpc`

This, as a full-fledged isolated environment, then gains the benefit of actually being able to be loaded up with useful packages, from fundamentals (e.g., DataFrames.jl, CSV, etc.) to more specialized domain-specific yet project-general ones (e.g. visualization libraries).

Back to top
Virulence-transmission trade-off (Frank, 1996)
Julia: Functions, methods, and signatures
  • © Jeet Sukumaran

Please share or adapt under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).