Skip to content

Commit

Permalink
Release 0.6.2
Browse files Browse the repository at this point in the history
- Fix for compiler/clippy warnings when building with the latest stable version (clippy 0.1.55, rustc 1.55.0).
- Include pre-commit hooks in continuous integration.
  • Loading branch information
davehadley committed Oct 16, 2021
1 parent 96546c5 commit f8de575
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 35 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,10 @@ jobs:
args: -- -D warnings
- name: cargo doc
run: RUSTDOCFLAGS="-D warnings" cargo doc
- name: Setup python
uses: actions/setup-python@v2
- name: Run pre-commit hooks
run: |
pip install pre-commit \
&& pre-commit run --all
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,40 @@ repos:
types: [rust]

- repo: https://github.com/timothycrosley/isort
rev: 5.5.3
rev: 5.9.3
hooks:
- id: isort
stages: [commit]

- repo: https://github.com/ambv/black
rev: stable
rev: 21.9b0
hooks:
- id: black
language_version: python3
stages: [commit]


- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.2
rev: 3.9.2
hooks:
- id: flake8
stages: [commit]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782
rev: v0.910-1
hooks:
- id: mypy

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v1.6.1
rev: v2.2.0
hooks:
- id: pretty-format-yaml
args: [--autofix]
- id: pretty-format-toml
args: [--autofix]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.0.1
hooks:
- id: check-added-large-files
- id: check-ast
Expand Down
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Apache-2.0 OR MIT
6 changes: 6 additions & 0 deletions ndhistogram/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.6.2 (2021-10-16)

- Fix for compiler/clippy warnings when building with the latest stable version (clippy 0.1.55, rustc 1.55.0).
- Include pre-commit hooks in continuous integration.


# 0.6.1 (2021-06-27)

- Fix for compiler/clippy warnings when building with the latest stable version (clippy 0.1.53, rustc 1.53.0).
Expand Down
38 changes: 19 additions & 19 deletions ndhistogram/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@
name = "bench_fill"
harness = false

[lib]
bench = false

[package]
name = "ndhistogram"
version = "0.6.1"
authors = [ "David Hadley <[email protected]>",]
edition = "2018"
license = "MIT OR Apache-2.0"
description = "multi-dimensional histogramming for Rust"
repository = "https://github.com/davehadley/rust-hist"
readme = "README.md"
keywords = [ "histogram", "statistics", "data", "analysis", "multidimensional",]
categories = [ "science", "mathematics", "data-structures",]

[dependencies]
num-traits = "0.2.14"

[dependencies.serde]
version = "1.0.120"
features = [ "derive",]

[dev-dependencies]
rand = "0.8.0"
rand_distr = "0.4.0"
serde_json = "1.0.61"
version-sync = "0.9.1"
paste = "1.0.4"

[dependencies.serde]
version = "1.0.120"
features = [ "derive",]

[dev-dependencies.criterion]
version = "0.3.4"
features = [ "html_reports",]

[lib]
bench = false

[package]
name = "ndhistogram"
version = "0.6.2"
authors = [ "David Hadley <[email protected]>",]
edition = "2018"
license = "MIT OR Apache-2.0"
description = "multi-dimensional histogramming for Rust"
repository = "https://github.com/davehadley/rust-hist"
readme = "README.md"
keywords = [ "histogram", "statistics", "data", "analysis", "multidimensional",]
categories = [ "science", "mathematics", "data-structures",]
2 changes: 1 addition & 1 deletion ndhistogram/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
ndhistogram = "0.6.1"
ndhistogram = "0.6.2"
```

See the [change log](https://github.com/davehadley/ndhistogram/blob/main/ndhistogram/CHANGELOG.md)
Expand Down
3 changes: 1 addition & 2 deletions ndhistogram/src/histogram/vechistogram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::{
cmp::Ordering,
f64::INFINITY,
fmt::Display,
iter::repeat,
ops::{Add, Div, Mul, Sub},
};

Expand Down Expand Up @@ -145,7 +144,7 @@ where
.map(|(bin, value)| {
(
format!("{:.precision$}", bin, precision = precision),
repeat("#").take(value as usize).collect::<String>(),
"#".repeat(value as usize),
)
})
.map(|(bin, value)| write!(f, "\n{:>16} | {}", bin, value))
Expand Down
10 changes: 5 additions & 5 deletions ndhistogram/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//!
//! ```toml
//! [dependencies]
//! ndhistogram = "0.6.1"
//! ndhistogram = "0.6.2"
//! ```
//!
//! See the [change log](https://github.com/davehadley/ndhistogram/blob/main/ndhistogram/CHANGELOG.md)
Expand Down Expand Up @@ -128,7 +128,7 @@
//! User defined bin value types are possible by implementing the [Fill](Fill), [FillWith](FillWith) or [FillWithWeighted](FillWithWeighted) traits.
#![doc(issue_tracker_base_url = "https://github.com/davehadley/rust-hist/issues")]
#![doc(html_root_url = "https://docs.rs/ndhistogram/0.6.1")]
#![doc(html_root_url = "https://docs.rs/ndhistogram/0.6.2")]
#![cfg_attr(
debug_assertions,
warn(
Expand All @@ -140,9 +140,9 @@
deny(unsafe_code, macro_use_extern_crate),
warn(
missing_docs,
missing_crate_level_docs,
missing_doc_code_examples,
broken_intra_doc_links,
rustdoc::missing_crate_level_docs,
rustdoc::missing_doc_code_examples,
rustdoc::broken_intra_doc_links,
)
)]

Expand Down
2 changes: 1 addition & 1 deletion ndhistogram/tests/test_category_axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn test_category_num_bins() {
fn test_category_get_index() {
let cats = vec!["A", "B"];
let ax = Category::new(cats.clone());
let actual: Vec<usize> = cats.iter().map(|c| ax.index(&c).unwrap()).collect();
let actual: Vec<usize> = cats.iter().map(|c| ax.index(c).unwrap()).collect();
let expected = vec![0, 1];
assert_eq!(expected, actual)
}
Expand Down
2 changes: 1 addition & 1 deletion ndhistogram/tests/test_categorynoflow_axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn test_categorynoflow_num_bins() {
fn test_categorynoflow_get_index() {
let cats = vec!["A", "B"];
let ax = CategoryNoFlow::new(cats.clone());
let actual: Vec<usize> = cats.iter().map(|c| ax.index(&c).unwrap()).collect();
let actual: Vec<usize> = cats.iter().map(|c| ax.index(c).unwrap()).collect();
let expected = vec![0, 1];
assert_eq!(expected, actual)
}
Expand Down

0 comments on commit f8de575

Please sign in to comment.