# Pkg.test() for cloned package

**URL:** <https://discourse.julialang.org/t/pkg-test-for-cloned-package/3164>\
**Category:** General Usage\
**Created:** [April 11, 2017, 10:20am UTC](https://discourse.julialang.org/t/pkg-test-for-cloned-package/3164 "2017-04-11T10:20:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenjaminBorn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benjaminborn/32/4910_2.png) [@BenjaminBorn](https://discourse.julialang.org/u/BenjaminBorn)\
**Post date:** [April 11, 2017, 10:20am UTC](https://discourse.julialang.org/t/pkg-test-for-cloned-package/3164/1 "2017-04-11T10:20:33Z")

</div>

My Julia installation includes a registered package X and, in order to make changes to X, I also cloned Master of the package to a folder outside the Julia installation (i.e. Dropbox) and branched from there. Until now, I loaded the package by `include("Path to X")`. But of course this can be tedious as I have to append everything by X.function.

1. Is there a way to use `using` with a path to the module so that it’s not the regularly installed version that is loaded but my local version?

2. Is there a way to run the tests of the modified package with Pkg.test()?

It might also be that my workflow doesn’t make sense at all. Then also please let me know.

Thanks for your help, Benjamin

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [April 11, 2017, 12:47pm UTC](https://discourse.julialang.org/t/pkg-test-for-cloned-package/3164/2 "2017-04-11T12:47:39Z")

</div>

> [@BenjaminBorn](#):
>
> Is there a way to use using with a path to the module so that it’s not the regularly installed version that is loaded but my local version?

Julia packages are just Git repositories. Just make a new branch in the local repository, and it will be the one that `using` pulls in.

---

<div class="post-metadata">

**Author:** ![BenjaminBorn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benjaminborn/32/4910_2.png) [@BenjaminBorn](https://discourse.julialang.org/u/BenjaminBorn)\
**Post date:** [April 11, 2017, 1:25pm UTC](https://discourse.julialang.org/t/pkg-test-for-cloned-package/3164/3 "2017-04-11T13:25:53Z")

</div>

Thanks Chris. The reason I didn’t do that is that I would like to work on the package from different computers, that’s why I cloned it on Dropbox.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [April 11, 2017, 1:31pm UTC](https://discourse.julialang.org/t/pkg-test-for-cloned-package/3164/4 "2017-04-11T13:31:06Z")

</div>

Fork the repository, and push the local branch to your fork. Then on any other computer, add this fork to your remotes and just check out that branch.

If you’re unfamiliar with Git, I’d say check out GitKraken. It’s a GUI (nice visuals) and, if you’re new to this, what I said will probably make much more sense when you “see it”.

---

<div class="post-metadata">

**Author:** ![BenjaminBorn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benjaminborn/32/4910_2.png) [@BenjaminBorn](https://discourse.julialang.org/u/BenjaminBorn)\
**Post date:** [April 11, 2017, 2:46pm UTC](https://discourse.julialang.org/t/pkg-test-for-cloned-package/3164/5 "2017-04-11T14:46:54Z")

</div>

Thanks again, this is very helpful. I’m still a Git beginner but have been playing with GitKraken for a couple of weeks (actually after seeing you recommending it in another thread). What I actually did until now is

1. Fork the repository
2. Clone it to Dropbox
3. Make changes and push them to my fork
4. Open a pull request at the original package repository

The only problem with your proposal that I see is that once I have a pull request open, everything I push to my fork automatically ends up at the original repository. But I might want to work on it before updating the pull request. Would you solve that with multiple branches? I just fear that it gets messy quickly and I’m very good at creating a mess with Git.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [April 11, 2017, 2:51pm UTC](https://discourse.julialang.org/t/pkg-test-for-cloned-package/3164/6 "2017-04-11T14:51:56Z")

</div>

> [@BenjaminBorn](#):
>
> Would you solve that with multiple branches? I just fear that it gets messy quickly and I’m very good at creating a mess with Git.

I would go further and say this is supposed to be solved by branching. I think I should make a video on Julia development practices. It’ll probably help a lot of people get started.

---

<div class="post-metadata">

**Author:** ![BenjaminBorn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benjaminborn/32/4910_2.png) [@BenjaminBorn](https://discourse.julialang.org/u/BenjaminBorn)\
**Post date:** [April 11, 2017, 2:55pm UTC](https://discourse.julialang.org/t/pkg-test-for-cloned-package/3164/7 "2017-04-11T14:55:19Z")

</div>

Definitely 🙂
