-
Notifications
You must be signed in to change notification settings - Fork 0
/
devrepl.jl
45 lines (41 loc) · 1.32 KB
/
devrepl.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Source this script as e.g.
#
# include("PATH/TO/devrepl.jl")
#
# from *any* Julia REPL or run it as e.g.
#
# julia -i --banner=no PATH/TO/devrepl.jl
#
# from anywhere. This will change the current working directory and
# activate/initialize the correct Julia environment for you.
#
# You may also run this in vscode to initialize a development REPL
#
using Pkg
using Downloads: download
cd(@__DIR__)
Pkg.activate("test")
function _instantiate()
installorg_script = joinpath("..", "scripts", "installorg.jl")
if !isfile(installorg_script)
@warn "$(@__DIR__) should be inside the JuliaQuantumControl development environment. See https://github.com/JuliaQuantumControl/JuliaQuantumControl#readme"
installorg_script = download(
"https://raw.githubusercontent.com/JuliaQuantumControl/JuliaQuantumControl/master/scripts/installorg.jl",
)
end
if !isfile(joinpath("..", ".JuliaFormatter.toml"))
download(
"https://raw.githubusercontent.com/JuliaQuantumControl/JuliaQuantumControl/master/.JuliaFormatter.toml",
".JuliaFormatter.toml"
)
end
include(installorg_script)
eval(:(installorg()))
end
if !isfile(joinpath("test", "Manifest.toml"))
_instantiate()
end
include("test/init.jl")
if abspath(PROGRAM_FILE) == @__FILE__
help()
end