I’ve been working on my first package for counterfactual explanations and algorithmic recourse in Julia. To create tutorials as part of the documentation I have been using packages that are not dependencies of the package itself. For example, I show here how to use my package to create counterfactual explanations for Flux.jl models, but Flux is not a dependency of my package.
Now here’s what I’m hoping to get some advice on:
- If I add these packages to my package environment, they will by default be added as deps to the Project.toml, if I’m not mistaken.
- To avoid this I have set up a separate environment in
docs/src/tutorials
which uses the dev version of my repo as a dependency along with any other packages (like Flux) I need for the tutorials.
This approach works, but is at times a bit fiddly. When working on the package itself I use its own environment. Whenever I work on tutorials in docs I need to remember to
- Push any potential changes in my dev branch to remote.
- Update the environment in
docs/src/tutorials
to incorporate those changes like so:
(@v1.6) pkg> activate .
Activating environment at `AlgorithmicRecourse.jl/docs/src/tutorials/Project.toml`
(tutorials) pkg> update AlgorithmicRecourse
I imagine there’s a better way to go about this?
Appreciate this is a bit of a convoluted topic so hopefully I’ve been clear enough. For reference: I’m working in VS code and using Jupyter+nbconvert to create the tutorials.
Any thoughts/comments would be much appreciated!