-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Scratch.jl for default data dir? #73
Comments
I'll also add that I do NOT think For a more permanent and extensible solution, custom depot code may be better handled by simply telling users to call "include_generator" from outside of the package at runtime, and by deprecating the current code-copying solution. When the user wants to define a package of custom matrix generators called
As far as I can tell, the solution I have just described already works, and all that needs to change is documentation and a deprecation to the existing code loading system. |
You can use the environment variable "MATRIXDEPOT_DATA" for that purpose.
Please feel free to provide a PR with your proposed changes wrt MYDEPOT. |
Thanks for your quick response, and for your maintenance of a very useful package! My goal in filing this issue was to contribute a PR which did not default to writing files inside the MatrixDepot package directory, for both MATRIXDEPOT_MYDEPOT and MATRIXDEPOT_DATA. I understand wanting to avoid a dependency on Scratch for now. In the meantime, what do you think about setting a default similar to that of Scratch? This would confer the same benefits regarding persistence across MatrixDepot versions and Julia versions. Internally, Scratch defaults the scratchspace to a subdirectory of
Alternatively, what do you think about defaulting to |
Both is possible in combination. I am waiting for your PR. Some issues: |
I've implemented a rough draft of the proposed changes, but ran into a hiccup using Requires to include Scratch. When Scratch is loaded after MatrixDepot, we need to re-run Unless we can explicitly depend on Scratch or initialize lazily, I think it would be better to exclusively use the In the interest of avoiding putting MatrixDepot users through two changes to the defaults (to |
Because of the complications and effort involved in any other solution, I decided it would be easiest and least confusing to users if we simply wait until MatrixDepot.jl is comfortable with a dependency on Julia 1.5 or 1.6, which is likely to be the next LTS, and then add Scratch as a normal dependency. Note the discussion in JuliaPackaging/Scratch.jl#22. |
I'm in favor of bumping the requirement to Julia 1.5. Bumping the bound doesn't mean that users of Julia <1.5 cannot use MatrixDepot. It just means that they cannot use the new features. |
It looks like Scratch is now compatible with Julia 1.0, so these changes no longer require a Julia version requirement bump. JuliaPackaging/Scratch.jl#24 |
Good news! Ass soon as |
It has already been released JuliaRegistries/General#38498 |
I relaxed the compat entry for julia back to "1" in my pull requests. I'm awaiting feedback on #75 and willow-ahrens#1 |
#75 has been merged just now. |
Since I wasn't able to merge willow-ahrens#1 into #75 before #75 was merged, I have opened it as a separate PR on master as #79 |
I almost always use a custom data directory for MatrixDepot (my supercomputer filesystem for scratch data) because I don't want to redownload the matrices when the package updates, and I need to ensure the data path is writable. However, there is now a more automatic solution for this kind of problem, Scratch.jl. I think that Scratch.jl may provide a more useful default data directory which persists across updates to the package.
Currently, the default is in the package itself set on line 140 of "data.jl"
I think it would make a lot of sense to change that line to
The text was updated successfully, but these errors were encountered: