How to use local, relative modules (best practice, simple)?

You have probably searched around already, but here is a post and links therein that is a recommended read Best practise: organising code in Julia - #2 by stevengj

To Julia, files and modules are two very different things. A file can define multiple or no modules at all. A module can span multiple files.

That said, I have export JULIA_LOAD_PATH=".:$JULIA_LOAD_PATH" in my shell profile. With that, import X will look for a file X.jl in the directory from which Julia was launched and load the module therein defined. That mimics Python’s behavior I think.
Discovery is case-sensitive, so you would need to rename helper.jl -> Helper.jl.

6 Likes