From f8a47c6f8bc1e61d72891f9e5a428f6f735af9f3 Mon Sep 17 00:00:00 2001 From: Pedro Maciel Xavier Date: Wed, 2 Oct 2024 16:40:45 -0400 Subject: [PATCH 1/2] Fix Artifact File [no ci] --- Artifacts.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Artifacts.toml b/Artifacts.toml index 6acfb59..e53f131 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -1,8 +1,8 @@ [qubolib] -git-tree-sha1 = "7dd4e0ff8e24c29964698c5bcdcb167a5bf5f11d" +git-tree-sha1 = "589afc4ab896a18e91989bfb46448e6859c7d041" lazy = true [[qubolib.download]] - url = "https://github.com/pedromxavier/QUBOLibData.jl/releases/download/v0.1.3/qubolib.tar.gz" - sha256 = "e4acf4fb9c07b139b4eda3a46429bf685a097051a73b489b2c2b063f6c0979ce" + url = "https://github.com/JuliaQUBO/QUBOLib.jl/releases/download/v0.1.0-dev0/qubolib.tar.gz" + sha256 = "fe76c53cf89075aa88c16ddde174f312f9917a10bf6a1900cbd2cdf3198c5d6f" \ No newline at end of file From e204374a592019826ac1a5ecc4ebf134869d8411 Mon Sep 17 00:00:00 2001 From: Pedro Maciel Xavier Date: Wed, 2 Oct 2024 16:45:27 -0400 Subject: [PATCH 2/2] Fix access --- .gitignore | 1 + src/library/access.jl | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 2ecd02d..2ad7757 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ Manifest.toml # Distribution Files dist/ +qubolib/ # PythonCall .CondaPkg \ No newline at end of file diff --git a/src/library/access.jl b/src/library/access.jl index 866c03d..5d16588 100644 --- a/src/library/access.jl +++ b/src/library/access.jl @@ -16,11 +16,11 @@ function access(callback::Any; path::AbstractString) end function access(; path::AbstractString = pwd()) - if !is_installed(path) - install(path) + if !is_installed(library_path(path)) + install(library_path(path)) end - return load_index(path) + return load_index(library_path(path)) end function is_installed(path::AbstractString)::Bool @@ -28,9 +28,21 @@ function is_installed(path::AbstractString)::Bool end function install(path::AbstractString) - cp(library_path(), mkdir(library_path(path)); force = true) - - chmod(library_path(path), 0o666; recursive = true) + mkdir(path) + + for src_name in readdir(library_path()) + src_path = abspath(library_path(), src_name) + dst_path = abspath(path, src_name) + + cp( + src_path, + dst_path; + force = true, + follow_symlinks = true, + ) + + chmod(dst_path, 0o644) + end return nothing end