Skip to content

Commit 51f1e0d

Browse files
committed
lint corrections
1 parent b97672d commit 51f1e0d

37 files changed

+2268
-1076
lines changed

.github/workflows/benches.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
bench:
1313
name: Run checks for Lattice QCD rs
1414
runs-on: ubuntu-latest
15-
env:
16-
CRITERION_TOKEN: ${{ secrets.CRITERION_TOKEN }}
15+
# env:
16+
# CRITERION_TOKEN: ${{ secrets.CRITERION_TOKEN }}
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v2
@@ -25,7 +25,7 @@ jobs:
2525
run: |
2626
# run benchmarks and save baseline in a directory called "new"
2727
cargo bench
28-
- name: Upload benchmarks
29-
run: |
30-
# upload the files
31-
bash <(curl -s https://criterion.dev/bash)
28+
# - name: Upload benchmarks
29+
# run: |
30+
# # upload the files
31+
# bash <(curl -s https://criterion.dev/bash)

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
run: |
3030
export RUSTFLAGS="-Zinstrument-coverage"
3131
export RUSTDOCFLAGS="-Zinstrument-coverage -Zunstable-options --persist-doctests target/debug/doctestbins"
32-
cargo +nightly build --verbose --all --features="no-overflow-test","serde-serialize"
33-
LLVM_PROFILE_FILE="lattice_qcd_rs-%p-%m.profraw" cargo +nightly test --verbose --features="no-overflow-test","serde-serialize" --workspace --exclude lattice_qcd_rs-procedural_macro
32+
cargo +nightly build --verbose --all --no-default-features --features="serde-serialize"
33+
LLVM_PROFILE_FILE="lattice_qcd_rs-%p-%m.profraw" cargo +nightly test --verbose --no-default-features --features="serde-serialize" --workspace --exclude lattice_qcd_rs-procedural_macro
3434
3535
- name: parse code coverage
3636
run: ./grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: cargo test --all --verbose --features serde-serialize
3333

3434
- name: Build no features
35-
run: cargo build --all --verbose --no-default-features
35+
run: cargo build --all --verbose --no-default-features --features overflow-test
3636

3737
- name: Run tests no features
38-
run: cargo test --all --verbose --no-default-features
38+
run: cargo test --all --verbose --no-default-features --features overflow-test

.github/workflows/rust_beta.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: cargo test --all --verbose --features serde-serialize
2929

3030
- name: Build beta no features
31-
run: cargo build --all --verbose --no-default-features
31+
run: cargo build --all --verbose --no-default-features --features overflow-test
3232

3333
- name: Run tests beta no features
34-
run: cargo test --all --verbose --no-default-features
34+
run: cargo test --all --verbose --no-default-features --features overflow-test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ Cargo.lock
1111
data/
1212
.vscode/settings.json
1313
logo.png
14+
rust-toolchain.toml

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11

22
# v0.3.0
33

4+
## breaking changes
5+
- [`SymplecticEulerError`](https://abouttefeux.github.io/lattice-qcd-rs/lattice_qcd_rs/integrator/symplectic_euler/enum.SymplecticEulerError.html) is now marked `#[non_exhaustive]`
6+
- change the feature "no-overflow-test" to "overflow-test" and enabling "overflow-test" by default
7+
8+
## non breaking
49
- update dependencies
510
- remove the extern crate declaration in lib.rs
11+
- correct documentation
612

713
# v0.2.1
814

Cargo.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,24 @@ description = "Lattice QCD simulation"
1010
keywords = ["QCD", "Lattice", "Monte-Carlo", "chromodynamics"]
1111
publish = true
1212
license = "MIT OR Apache-2.0"
13-
rust-version = "1.61"
13+
rust-version = "1.72"
14+
1415

1516
[lib]
1617
path = "src/lib.rs"
1718
crate-type = ["lib"]
1819

20+
1921
[features]
2022
serde-serialize = ["dep:serde", "nalgebra/serde-serialize"]
21-
no-overflow-test = []
22-
default = ["serde-serialize"]
23+
overflow-test = []
24+
default = ["serde-serialize", "overflow-test"]
25+
2326

2427
[workspace]
2528
members = ["procedural_macro"]
2629

30+
2731
[dependencies]
2832
nalgebra = { version = "0.32", features = ["serde-serialize"] }
2933
approx = "0.5.1"
@@ -35,15 +39,18 @@ rayon = "1.7"
3539
serde = { version = "1.0", features = ["derive"], optional = true }
3640
lattice_qcd_rs-procedural_macro = { path = "procedural_macro", version = "0.3.0" }
3741

42+
3843
[dev-dependencies]
3944
criterion = "0.5.1"
4045
version-sync = "0.9.4"
4146

47+
4248
[[bench]]
4349
name = "bench"
4450
path = "benches/bench.rs"
4551
harness = false
4652

53+
4754
[profile.test]
4855
opt-level = 2 # in order to have resonable test time
4956

benches/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ fn criterion_benchmark(c: &mut Criterion) {
199199
LatticeStateDefault::<4>::new_determinist(1_f64, 1_f64, *i, &mut rng).unwrap();
200200
let d = rand_distr::Normal::new(0.0, 0.5_f64).unwrap();
201201
let e_field = EField::new_determinist(state.lattice(), &mut rng, &d);
202-
e_field.project_to_gauss(state.link_matrix(), state.lattice());
202+
let _ = e_field.project_to_gauss(state.link_matrix(), state.lattice());
203203
})
204204
});
205205
}

clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
avoid-breaking-exported-api = false

procedural_macro/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ name = "lattice_qcd_rs-procedural_macro"
33
version = "0.3.0"
44
authors = ["Aliénore Bouttefeux <alienore.bouttefeux@gmail.com>"]
55
edition = "2021"
6-
description = "Set of procedural macro for the main library lattice_qcd_rs"
6+
readme = "README.md"
77
repository = "https://github.com/ABouttefeux/lattice-qcd-rs/"
8-
license = "MIT OR Apache-2.0"
8+
categories = ["Science", "Simulation"]
9+
description = "Set of procedural macro for the main library lattice_qcd_rs"
10+
keywords = ["QCD", "Lattice", "Monte-Carlo", "chromodynamics", "macro"]
911
publish = true
12+
license = "MIT OR Apache-2.0"
1013

1114
[lib]
1215
proc-macro = true

0 commit comments

Comments
 (0)