-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use uv and mkdocs, add dependencies to pyproject.toml, restructured s…
…ource, added stub
- Loading branch information
Showing
26 changed files
with
845 additions
and
428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = ["si-units", "example/extend_quantity"] | ||
|
||
[workspace.package] | ||
version = "0.10.0" | ||
authors = [ | ||
"Philipp Rehner <[email protected]>", | ||
"Gernot Bauer <[email protected]>", | ||
] | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
repository = "https://github.com/itt-ustutt/quantity" | ||
|
||
|
||
[package] | ||
name = "quantity" | ||
version = "0.10.0" | ||
|
@@ -20,8 +35,6 @@ exclude = ["/.github/*", "*.ipynb", "/docs"] | |
features = ["python_numpy", "num-dual", "approx"] | ||
rustdoc-args = ["--html-in-header", "./src/docs-header.html"] | ||
|
||
[workspace] | ||
members = ["si-units", "example/extend_quantity"] | ||
|
||
[dependencies] | ||
typenum = "1.17" | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,28 @@ | ||
[package] | ||
name = "si-units" | ||
version = "0.10.0" | ||
authors = [ | ||
"Philipp Rehner <[email protected]>", | ||
"Gernot Bauer <[email protected]>", | ||
] | ||
rust-version = "1.81" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
description = "Representation of SI unit valued scalars and arrays." | ||
homepage = "https://github.com/itt-ustutt/quantity/tree/master/si-units" | ||
readme = "README.md" | ||
repository = "https://github.com/itt-ustutt/quantity" | ||
keywords = ["physics", "units", "SI"] | ||
categories = ["data-structures", "science"] | ||
exclude = ["*.ipynb", "/docs"] | ||
|
||
[lib] | ||
name = "si_units" | ||
crate-type = ["cdylib"] | ||
|
||
[dependencies] | ||
ndarray = "0.16" | ||
numpy = "0.23" | ||
thiserror = "2.0" | ||
regex = "1.10" | ||
|
||
[dependencies.pyo3] | ||
version = "0.23" | ||
features = ["extension-module", "abi3", "abi3-py37"] | ||
[package] | ||
name = "si-units" | ||
version = "0.10.0" | ||
authors = [ | ||
"Philipp Rehner <[email protected]>", | ||
"Gernot Bauer <[email protected]>", | ||
] | ||
rust-version = "1.81" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
description = "Representation of SI unit valued scalars and arrays." | ||
homepage = "https://github.com/itt-ustutt/quantity/tree/master/si-units" | ||
readme = "README.md" | ||
repository = "https://github.com/itt-ustutt/quantity" | ||
keywords = ["physics", "units", "SI"] | ||
categories = ["data-structures", "science"] | ||
exclude = ["*.ipynb", "/docs"] | ||
|
||
[lib] | ||
name = "_core" | ||
crate-type = ["cdylib"] | ||
|
||
[dependencies] | ||
ndarray = "0.16" | ||
numpy = "0.23" | ||
pyo3 = { version = "0.23", features = ["extension-module", "abi3-py39"] } | ||
regex = "1.11" | ||
thiserror = "2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# API | ||
|
||
::: si_units._core.SIObject | ||
options: | ||
show_symbol_type_heading: true | ||
members: | ||
- __init__ | ||
- cbrt | ||
- sqrt | ||
- has_unit | ||
summary: | ||
attributes: false | ||
functions: true | ||
|
||
::: si_units._core.SIArray1 | ||
options: | ||
show_symbol_type_heading: true | ||
members: | ||
- __call__ | ||
- linspace | ||
- logspace | ||
summary: | ||
attributes: false | ||
functions: true | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# SI Base Units and Associated Constants (AC) | ||
|
||
All capitalized entries in the `Unit` and `AC` (associated constants) columns from the table below can be imported: | ||
|
||
|
||
| Unit | Symbol | Quantity | AC | AC Name | AC value | | ||
| -------- | ------------ | ------------------------- | ------ | ----------------------------------------------- | -------------------------------------------------------------- | | ||
| SECOND | $\text{s}$ | time | DVCS | Hyperfine transition frequency of Cs | $\Delta\nu_\text{Cs}=9192631770~\text{Hz}$ | | ||
| METER | $\text{m}$ | length | CLIGHT | Speed of light | $c=299792458~\frac{\text{m}}{\text{s}}$ | | ||
| KILOGRAM | $\text{kg}$ | mass | PLANCK | Planck constant | $h=6.62607015\times 10^{-34}~\text{J}\cdot\text{s}$ | | ||
| AMPERE | $\text{A}$ | electric current | QE | Elementary charge | $e=1.602176634\times 10^{-19}~\text{C}$ | | ||
| KELVIN | $\text{K}$ | thermodynamic temperature | KB | Boltzmann constant | $k_\text{B}=1.380649\times 10^{-23}~\frac{\text{J}}{\text{K}}$ | | ||
| MOL | $\text{mol}$ | amount of substance | NAV | Avogadro constant | $N_\text{A}=6.02214076\times 10^{23}~\text{mol}^{-1}$ | | ||
| CANDELA | $\text{cd}$ | luminous intensity | KCD | Luminous efficacy of $540~\text{THz}$ radiation | $K_\text{cd}=683~\frac{\text{lm}}{\text{W}}$ | | ||
|
||
## Example | ||
|
||
```py linenums="1" | ||
from si_units import SECOND, DVCS | ||
print(SECOND) | ||
print(DVCS) | ||
``` | ||
``` | ||
1 s | ||
9.19263177 GHz | ||
``` |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.