When I develop packages, I use activate --temp; dev /path/to/MyPackage in the Pkg REPL, followed by using MyPackage. This will create a temporary environment where you’re free to test things, then make the local package available as if you downloaded it from the registry. However, I’ve only ever developed packages with a single module.
I see, each “module” is a package (just not registered). Then yes, you can dev them in the AstroText environment. You can also add them using:
Pkg.add(path="/home/leandro/.julia/dev/Package")
That will make a copy of the current state of Package to be available in the current environment (using dev you will track the changes to that package, which may be what you want, or not)
Since you already have a fair bit of structure you might consider registering your packages in a registry of your own. The LocalRegistry package can help you out with that.
When you ]develop a package from a local or remote directory (your own computer, GitHub, etc.), it gets added to your current environment, whatever that may be. At that point, you could make its contents available with import or using, just the same as you used Pkg.jl to fetch it from the general registry.
I repeat the process every time I want to test the package I’m developing, which is why I use a temporary environment. I suppose you could just run ]develop once in your default environment if you are working with a stable package that just isn’t available on the general registry.
When working with different environments, I push everything to my private GitHub repo and simply add them as dependencies by add repourl (this way I can simply “update” after committing extra work on any of the dependent packages).
Maybe this is not “the way”, but it reduces my cognitive load (by always using the old add package method).
In case the previous answers suggesting to use Pkg.dev weren’t explicit enough, here is what you should be able to do with such a file structure:
shell$ julia --project=AstroText
# Declare dependencies to both your libraries
# using `develop` means that Pkg does not try to manage versions:
# you'll use your dependences as they are defined by the current state
# of the julia source files in the given paths
julia> import Pkg
julia> Pkg.develop("path/to/AstroPhysics")
julia> Pkg.develop("path/to/TextManipulation")
The commands above should be run once, to populate the AstroText/Manifest.toml file with the relevant information. From there, you can use your libraries from your script without any problem:
shell$ julia --project=AstroText
julia> using AstroPhysics # should work and load sources from the registered path on your filesystem