# Contributing to packages

**URL:** <https://discourse.julialang.org/t/contributing-to-packages/42216>\
**Category:** Statistics\
**Tags:** question, package\
**Created:** [June 28, 2020, 11:15pm UTC](https://discourse.julialang.org/t/contributing-to-packages/42216 "2020-06-28T23:15:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bojohnson02](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bojohnson02/32/9345_2.png) [@bojohnson02](https://discourse.julialang.org/u/bojohnson02)\
**Post date:** [June 28, 2020, 11:15pm UTC](https://discourse.julialang.org/t/contributing-to-packages/42216/1 "2020-06-28T23:15:07Z")

</div>

I’m working on adding a distribution to Distributions.jl and am curious how to get a good workflow for making contributions. I first created a new environment with `]activate MyDist`, added Distributions.jl and the other needed packages, and then setup a git clone with `]develop --local Distributions`. I’ve added my files and modified other files in the `dev/Distributions` directory. When I run in the REPL `include("runtests.jl")` or compile the documents with `include("make.jl")` in the `dev/Distributions/docs/` directory, my tests aren’t being run and my documentation isn’t showing in the created html file.

Is what I’ve done so far the correct way to test my additions to a package before working on a pull request?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [June 28, 2020, 11:40pm UTC](https://discourse.julialang.org/t/contributing-to-packages/42216/2 "2020-06-28T23:40:48Z")

</div>

I suppose you’d need to activate the Distributions environment.

---

<div class="post-metadata">

**Author:** ![bojohnson02](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bojohnson02/32/9345_2.png) [@bojohnson02](https://discourse.julialang.org/u/bojohnson02)\
**Post date:** [June 29, 2020, 12:31am UTC](https://discourse.julialang.org/t/contributing-to-packages/42216/3 "2020-06-29T00:31:31Z")

</div>

Isn’t activating a new environment different than adding and developing packages in an environment?

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [June 29, 2020, 12:37am UTC](https://discourse.julialang.org/t/contributing-to-packages/42216/4 "2020-06-29T00:37:02Z")

</div>

My typical workflow for developing a package is:

- Clone the package repository into a folder somewhere convenient. You can do this with `]dev PackageName`, but I personally prefer to clone packages manually into a folder other than `.julia`.
- `cd` into the package folder
- Start Julia and run `]activate .` to activate the _package’s_ project environment.
- Make changes, and run `]test PackageName` to run the tests.

Rather than creating a whole new environment to work on the package, we can just work _in the package’s environment_. That means that any references to `PackageName` are always unambiguously the one you’re developing right now, and any edits you make to the local files are guaranteed to have an effect.

---

<div class="post-metadata">

**Author:** ![bojohnson02](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bojohnson02/32/9345_2.png) [@bojohnson02](https://discourse.julialang.org/u/bojohnson02)\
**Post date:** [June 29, 2020, 2:16am UTC](https://discourse.julialang.org/t/contributing-to-packages/42216/5 "2020-06-29T02:16:09Z")

</div>

@rdeits That seems to have done the trick. I’m curious, though, why activating a new environment then running `]develop --local Distributions` didn’t work if the environment is now tracking the local files and the changes I’ve made?

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [June 29, 2020, 1:43pm UTC](https://discourse.julialang.org/t/contributing-to-packages/42216/6 "2020-06-29T13:43:05Z")

</div>

I’m not sure–I don’t see anything obviously wrong with what you’re doing. If you want to really get to the bottom of it, the thing to do would be to write down the exact set of steps you took and exactly what the unexpected result was. Otherwise it’s hard to be sure.
