Skip to content

Commit dd20751

Browse files
committed
Merge tag 'v0.6.0' into extra-utils-2
[Diff since v0.5.0](v0.5.0...v0.6.0) **Closed issues:** - Physical constants (#26) **Merged pull requests:** - Create (1) physical constants, and (2) symbolic dimensions object (#32) (@MilesCranmer)
2 parents 738ebca + 89bc4e9 commit dd20751

17 files changed

+1120
-140
lines changed

.github/workflows/CI.yml

+2
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ jobs:
3333
- uses: julia-actions/cache@v1
3434
- uses: julia-actions/julia-buildpkg@v1
3535
- name: "Run tests"
36+
shell: bash
3637
run: |
3738
julia --color=yes --project=. -e 'import Pkg; Pkg.add("Coverage")'
3839
julia --color=yes --threads=auto --check-bounds=yes --depwarn=yes --code-coverage=user --project=. -e 'import Pkg; Pkg.test(coverage=true)'
3940
DQ_TEST_UPREFERRED=true julia --color=yes --threads=auto --check-bounds=yes --depwarn=yes --code-coverage=user --project=. -e 'import Pkg; Pkg.test(coverage=true)'
4041
julia --color=yes --project=. coverage.jl
4142
- name: "Coveralls"
4243
uses: coverallsapp/github-action@v2
44+
if: matrix.version == '1'
4345
with:
4446
github-token: ${{ secrets.GITHUB_TOKEN }}
4547
file: lcov.info

Project.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name = "DynamicQuantities"
22
uuid = "06fc5a27-2a28-4c7c-a15d-362465fb6821"
33
authors = ["MilesCranmer <[email protected]> and contributors"]
4-
version = "0.5.0"
4+
version = "0.6.0"
55

66
[deps]
77
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
88
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
99
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
10+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1011
Tricks = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775"
1112

1213
[weakdeps]

docs/make.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ makedocs(;
3939
),
4040
pages=[
4141
"Home" => "index.md",
42-
"API" => "api.md",
42+
"Utilities" => "api.md",
43+
"Units" => "units.md",
44+
"Constants" => "constants.md",
45+
"Symbolic Units" => "symbolic_units.md",
46+
"Types" => "types.md",
4347
]
4448
)
4549

docs/src/api.md

+2-55
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
# Usage
2-
3-
## Types
4-
5-
```@docs
6-
Quantity
7-
Dimensions
8-
```
9-
10-
## Utilities
1+
# Utilities
112

123
The two main general utilities for working
134
with quantities are `ustrip` and `dimension`:
@@ -17,7 +8,7 @@ ustrip
178
dimension
189
```
1910

20-
### Accessing dimensions
11+
## Accessing dimensions
2112

2213
Utility functions to extract specific dimensions are as follows:
2314

@@ -37,49 +28,6 @@ Pages = ["utils.jl"]
3728
Filter = t -> !(t in [ustrip, dimension, ulength, umass, utime, ucurrent, utemperature, uluminosity, uamount])
3829
```
3930

40-
## Units
41-
42-
The two main functions for working with units are `uparse` and `u_str`:
43-
44-
```@docs
45-
@u_str
46-
uparse
47-
```
48-
49-
### Available units
50-
51-
The base SI units are as follows.
52-
Instead of calling directly, it is recommended to access them via
53-
the `@u_str` macro, which evaluates the expression
54-
in a namespace with all the units available.
55-
56-
```@docs
57-
Units.m
58-
Units.g
59-
Units.s
60-
Units.A
61-
Units.K
62-
Units.cd
63-
Units.mol
64-
```
65-
66-
Several derived SI units are available as well:
67-
68-
```@docs
69-
Units.Hz
70-
Units.N
71-
Units.Pa
72-
Units.J
73-
Units.W
74-
Units.C
75-
Units.V
76-
Units.F
77-
Units.Ω
78-
Units.T
79-
Units.L
80-
Units.bar
81-
```
82-
8331
## Internals
8432

8533
### FixedRational
@@ -88,4 +36,3 @@ Units.bar
8836
DynamicQuantities.FixedRational
8937
DynamicQuantities.denom
9038
```
91-

docs/src/constants.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
# Units
3+
4+
Many common physical constants are available as well:
5+
6+
```@docs
7+
Constants.c
8+
Constants.h
9+
Constants.hbar
10+
Constants.e
11+
Constants.k_B
12+
Constants.N_A
13+
Constants.eV
14+
Constants.R
15+
Constants.F
16+
Constants.sigma_sb
17+
Constants.alpha
18+
Constants.u
19+
Constants.G
20+
Constants.mu_0
21+
Constants.eps_0
22+
Constants.m_e
23+
Constants.m_p
24+
Constants.m_n
25+
Constants.a_0
26+
Constants.k_e
27+
Constants.Ryd
28+
```
29+
30+
## Astronomical constants
31+
32+
```@docs
33+
Constants.M_earth
34+
Constants.M_sun
35+
Constants.M_jup
36+
Constants.R_earth
37+
Constants.R_jup
38+
Constants.R_sun
39+
Constants.L_sun
40+
Constants.L_bol0
41+
Constants.sigma_T
42+
Constants.au
43+
Constants.pc
44+
Constants.ly
45+
Constants.atm
46+
```

0 commit comments

Comments
 (0)