-
Notifications
You must be signed in to change notification settings - Fork 0
Dev setup
This page explains how to set up your Julia environment to develop or use packages from the control-toolbox ecosystem.
All packages of the ecosystem are now available in the official Julia General Registry β
you no longer need to manually add a local registry.
Note
The local registry (ct-registry) is deprecated and should only be used for legacy setups or historical purposes.
If you still need it for compatibility reasons, you can add it manually:
SSH:
pkg> registry add git@github.com:control-toolbox/ct-registry.gitHTTP:
pkg> registry add https://github.com/control-toolbox/ct-registry.gitYou can either use a stable (registered) version of a package,
or develop one locally or from a Git repository.
- Use a registered version (recommended for users):
pkg> add MyPackage- Develop a local version (for contributors):
pkg> dev /home/user/OptimalControl.jl- Return to the registered version:
pkg> free OptimalControl.jlIf you are contributing to a package:
-
Activate the project (from the directory containing
Project.toml):pkg> activate .
-
Instantiate dependencies:
pkg> instantiate -
Run tests:
pkg> test
or equivalently from the shell:
julia --project=. -e 'using Pkg; Pkg.test()' |& tee -a /tmp/log
If you only need to use the developed package (for example, inside a notebook):
using MyPackageTo import a module defined inside your current project, use a relative reference:
using .MyModuleTo check for outdated dependencies and update your Project.toml compat entries:
julia> ]
pkg> activate .
pkg> update
pkg> st --outdated
pkg> compatβ Summary
| Role | Typical actions |
|---|---|
| User | pkg> add MyPackage |
| Developer |
pkg> dev /path/to/MyPackage then pkg> activate . and pkg> test
|
| Maintainer | Update dependencies and check compat entries |
| Legacy setups | May still require adding the local registry (ct-registry) |
π See also: