DominiqueMakowski / CognitiveModels

Cognitive Models: Computational Modeling of Cognitive Processes with Bayesian Mixed Models in Julia
https://dominiquemakowski.github.io/CognitiveModels/
11 stars 2 forks source link

Update .gitignore and add Project.toml to start env mangement #2

Closed kiante-fernandez closed 1 month ago

kiante-fernandez commented 1 month ago

To keep with package management, I have added Project.toml and made some changes to the yml to ensure Quarto works with the Julia kernel using the specific project environment.

DominiqueMakowski commented 1 month ago

cool, could you just let me know how to make best use of this manifest / how to update it?

kiante-fernandez commented 1 month ago

cool, could you just let me know how to make best use of this manifest / how to update it?

The key changes involve working with QuartoNotebookRunner with environments. You will need Pkg.instantiate in the working directory with the Project.toml. You might also have to Pkg.build as well. Then if you want to add a package you can Pkg.activate . and same as usual.

Once inside the content folder, it should be something like:

quarto preview # to look at
quarto render  # to render

Make sure you clear your project cache with jcache project clear.

One thing we might want to consider is having independent environments for each chapter, which could help with debugging. However, it depends on how many dependencies we end up having.