# Good guide to setting up a reproducible julia project?

**URL:** https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848
**Category:** General Usage
**Tags:** package, gettingstarted, application, code-organization, reproducibility
**Created:** [August 16, 2022, 9:18pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848 "2022-08-16T21:18:01Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![NHDaly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhdaly/32/1413_2.png) [@NHDaly](https://discourse.julialang.org/u/NHDaly)
#### Post date: [August 16, 2022, 9:18pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/1 "2022-08-16T21:18:01Z")

</div>

Hello,

I was looking for a good guide on how to set up a new julia project/application, so that it is reproducible, and stays up to date with its dependencies.

My coworkers were setting up a new julia project, and I couldn’t find any good “getting started setting up a new project” advice online. Does anyone know of any existing guides like this?

Here is what I recommended to them:

- commit your `*.toml` files (created when you `Pkg.add()` dependencies)
  - Project.toml
  - Manifest.toml (This provides reproducible builds)

- Add this CompatHelper file to your `.github/workflows` directory: [Example.jl/CompatHelper.yml at master · JuliaLang/Example.jl · GitHub](https://github.com/JuliaLang/Example.jl/blob/master/.github/workflows/CompatHelper.yml)
  - this will open a PR to your repo whenever there is a breaking change released in your dependencies.
  - You should test these PRs and merge them only if everything still works

- Ideally you should also set up automated CI tests, to make sure that your project continues working as you update the SDK and make other changes.
- finally, you’ll want to run `Pkg.update()` every once in a while and commit the changes (after testing) to keep up to date with patch releases of your dependencies

Does a guide already exist that covers these kinds of steps? It’s especially important to me to recommend that they include CompatHelper (and ideally CI.yml as well).

Also, I should say:  
I looked at these two pages in the Manual, but I don’t feel that they sufficiently covered the “extra stuff” I mentioned above:

- [9. Glossary · Pkg.jl](https://pkgdocs.julialang.org/v1/glossary/# **9.** -Glossary-1)
- [10. Project.toml and Manifest.toml · Pkg.jl](https://pkgdocs.julialang.org/v1/toml-files/)

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [August 16, 2022, 9:31pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/2 "2022-08-16T21:31:07Z")

</div>

Well, I wrote a guide for reproducible Julia projects; [Working with Julia projects | Julia programming notes](https://ufechner7.github.io/2022/08/16/julia-projects.html)

You could add [Alexander Plavin / CompatHelperLocal.jl · GitLab](https://gitlab.com/aplavin/compathelperlocal.jl) if that is what you want…

But if you also want CI… Why not setting up a full Julia package?

---

<div class="post-metadata">

### Author: ![SteffenPL](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steffenpl/32/206270_2.png) [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)
#### Post date: [August 16, 2022, 9:32pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/3 "2022-08-16T21:32:17Z")

</div>

There is also [Home · PkgTemplates.jl](https://invenia.github.io/PkgTemplates.jl/stable/) which automates some of these steps. I also liked this video: [Developing Julia Packages - YouTube](https://www.youtube.com/watch?v=QVmU29rCjaA)

---

<div class="post-metadata">

### Author: ![NHDaly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhdaly/32/1413_2.png) [@NHDaly](https://discourse.julialang.org/u/NHDaly)
#### Post date: [August 16, 2022, 9:32pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/4 "2022-08-16T21:32:29Z")

</div>

I think I would be happy to recommend them to set up a full Julia Package. 👍 As long as there is a clear and straightforward guide to get started, I think that sounds like a great recommendation, yeah.

Do you feel that there is already a good guide on getting started setting up a Julia package that has all of the above?

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [August 16, 2022, 9:32pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/5 "2022-08-16T21:32:56Z")

</div>

No… I will try to write one…

---

<div class="post-metadata">

### Author: ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)
#### Post date: [August 16, 2022, 9:34pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/6 "2022-08-16T21:34:15Z")

</div>

> [@NHDaly](#):
>
> a good guide on getting started setting up a Julia package

Not necessarily a good guide, but simple it is:

> **[Create new package · JuliaNotes.jl](https://m3g.github.io/JuliaNotes.jl/stable/new_package/#How-to-create-a-new-package)**
>
> Documentation for JuliaNotes.jl.

(It does NOT have all of the above)

---

<div class="post-metadata">

### Author: ![SteffenPL](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steffenpl/32/206270_2.png) [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)
#### Post date: [August 16, 2022, 9:38pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/7 "2022-08-16T21:38:08Z")

</div>

> [@lmiq](#):
>
> (It does NOT have all of the above)

With `using PkgTemplates; Template(interactive=true)("MyPkg")` I think most of the above should be covered as it will ask for the available options which should be added.

---

<div class="post-metadata">

### Author: ![NHDaly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhdaly/32/1413_2.png) [@NHDaly](https://discourse.julialang.org/u/NHDaly)
#### Post date: [August 16, 2022, 9:44pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/8 "2022-08-16T21:44:34Z")

</div>

I think PkgTemplates might already add `CompatHelper.yml` by default as well!

PkgTemplates is a great suggestion, but I was worried that for someone _just getting started_ with Julia, that it might be still a bit mysterious how to use it.

But actually on reflection, I think you’re right that it’s the best thing to recommend for new people as well. (It’s what I use to create packages 👍.)

One is that if they’ve _already started_ their project, it’s less obvious how to turn it into a good project using PkgTemplates (usually i will create a new package and then copy all the files it generated into my git repository… but this is already starting to be pretty unwieldy).

---

<div class="post-metadata">

### Author: ![NHDaly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhdaly/32/1413_2.png) [@NHDaly](https://discourse.julialang.org/u/NHDaly)
#### Post date: [August 16, 2022, 9:48pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/9 "2022-08-16T21:48:56Z")

</div>

> [@ufechner7](#):
>
> But if you also want CI… Why not setting up a full Julia package?

But also, regarding this question: do note that in this case they’re trying to set up a private project, to share with their consulting clients, and they _do not_ want to create a public package.

I know that it’s easy to control that, but I just wanted to note that a guide for “how to create a public package” isn’t exactly what we’re after.

Thanks for all the great recommendations so far! My coworker said this guide was particularly helpful, @ufechner7!

> [@ufechner7](#):
>
> Well, I wrote a guide for reproducible Julia projects; [Working with Julia projects | Julia programming notes](https://ufechner7.github.io/2022/08/16/julia-projects.html)

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [August 16, 2022, 10:01pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/10 "2022-08-16T22:01:35Z")

</div>

Thank you!

---

<div class="post-metadata">

### Author: ![j-fu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j-fu/32/11373_2.png) [@j-fu](https://discourse.julialang.org/u/j-fu)
#### Post date: [August 16, 2022, 11:01pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/11 "2022-08-16T23:01:46Z")

</div>

Hi, I did some write-up here: [Julia: Project Workflow](https://j-fu.github.io/marginalia/julia/project-workflow/)

Currently trying this out with several projects.

---

<div class="post-metadata">

### Author: ![sairus7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sairus7/32/10816_2.png) [@sairus7](https://discourse.julialang.org/u/sairus7)
#### Post date: [August 16, 2022, 11:52pm UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/12 "2022-08-16T23:52:56Z")

</div>

Also, you can look here: [Introduction · DrWatson](https://juliadynamics.github.io/DrWatson.jl/dev/)

---

<div class="post-metadata">

### Author: ![BenPH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benph/32/38619_2.png) [@BenPH](https://discourse.julialang.org/u/BenPH)
#### Post date: [August 17, 2022, 12:35am UTC](https://discourse.julialang.org/t/good-guide-to-setting-up-a-reproducible-julia-project/85848/13 "2022-08-17T00:35:54Z")

</div>

> PkgTemplates is a great suggestion, but I was worried that for someone _just getting started_ with Julia, that it might be still a bit mysterious how to use it.

I have a [PR to the julia vscode extension](https://github.com/julia-vscode/julia-vscode/pull/2799) which I’m hoping might help for new users if it’s merged. It exposes a Create New Project command that uses PkgTemplates under the hood but without the need for the user to install or understand how to use it.
