The Julia package registry of the MathStruct projects and the packages they grew out of. It is used next to the General registry, not in place of it. Every dependency that is not in this list comes from General.
Once per Julia installation (Julia 1.12 or later):
using Pkg
Pkg.Registry.add("General") # only if it is not there yet
Pkg.Registry.add(RegistrySpec(url = "https://github.com/MathStruct/Registry.git"))or in the Pkg REPL: registry add https://github.com/MathStruct/Registry.git. After that the
packages install by name, and the packages here that depend on each other are resolved
automatically:
Pkg.add("Lenticulum")
Pkg.add("VariationalDiffusion")Pkg.Registry.update() (or registry up) fetches the versions registered after that.
All of these come from MathStruct/Lenticulum.jl,
with one package for each directory under lib/. Documentation:
mathstruct.org/Lenticulum.jl.
| package | what it gives you |
|---|---|
LenticulumCore |
what a factor is: channels, polarities, beliefs, energies |
Mycelium |
inference: graphs, messages, schedules, plates, cluster nodes, the free energy |
MyceliumLearning |
learning: free-energy gradients, expectation maximisation, the optimiser step |
Lenticulum |
the factors: linear-Gaussian, nonlinear, constraints, switching and regime factors, likelihoods |
VariationalDiffusion |
a diffusion model as a relation: implicit inference, sampling, RED-Diff, ProxDM |
ImplicitLayers |
DEQs and neural ODEs as factors |
AdversarialFactors |
implicit generative models: generators and density ratios |
AlgebraicFactors |
finite toric models: exact discrete messages and free energy |
The last three have not yet been reviewed as closely as the core packages.
| package | repository | what it gives you |
|---|---|---|
ModularEIT |
DanielBoigk/ModularEIT.jl | EIT built from exchangeable parts: discretisations, electrode models, solvers, adjoint gradients, regularisers |
ModularEITFerrite |
same, lib/ModularEITFerrite |
the Ferrite.jl backend |
ModularEITGridap |
same, lib/ModularEITGridap |
the Gridap.jl backend |
FerriteAdaptiveTriangular |
DanielBoigk/FerriteAdaptiveTriangular.jl | conforming adaptive refinement of triangle meshes for Ferrite.jl (newest vertex bisection) |
KrylovBlockCG |
DanielBoigk/KrylovBlockCG.jl | block conjugate gradients for Krylov.jl, with an optional projection onto a null space |
Most of these packages are research prototypes with pre-release versions (0.0.1-dev). A
registered version is a fixed snapshot of its repository. It falls behind the development branch
until the next version is registered. For the newest code, use a clone instead:
Pkg.develop(path = "/path/to/Lenticulum.jl/lib/Mycelium.jl")| was | now | why |
|---|---|---|
Adversarial (UUID 5b7e1c94-…) |
AdversarialFactors |
General has an unrelated package with the same name |
For an environment that still lists the old name, run Pkg.rm("Adversarial"); Pkg.add("AdversarialFactors").
In code, using Adversarial becomes using AdversarialFactors.
This is done by the maintainers, with LocalRegistry.
-
Give the package a version number that this registry does not have yet for it (
versionin itsProject.toml). A number cannot be registered a second time with different content. -
Commit the package and push it. The registry records the git tree of the package directory, and Pkg can install that tree only once it is on GitHub.
-
Register from a clean checkout at that commit:
using Pkg Pkg.activate(temp = true); Pkg.add("LocalRegistry") using LocalRegistry register("path/to/Lenticulum.jl/lib/Mycelium.jl"; registry = "path/to/Registry") # a clone of this repository, or "MathStruct" if it is installed
registerwrites the entry, commits it in the registry clone and pushes it. Withpush = falseit stops after the commit. -
Check
repoin the newPackage.toml. It is copied from the package's git remote, so a clone made over SSH writesgit@github.com:…. The registry uses thehttps://github.com/…form, because that works without a GitHub key.
A package that depends on another package of this registry has to be registered after that package.
The [sources] entries of a package tie the packages of one repository together during
development, as paths. An installation from the registry ignores them: there the dependencies
are resolved by version, through the registry.
A package is renamed by registering it again as a new package with a new UUID:
- Rename it in its repository: the directory, the module, and
Project.tomlwith a newuuid. - In one registry commit, delete the old package directory and its line in
Registry.toml. - Register the renamed package, and add a row to the table above.
Do this only while no registered package depends on the old name.