-
Notifications
You must be signed in to change notification settings - Fork 7
/
devrepl.jl
51 lines (45 loc) · 1.47 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
46
47
48
49
50
51
# 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
ENV["GKSwstype"] = 100
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")
# Disable link-checking in interactive REPL, since it is the slowest part
# of building the docs.
ENV["DOCUMENTER_CHECK_LINKS"] = "0"
if abspath(PROGRAM_FILE) == @__FILE__
help()
end