yvs314 / epi-net-m

Data Processing and Simulation Tools for Networked SIR+
MIT License
1 stars 0 forks source link

API formalization #21

Closed karaign closed 3 years ago

karaign commented 3 years ago

Addresses #20.

It seems that most of the inconsistencies described in #20 are due to the IO code being written in a way that relies on the current working directory. After changing that, I tested both the import method and the include method in Jupyter, the Julia REPL launched by executing julia, and the Julia REPL launched via VS Code's "execute in REPL" function, and both seem to work just fine.

The caveat is that in a REPL environment, both @from and include resolve the path given to them relative to the working directory. In that sense, the "correct" way to use the API in a REPL still depends on the working directory we're in. If that is a problem, we could go back to trying to configure the Julia environment in such a way that just import Oboe would work.

karaign commented 3 years ago

@yvs314 Thanks for the suggestion, just implemented it. Do note that this doesn't exactly address the caveat I mentioned, though, since path_to_Oboe.jl still has to be relative to the working directory when importing Oboe in a REPL in the first place.

yvs314 commented 3 years ago

Ah, that working directory! Thank you for pointing out this distinction. No, i'm fine with the lack of “just using Oboe.” Given the sad absence of Telepathy.jl, I find explicitly pointing where to find the project head file preferable to registering the package (Pkg.activate, etc.), mostly because I imagine the latter would require rebuilding after every change, whereas now Revise.jl mostly lets me avoid all of this.

And thanks for implementing the suggestion.