Skip to content

Commit f5ca05a

Browse files
committed
remove before and add Artifacts.toml in docs + main call into function
1 parent 1b098b0 commit f5ca05a

File tree

4 files changed

+6
-37
lines changed

4 files changed

+6
-37
lines changed

docs/Artifacts.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[MP2RAGE_data]
22
git-tree-sha1 = "04cd4c29bb9e2aeb5384fbc70a9af0e1a37ca369"
3-
lazy = true
43

54
[[MP2RAGE_data.download]]
65
sha256 = "1f1b703c79db66ba6ef620651eca431cb0319d87f1eafa53826cb11a93afe4a8"

docs/lit/examples/advanced_reco.jl

+1-18
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,11 @@ using CairoMakie # plotting
1616

1717

1818
# ## Loading Package
19-
using Artifacts
2019
using LazyArtifacts # loading data
2120
using SEQ_BRUKER_a_MP2RAGE_CS_360
2221
using CairoMakie # plotting
2322

24-
artifact_data = """
25-
[MP2RAGE_data]
26-
git-tree-sha1 = "04cd4c29bb9e2aeb5384fbc70a9af0e1a37ca369"
27-
lazy = true
28-
29-
[[MP2RAGE_data.download]]
30-
sha256 = "1f1b703c79db66ba6ef620651eca431cb0319d87f1eafa53826cb11a93afe4a8"
31-
url = "https://zenodo.org/records/14051522/files/data.tar.gz"
32-
"""
33-
# ## Download the datasets
34-
temp_artifact_toml = tempname()
35-
open(temp_artifact_toml, "w") do file
36-
write(file, artifact_data)
37-
end
38-
_hash = artifact_hash("MP2RAGE_data", temp_artifact_toml)
39-
datadir = artifact_path(_hash)
40-
23+
datadir = Main.MP2_artifacts
4124
@info "The test data is located at $datadir."
4225

4326
# If you want to perform your own reconstruction, you can change the following line in order to point to another a bruker dataset

docs/lit/examples/simple_reco.jl

+1-18
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,13 @@
88
#
99

1010
# ## Loading Package
11-
using Artifacts
1211
using LazyArtifacts # loading data
1312
using SEQ_BRUKER_a_MP2RAGE_CS_360
1413
using CairoMakie # plotting
1514

1615
# ## Download the datasets
17-
artifact_data = """
18-
[MP2RAGE_data]
19-
git-tree-sha1 = "04cd4c29bb9e2aeb5384fbc70a9af0e1a37ca369"
20-
lazy = true
21-
22-
[[MP2RAGE_data.download]]
23-
sha256 = "1f1b703c79db66ba6ef620651eca431cb0319d87f1eafa53826cb11a93afe4a8"
24-
url = "https://zenodo.org/records/14051522/files/data.tar.gz"
25-
"""
26-
27-
# Write the data to a temporary file
28-
temp_artifact_toml = tempname()
29-
open(temp_artifact_toml, "w") do file
30-
write(file, artifact_data)
31-
end
32-
_hash = artifact_hash("MP2RAGE_data", temp_artifact_toml)
33-
datadir = artifact_path(_hash)
3416

17+
datadir = Main.MP2_artifacts
3518
@info "The test data is located at $datadir."
3619

3720
# If you want to perform your own reconstruction, you can change the following line in order to point to another a bruker dataset

docs/make.jl

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
using SEQ_BRUKER_a_MP2RAGE_CS_360
22
using Documenter, Literate
3+
using LazyArtifacts
4+
using Artifacts
5+
6+
MP2_artifacts = artifact"MP2RAGE_data"
37

48
include("generate_lit.jl")
59

0 commit comments

Comments
 (0)