I'm working on a Package in Julia, and I created some functions and sent the pull request. I'm now waiting for it to be accepted in the master branch. In the mean time, I'd like to be able to use the package with the current functions I've just implemented in my Jupyter Notebook.
How can you use the development version of the package with your Jupyter Notebook?
Just tell Julia to use that package:
using Pkg
Pkg.develop(path=raw"C:\some_path\PackageName")
using PackageName
This will the package version from the given folder regardless of the current project settings.
When you want switch back to the main version:
Pkg.free(name="PackageName")
Note that this will work within a global package registry so this package version will be used across all Julia runs.
If you want to rather do it locally to the notebook just do
using Pkg, IJulia
notebook(dir=".") # select path to some empty directory
And then create a Jupyter notebook and type:
using Pkg
Pkg.activate(".")
Pkg.develop(path=raw"C:\some_path\PackageName")
This will create Project.toml
file in the same directory where notebook is. When later opening the notebook just make sure Project.toml
is in place - you will not need to call the command above again.