Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.4.0 #54

Merged
merged 2 commits into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# v0.4.0
## Features
- Overhauled the `unit_system` macro. (see the readme and the SI module in `src/si.rs` for example usage). (See #44)
- - The `Dimension` type does not need to be defined by the user anymore and is derived automatically.
- - The new syntax is much more explicit about what the base units are and prevents accidentally declaring multiple base units (which could be a critical error).
- - Similarly, defining units in terms of a dimension is not allowed anymore and units can only be derived from the base units and other derived units.
- - Support adding prefixes to custom units via the `#[prefix(...)]` attribute to save time and prevent bugs due to typos due to wrong conversion factors.
- - Support adding aliases to custom units via the `#[alias(...)]` attribute.
- - Added a large list of dimensions and units to the SI module, each including all metric prefixes from atto to exa.
- Add support for rational dimensions. This is not enabled by default and requires the `rational-dimensions` feature gate. (See #48)
- Add various numeric trait implementations for references of quantities. (See #50 and #53)

# v0.3.0
## Features
- Add various trait implementations for dimensionless quantities and their underlying storage types: `MulAssign`, `DivAssign` , `PartialEq`, `PartialOrd`, `From`. For example, this makes it possible to write:
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "diman"
version = "0.3.0"
version = "0.4.0"
edition = "2021"
description = "Zero-cost compile-time dimensional analysis."
authors = ["Toni Peter <[email protected]>"]
Expand Down Expand Up @@ -41,7 +41,7 @@ hdf5 = { version = "0.8.1", optional = true }
mpi = { version = "0.7", default-features = false, features = ["derive"], optional = true }
once_cell = { version = "1.18.0", optional = true }

diman_unit_system = { path = "crates/diman_unit_system", version = "0.3" }
diman_unit_system = { path = "crates/diman_unit_system", version = "0.4" }

[dev-dependencies]
serde_yaml = "0.9.27"
Expand Down
2 changes: 1 addition & 1 deletion crates/diman_unit_system/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "diman_unit_system"
version = "0.3.0"
version = "0.4.0"
edition = "2021"
authors = [
"Toni Peter <[email protected]>",
Expand Down