Dev setup
🧰 Dev Setup
This page explains how to set up your Julia environment to develop or use packages from the control-toolbox ecosystem.
📦 Packages (1/2): Official vs Local Registry
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.git🧩 Packages (2/2): add / dev
You 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):
- Develop a local version (for contributors):
pkg> dev /home/user/OptimalControl.jl- Return to the registered version:
pkg> free OptimalControl.jl👥 Person: Developer vs User
👨💻 Developer
If you are contributing to a package:
-
Activate the project (from the directory containing
Project.toml): -
Instantiate dependencies:
-
Run tests:
or equivalently from the shell:
julia --project=. -e 'using Pkg; Pkg.test()' |& tee -a /tmp/log
🙋♀️ User
If you only need to use the developed package (for example, inside a notebook):
🧠 Misc
To import a module defined inside your current project, use a relative reference:
🔄 Update a Dependency
To 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: