Skip to content

Dev setup

Olivier Cots edited this page Aug 30, 2024 · 17 revisions

Packages (1/2): official / local registry

  • add, if necessary, local (= non officially registered packages) according to (SSH)
pkg> registry add git@github.com:control-toolbox/ct-registry.git

or (HTTP)

pkg> registry add https://github.com/control-toolbox/ct-registry.git
  • 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...
  • to go back to a registered version, do
pkg> free OptimalControl.jl

Person: developer / user

  • as a developer, activate the project from its root dir (containing Project.toml)
pkg> activate .
  • followed by an (to create the Manifest.toml)
pkg> instantiate
  • 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 .MyModule

Update a dependency of your package

Check for outdated packages and then update the compatibility written in the Project.tomlfile.

julia> ]
pkg> activate .
pkg> update
pkg> st --outdated
pkg> compat