Skip to content

Dev setup

Jean-Baptiste Caillau edited this page Feb 3, 2023 · 17 revisions

Packages (1/2): official / local registry

  • add, if necessary, local (= non officially registered packages) according to
pkg> registry add https://github.com/control-toolbox/ct-registry.git
     Cloning registry from "https://github.com/control-toolbox/ct-registry.git"
       Added registry `ct-registry` to `~/.julia/registries/ct-registry`

Packages (2/2): add / dev

  • either use a stable version of a package (pinned version using Project.toml)
pkg> add MyPackage
  • or use an under development one (referenced either from a local path, or from a git repo):
pkg> dev /home/user/OptimalControl.jl
   Resolving package versions...

Person: developer / user

  • as a developer, activate the project from its root dir (containing Project.toml)
pkg> activate .
  • and run the test like this
pkg> test
  • or from the shell
julia --project=. -e 'using Pkg; Pkg.test()' |& tee -a tmp/log
  • as a user, I just want to use the developed package, for instance inside a notebook:
using MyPackage

Misc

  • to use a module that is inside the current project
using .[module name]
Clone this wiki locally