Architecture¶
UnitFlow is organized in layers with strict downward dependencies. This matches the contributor guidelines in the main repository.
Layer |
Package |
Role |
|---|---|---|
Dimension algebra |
|
Base dimensions, exponent vectors |
Exact scale |
|
Rational coefficients, explicit π |
Unit semantics |
|
Immutable units, composition |
Quantity core |
|
Arithmetic, conversion, equality |
Display |
|
Human-readable formatting |
Definition system |
|
|
Catalogs |
|
Curated SI and mechanical packs |
Expressions |
|
Symbols, trees, constraints, compile helpers |
Serialization |
|
Structural JSON-safe payloads |
Backends |
|
Optional NumPy integration |
Dependency rules¶
coredoes not depend on NumPy or expression-only layers.exprmay depend onQuantity,Unit, andDimension.catalogsdepend on the semantic core, not on backends.backendsdepend oncore, not the reverse.
Changing dependency direction requires an explicit design discussion. See the full policy in the repository CONTRIBUTING.md.