Skip to content

Commit

Permalink
Adapt to GRAPE being registered
Browse files Browse the repository at this point in the history
  • Loading branch information
goerz committed Oct 16, 2021
1 parent ecf61df commit e2a197f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 49 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ jobs:
Pkg.develop(url="https://github.com/JuliaQuantumControl/QuantumControlBase.jl.git#master")
println("Dev-install QuantumPropagators")
Pkg.develop(url="https://github.com/JuliaQuantumControl/QuantumPropagators.jl.git#master")
println("Dev-install Krotov")
Pkg.develop(url="https://github.com/JuliaQuantumControl/Krotov.jl.git#master")
println("Dev-install QuantumControl")
Pkg.develop(url="https://github.com/JuliaQuantumControl/QuantumControl.jl.git#master")
#println("Pkg.instantiate()")
#Pkg.instantiate()'
println("Pkg.instantiate()")
Pkg.instantiate()'
- run: |
# Run tests
julia --threads auto --project=@. -e '
Expand All @@ -74,15 +72,12 @@ jobs:
/usr/bin/python3 -m pip install matplotlib
- run: |
# Instantiate Pkg
cp docs/Project.toml.unregistered docs/Project.toml # TODO Register GRAPE
julia --project=docs -e '
using Pkg
println("Dev-install QuantumControlBase")
Pkg.develop(url="https://github.com/JuliaQuantumControl/QuantumControlBase.jl.git#master")
println("Dev-install QuantumPropagators")
Pkg.develop(url="https://github.com/JuliaQuantumControl/QuantumPropagators.jl.git#master")
println("Dev-install Krotov")
Pkg.develop(url="https://github.com/JuliaQuantumControl/Krotov.jl.git#master")
println("Dev-install QuantumControl")
Pkg.develop(url="https://github.com/JuliaQuantumControl/QuantumControl.jl.git#master")
println("Dev-install package")
Expand Down
19 changes: 6 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,53 +28,46 @@ help: ## show this help
QUANTUMCONTROLBASE ?= ../QuantumControlBase.jl
QUANTUMPROPAGATORS ?= ../QuantumPropagators.jl
QUANTUMCONTROL ?= ../QuantumControl.jl
KROTOV ?= ../Krotov.jl


define DEV_PACKAGES
using Pkg;
Pkg.develop(path="$(QUANTUMCONTROLBASE)");
Pkg.develop(path="$(QUANTUMPROPAGATORS)");
Pkg.develop(path="$(KROTOV)");
Pkg.develop(path="$(QUANTUMCONTROL)");
endef
export DEV_PACKAGES

define ENV_PACKAGES
using Pkg;
$(DEV_PACKAGES)
#Pkg.develop(PackageSpec(path=pwd())); # TODO: Requires GRAPE to be registered
Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate()
endef
export ENV_PACKAGES


DEV_PROJECT_TOMLS = $(QUANTUMCONTROLBASE)/Project.toml $(QUANTUMPROPAGATORS)/Project.toml $(KROTOV)/Project.toml $(QUANTUMCONTROL)/Project.toml
DEV_PROJECT_TOMLS = $(QUANTUMCONTROLBASE)/Project.toml $(QUANTUMPROPAGATORS)/Project.toml $(QUANTUMCONTROL)/Project.toml

Manifest.toml: Project.toml $(DEV_PROJECT_TOMLS)
julia --project=. -e "$$DEV_PACKAGES;Pkg.instantiate()"


#test: Manifest.toml ## Run the test suite
test:
rm -f test/Project.toml # TODO: register GRAPE package
rm -f Manifest.toml # TODO: register GRAPE Package
julia --project=. -e "$$DEV_PACKAGES" # TODO: register GRAPE Package
test: Manifest.toml ## Run the test suite
@rm -f test/Manifest.toml # Pkg.test cannot handle existing test/Manifest.toml
julia --startup-file=yes -e 'using Pkg;Pkg.activate(".");Pkg.test(coverage=true)'
@echo "Done. Consider using 'make devrepl'"


test/Manifest.toml: test/Project.toml.unregistered $(DEV_PROJECT_TOMLS)
cp test/Project.toml.unregistered test/Project.toml # TODO: register GRAPE package
test/Manifest.toml: test/Project.toml $(DEV_PROJECT_TOMLS)
julia --project=test -e "$$ENV_PACKAGES"


devrepl: test/Manifest.toml ## Start an interactive REPL for testing and building documentation
@julia --threads auto --project=test --banner=no --startup-file=yes -e 'include("test/init.jl")' -i


docs/Manifest.toml: docs/Project.toml.unregistered $(DEV_PROJECT_TOMLS)
cp docs/Project.toml.unregistered docs/Project.toml # TODO: register GRAPE package
docs/Manifest.toml: docs/Project.toml $(DEV_PROJECT_TOMLS)
julia --project=docs -e "$$ENV_PACKAGES"


Expand Down
22 changes: 3 additions & 19 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,17 @@ authors = ["Alastair Marshall <alastair@nvision-imaging.com>", "Michael Goerz <m
version = "0.0.1"

[deps]
ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Krotov = "b05dcdc7-62f6-4360-bf2c-0898bba419de"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
QuantumControl = "8a270532-f23f-47a8-83a9-b33d10cad486"
QuantumControlBase = "f10a33bc-5a64-497c-be7b-6f86b4f0c2aa"
QuantumPropagators = "7bf12567-5742-4b91-a078-644e72a65fc1"

[compat]
ConcreteStructs = "0.2"
Optim = "1"
Parameters = "0.12"
QuantumControl = "0.0"
QuantumControlBase = "0.0"
QuantumPropagators = "0.0"
QuantumControl = "^0.0"
QuantumControlBase = "^0.0"
QuantumPropagators = "^0.0"
julia = "1.6"

[extras]
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"

[targets]
test = ["Literate", "Plots", "PyPlot", "SafeTestsets", "UnicodePlots", "Test"]
4 changes: 1 addition & 3 deletions docs/Project.toml.unregistered → docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[deps]
ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Krotov = "b05dcdc7-62f6-4360-bf2c-0898bba419de"
GRAPE = "6b52fcaf-80fe-489a-93e9-9f92080510be"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
QuantumControl = "8a270532-f23f-47a8-83a9-b33d10cad486"
Expand Down
2 changes: 0 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Pkg # TODO: remove after GRAPE is registered
Pkg.develop(PackageSpec(path = pwd())) # TODO: remove after GRAPE is registered
using GRAPE
using Documenter

Expand Down
5 changes: 2 additions & 3 deletions test/Project.toml.unregistered → test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Krotov = "b05dcdc7-62f6-4360-bf2c-0898bba419de"
GRAPE = "6b52fcaf-80fe-489a-93e9-9f92080510be"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
Expand All @@ -21,6 +19,7 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
julia = "1.6"
4 changes: 2 additions & 2 deletions test/init.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# init file for "make devrepl"
using Pkg # TODO: remove after GRAPE is registered
Pkg.develop(PackageSpec(path = pwd())) # TODO: remove after GRAPE is registered
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
using Revise
println("""
*******************************************************************************
Expand Down

0 comments on commit e2a197f

Please sign in to comment.