Skip to content

Commit

Permalink
Fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
stillyslalom committed Oct 5, 2023
1 parent ddddd81 commit 8b881c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/RefractiveIndex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export RefractiveMaterial, dispersion, extinction, showmetadata, specifications

const RI_INFO_ROOT = Ref{String}()
const RI_LIB = Dict{Tuple{String, String, String}, NamedTuple{(:name, :path), Tuple{String, String}}}()
const DB_VERSION = "refractiveindex.info-database-2022-10-01"
const DB_VERSION = "refractiveindex.info-database-2023-10-04"
const DB_INDEX_CACHE_PATH = joinpath(@get_scratch!(DB_VERSION), "RI_index_cache.jls")

RI_INFO_ROOT[] = joinpath(artifact"refractiveindex.info", DB_VERSION, "database")
Expand Down Expand Up @@ -104,7 +104,7 @@ julia> Hikari_F1 = RefractiveMaterial("glass", "HIKARI-F", "F1")
"""
function RefractiveMaterial(shelf, book, page)
metadata = RI_LIB[(shelf, book, page)]
path = joinpath(RI_INFO_ROOT[], "data", metadata.path)
path = joinpath(RI_INFO_ROOT[], "data-nk", metadata.path)
isfile(path) || @error "Specified material does not exist"
yaml = YAML.load_file(path; dicttype=Dict{Symbol, Any})
reference = get(yaml, :REFERENCES, "")
Expand Down
2 changes: 1 addition & 1 deletion src/init.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function _init_cache()
if !isfile(DB_INDEX_CACHE_PATH)
lib = YAML.load_file(joinpath(RI_INFO_ROOT[], "library.yml"), dicttype=Dict{String, Any})
lib = YAML.load_file(joinpath(RI_INFO_ROOT[], "catalog-nk.yml"), dicttype=Dict{String, Any})
for shelf in lib
shelfname = shelf["SHELF"]
for book in shelf["content"]
Expand Down

1 comment on commit 8b881c4

@stillyslalom
Copy link
Owner Author

@stillyslalom stillyslalom commented on 8b881c4 Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register
(please?)

Please sign in to comment.