-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Anchal Gupta edited this page Jul 17, 2024
·
13 revisions
News: v1.0.0 released on all repositories. Please ensure you are using this version from now on. Previous versions will be deprecated.
Following assumes that you have installed Julia on your computer as recommended here. SD4SOLPS and all other repos in this project are registered with public repository FuseRegistry. For installation:
using Pkg
Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"))
Pkg.Registry.add("General")
Pkg.add("SD4SOLPS")
Pkg.add("SynthDiag")
For creating your test environment and to not install all the repos in this project in your main julia environment, you can simply start a new Project.toml
file anywhere by doing:
- Create a test environment directory
% mkdir SD4SOLPS_env
% cd SD4SOLPS_env
- Run Julia and do the following:
% julia --project=./
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.9.2 (2023-07-05)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> ]
(SD4SOLPS_env) pkg> registry add https://github.com/ProjectTorreyPines/FuseRegistry.jl.git
(SD4SOLPS_env) pkg> add SD4SOLPS
...
(SD4SOLPS_env) pkg> add SynthDIag
...
(SD4SOLPS_env) instantiate
(SD4SOLPS_env) # press backspace (delete on mac) to get out
julia> exit()
- Now to run some script using your environment, you can run the scripts as:
% julia --project=/path/to/SD4SOLPS_env/as/created/above/ some_script.jl
Or you can run a jupyter notebook for inline visualization and testing your code.
- For this to work, you'll have to install IJulia package in your main environment (usually called @vx.x):
% julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.9.2 (2023-07-05)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> ]
(@v1.9) pkg> add IJulia
(@v1.9) pkg> instantiate
# press backspace (delete on mac) to get out
(@v1.9) pkg> julia> exit()
- Either get inside SD4SOLPS_env directory created above or get inside a working directory that contains the environment toml files created above.
- Then create any file with .ipynb extension and select the Julia kernel after starting the notebook or opening it in VScode), and at the top cell:
using Pkg;
Pkg.activate("./")
Pkg.instantiate()
Note: The packages have following dependence order right now, you'll have to ensure that this is not broken while installing and updating packages: