Skip to content

Commit

Permalink
Automatically document all units
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Mar 4, 2024
1 parent 07f2ebc commit 96fb662
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions docs/src/units.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ uparse
## Available units

The base SI units are as follows.
Instead of calling directly, it is recommended to access them via
the `@u_str` macro, which evaluates the expression
in a namespace with all the units available.
You can either use the `@u_str` macro like `1.5u"m"`,
or simply import these explicitly from the package
with `using DynamicQuantities: m`.

```@docs
Units.m
Expand All @@ -28,19 +28,10 @@ Units.mol

Several derived SI units are available as well:

```@docs
Units.Hz
Units.N
Units.Pa
Units.J
Units.W
Units.C
Units.V
Units.F
Units.Ω
Units.T
Units.L
Units.bar
```@autodocs
Modules = [Units]
Order = [:constant]
Filter = t -> t ∉ (Units.m, Units.kg, Units.s, Units.A, Units.K, Units.cd, Units.mol)
```

## Custom Units
Expand Down

0 comments on commit 96fb662

Please sign in to comment.