# ANN: RoguePkg.jl, for testing and benchmarking packages outside Pkg.dir()

**URL:** <https://discourse.julialang.org/t/ann-roguepkg-jl-for-testing-and-benchmarking-packages-outside-pkg-dir/6165>\
**Category:** Community\
**Tags:** announcement\
**Created:** [September 30, 2017, 9:26am UTC](https://discourse.julialang.org/t/ann-roguepkg-jl-for-testing-and-benchmarking-packages-outside-pkg-dir/6165 "2017-09-30T09:26:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [September 30, 2017, 9:26am UTC](https://discourse.julialang.org/t/ann-roguepkg-jl-for-testing-and-benchmarking-packages-outside-pkg-dir/6165/1 "2017-09-30T09:26:48Z")

</div>

I like to keep my local packages, including public and private ones, outside `~/.julia`. This has some benefits, eg that `Pkg.update()` does not attempt to update them, and that if my package directory is seriously corrupted I can easily wipe and reinstall.

The downside is that utilities like `Pkg.test` and `PkgBenchmark.benchmarkpkg` can’t find these packages. [Pkg3](https://github.com/StefanKarpinski/Pkg3.jl) will fix these issues, but as a stopgap measure, I wrote [RoguePkg.jl](https://github.com/tpapp/RoguePkg.jl).

## Usage

It allows you to define objects using non-standard string literals:

```julia
using RoguePkg

# package which contains a given module, found using the load path:
pkg_for"FancyModule"

# package at a specified path:
pkg_at"~/this_is/where_I/keep/FancyPkg"

# set ENV[JULIA_LOCAL_PACKAGES], will find it in there:
pkg_local"FancyPkg"

```

Then you can

```julia
Pkg.test(pkg_for"FancyModule")
PkgBenchmark.benchmarkpkg(pkg_for"FancyModule")

```

The package is not registered, get it from

> **[GitHub - tpapp/RoguePkg.jl: Test, benchmark, and Pkg.dir for local packages...](https://github.com/tpapp/RoguePkg.jl)**
>
> Test, benchmark, and Pkg.dir for local packages outside ~/.julia

## Implementation

`Base.Pkg.dir` is extended to work with the objects above. If they are the first argument, they resolve to the path, in other positions to the package name.
