Julia enforces a special model for project structure, yet it is not immidiately evident from documentation. I could discover it better by reviewing some existing github repositories, eg Turing.jl.
Folder structure looks like this:
src
Turing.jl
models
Distributions.jl
Turing.jl
is head module for the project, it will be importable whenever you use this package:
using Turing
or import Turing
will import Turing.jl
, in slightly different ways though.
Turing.jl
will use the code of Distributions.jl
via including the text of the code with
include("models/Distributions.jl")
Hidden rules are:
- project has a
src
folder <Modulename>.jl
should be in that folder<Modulename>.jl
may include code of other modules in thesrc
subfolder- module subfolders seem do not interact with one another