Hi, all. I am wondering how I can load a folder as a submodule in Julia, similar to how it is done in Python.
For example, I want to load the modules in SubModuleA in the form of MyPackage.SubModuleA.file_a_1 and MyPackage.SubModuleA.file_a_2 in the following directory.
Natively, Julia is different from Python. Julia’s modules are completely independent from any particular filesystem layout of files. You explicitly name them in the source code with module SubModuleA #= ... =# end, and can arrange files as you like by includeing them.
Folks have opinions about this — and strong ones at that. There’ve been many discussions about this and some folks have implemented their own preferred semantics in packages. See Julia#4600 and the topics tagged as “related” below for more.
Thanks. I partially solved this problem via create a SubModuleA.jl file which includes all modules in folder SubModule_A. It might be an easy way to achieve the goals.