Skip to content

Commit

Permalink
remove before and add Artifacts.toml in docs + main call into function
Browse files Browse the repository at this point in the history
  • Loading branch information
aTrotier committed Nov 9, 2024
1 parent 1b098b0 commit f5ca05a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 37 deletions.
1 change: 0 additions & 1 deletion docs/Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[MP2RAGE_data]
git-tree-sha1 = "04cd4c29bb9e2aeb5384fbc70a9af0e1a37ca369"
lazy = true

[[MP2RAGE_data.download]]
sha256 = "1f1b703c79db66ba6ef620651eca431cb0319d87f1eafa53826cb11a93afe4a8"
Expand Down
19 changes: 1 addition & 18 deletions docs/lit/examples/advanced_reco.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,11 @@ using CairoMakie # plotting


# ## Loading Package
using Artifacts
using LazyArtifacts # loading data
using SEQ_BRUKER_a_MP2RAGE_CS_360
using CairoMakie # plotting

artifact_data = """
[MP2RAGE_data]
git-tree-sha1 = "04cd4c29bb9e2aeb5384fbc70a9af0e1a37ca369"
lazy = true
[[MP2RAGE_data.download]]
sha256 = "1f1b703c79db66ba6ef620651eca431cb0319d87f1eafa53826cb11a93afe4a8"
url = "https://zenodo.org/records/14051522/files/data.tar.gz"
"""
# ## Download the datasets
temp_artifact_toml = tempname()
open(temp_artifact_toml, "w") do file
write(file, artifact_data)
end
_hash = artifact_hash("MP2RAGE_data", temp_artifact_toml)
datadir = artifact_path(_hash)

datadir = Main.MP2_artifacts
@info "The test data is located at $datadir."

# If you want to perform your own reconstruction, you can change the following line in order to point to another a bruker dataset
Expand Down
19 changes: 1 addition & 18 deletions docs/lit/examples/simple_reco.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,13 @@
#

# ## Loading Package
using Artifacts
using LazyArtifacts # loading data
using SEQ_BRUKER_a_MP2RAGE_CS_360
using CairoMakie # plotting

# ## Download the datasets
artifact_data = """
[MP2RAGE_data]
git-tree-sha1 = "04cd4c29bb9e2aeb5384fbc70a9af0e1a37ca369"
lazy = true
[[MP2RAGE_data.download]]
sha256 = "1f1b703c79db66ba6ef620651eca431cb0319d87f1eafa53826cb11a93afe4a8"
url = "https://zenodo.org/records/14051522/files/data.tar.gz"
"""

# Write the data to a temporary file
temp_artifact_toml = tempname()
open(temp_artifact_toml, "w") do file
write(file, artifact_data)
end
_hash = artifact_hash("MP2RAGE_data", temp_artifact_toml)
datadir = artifact_path(_hash)

datadir = Main.MP2_artifacts
@info "The test data is located at $datadir."

# If you want to perform your own reconstruction, you can change the following line in order to point to another a bruker dataset
Expand Down
4 changes: 4 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using SEQ_BRUKER_a_MP2RAGE_CS_360
using Documenter, Literate
using LazyArtifacts
using Artifacts

MP2_artifacts = artifact"MP2RAGE_data"

include("generate_lit.jl")

Expand Down

0 comments on commit f5ca05a

Please sign in to comment.