BRAIN-TO / GIRFReco.jl

An Open-Source End-to-End Pipeline for Spiral Magnetic Resonance Image (MRI) Reconstruction in Julia
https://brain-to.github.io/GIRFReco.jl/
BSD 3-Clause "New" or "Revised" License
16 stars 1 forks source link

Config files and root directory #9

Closed felixhorger closed 1 year ago

felixhorger commented 1 year ago

This fails if your root directory isn't the main repo's root (that's one reason I brought up the IDE in #3, the IDE "hides" the fact that you're still running code from the repo's root. If you for example work with cmdline, a reasonable thing to do is to cd to the examples folder, and run the script from there, which doesn't work as described before.

I think what you should do is to make the example self-contained in a sense that it imports all packages it needs (import and using), and the rest of the code is available in the examples folder. This also ties in with my comments on the manuscript here: wouldn't it be better to have a function providing you with a dictionary (or other data structure) containing the options, and then in your example script you can adjust them to your need, instead of having to copy a file? Open for discussion!

felixhorger commented 1 year ago

Same problem here

https://github.com/BRAIN-TO/GIRFReco.jl/blob/9f5b4b98625a5aea1e87d77ca5505ed42ea13c10/docs/lit/examples/joss_demo.jl#L102-L102

are there reasons for not making it a function? You already mentioned that historically GIRFReco.jl wasn't a package during development, but now that it is I see no reason why this functionality should remain in a script.

alexjaffray commented 1 year ago

Filing this as within scope of #14