pathpackagejuliaprojectreproducible-research

Analog of r-here or py-here for Julia


BACKGROUND
One of the very useful tools for reproducible work in R is the "here" library.

I was hooked by the part in the first link where they said this: enter image description here

The "here" library is encoded in Anaconda as "r-here"

I'm not sure which came first, but Python has a "here" library as well.

"Here" makes relative paths a trivial matter, which is really useful for reproducible data-science and analysis work.

QUESTION
What is the Julia equivalent for clean handling of relative paths for files? Is there a clean way to integrate that with project packaging, like RStudio does?


Solution

  • Based on the description, it sounds like DrWatson.jl does what you're looking for. From the website:

    [DrWatson] is a Julia package created to help people increase the consistency of their scientific projects, navigate them and share them faster and easier, manage scripts, existing simulations as well as project source code. DrWatson helps establishing reproducibility, and in general it makes managing a scientific project a simple job.

    Like the description implies, it's more ambitious than here seems to be, having functionality to also manage data, simulation runs, etc. But they're optional, and you can use only the directory handling part if you need.

    The Navigating a Project describes the projectdir function which works similar to here. projectdir("foo", "bar") resolves to foo/bar under the current project's root directory, just like with here.

    There's also datadir(), srcdir(), and others to directly handle common subdirectories under a project for eg. datadir("foo", "test.jld2") resolves to data/foo/test.jld2 under the project's root directory.