"using" with a local package?

I have a package (here let’s say “NEAT.jl”). It is company internal, and will never be shared. I started it with ] generate NEAT (I am aware of PkgTemplates, but it seemed that assumed that you were going to have a git repo set up, and that has other issues for me right now - sort of mentioned below).

In another package (also set up with generate) I want to bring in the functionality with using or some similar statement, but:

(@v1.9) pkg> activate --temp
  Activating new project at `/tmp/jl_2zw782`

(jl_2zw782) pkg> add /home/frylock/models/src/Wrappers/NEAT/Julia/NEAT/
ERROR: Did not find a git repository at `/home/frylock/models/src/Wrappers/NEAT/Julia/NEAT/`, perhaps you meant `Pkg.develop`?

Ordinarily, I’d just create a git repo to hush the error, but the way that we currently check things in is in one gigantic repo containing everyone’s work (I know, not a good idea, but I’m going to have to lobby to fix that at a somewhat later date).

The way the software is deployed is that it is set up in a Docker container - on a server with no access to the public internet. On deployment, a script scrapes together all of the needed pieces and the Docker container is spun up for the engineer to use (later in development, we are supposed to do something different).

I have followed some of the other discussions here about local packages like this one, but I’m not yet very competent with making packages with Julia.

Is ] dev the right answer?

I’m not sure I completely understand your workflow, but it seems so, yes.

Another way would be to set up a local registry in your company, register NEAT in it and then add it as needed in other environments via

add NEAT

like any other registered package. But this is more infrastructure, and you’d also need to properly version and release your NEAT library for this to work well.

1 Like

Thanks, and to be honest, I’m not sure that I understand my workflow! :crazy_face: