Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

  • https://malco.io/2018/11/05/why-should-i-use-the-here-package-when-i-m-already-using-projects/
  • http://jenrichmond.rbind.io/post/how-to-use-the-here-package/
  • https://here.r-lib.org/
  • https://here.r-lib.org/articles/rmarkdown.html

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.

  • https://pypi.org/project/pyhere/
  • https://github.com/wildland-creative/pyhere

"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?

like image 994
EngrStudent Avatar asked Oct 30 '25 03:10

EngrStudent


1 Answers

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.

like image 165
Sundar R Avatar answered Nov 02 '25 13:11

Sundar R



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!