I have created a few packages for numerical simulations, which are not (yet) registered anywhere. My current development workflow is to just clone the repository manually and to use a script to start the simulations (which includes the main module file and then starts the main method).
The Project.toml/Manifest.toml files of the package include all required packages. However, I am wondering how new users can easily install all dependencies for the package in their main Julia environment (i.e., as if I use add PackageName for regular, registered packages)?
If I do ] activate . + instantiate in my project, it will download & install all dependencies but does not make them available if I do not start julia with --project=..
That is as per design: when you activate the project then the installation of packages happens into that project and not into the global environment. Just work in that project. Or is there a reason not to?
Thank you for your answer. I am looking at this from a usability perspective: Our modules are to be used regularly by novice users (students…) with little programming experience, and we want to make the experience for them as smooth as possible. Therefore, I was hoping that there is a way to avoid calling --project=path/to/module each time they run the module scripts with julia - really just to make it as hassle-free as possible for the students (and their advisor ).
However, I understand the design choice (and support it). I just wanted to see if there is a way to do it (or, alternatively, to confirm that there is no sane way to achieve what I was hoping to do, such that I can stop looking).
I have an alias for alias juliap='julia --project=@.' and start julia in the project folder with juliap. Maybe that is an option for your students? I think jupyter notebooks have something similar built-in, but I might be wrong.
Thank you for the advice and the hint to your package. However, the overall Package/Registry setup is very Julia-specific and way more involved than what I can expect my targeted user demographic (students with little programming or console experience) to handle.
If my users are able to install Julia and git, clone a Julia package, and run its scripts, without needing personal assistance from my side, I am already happy For this very specific use case I was looking for a simple solution to have them install all required dependencies with (preferably) a single command.
Nevertheless, we will eventually register the packages (either with the General registry or a domain-specific one), and make them work as Julia intends it.
I already tried this but failed to set up a central Julia installation with multiple pre-installed modules. Everything seems to work, except the Julia kernel won’t start when requested from JupyterHub. Anyways, thanks for your input!