Skip to content
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
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
python -m pip install -e .
- name: Upload asdfspline.h header file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: header-file-${{ matrix.os }}
path: |
Expand All @@ -68,7 +68,7 @@ jobs:
run: |
python -m nbconvert --execute --to html *.ipynb
- name: Upload converted notebooks
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: notebooks-${{ matrix.os }}
path: |
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
msrv:
strategy:
matrix:
rust-version: ["1.61.0"]
rust-version: ["1.71.0"]
runs-on: ubuntu-latest
steps:
- name: Clone Git repository
Expand Down
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.0.0"
authors = ["Matthias Geier <Matthias.Geier@gmail.com>"]
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.71"

publish = false

Expand All @@ -12,5 +13,6 @@ members = ["ffi"]

[dependencies]
superslice = "1"
thiserror = "1.0"
nalgebra = "0.32"
thiserror = "2"
# 0.34 switches to edition 2024 and MSRV 1.84
nalgebra = "0.33"
5 changes: 3 additions & 2 deletions ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ crate-type = ["staticlib"]

[dependencies]
asdfspline = { path = ".." }
libc = "*"
libc = "0.2"
# This doesn't have to be the same version as used in the main crate:
nalgebra = "0.32"
# 0.34 switches to edition 2024 and MSRV 1.84
nalgebra = "0.33"
2 changes: 1 addition & 1 deletion ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ pub unsafe extern "C" fn asdf_monotonecubic_get_time(
let values = unsafe { ffi_slice(values, count) };
let output = unsafe { ffi_slice_mut(output.cast::<MaybeUninit<_>>(), count) };
for (val, out) in values.iter().zip(output) {
*out = MaybeUninit::new(curve.get_time(*val).unwrap_or(std::f32::NAN));
*out = MaybeUninit::new(curve.get_time(*val).unwrap_or(f32::NAN));
}
}

Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_PiecewiseMonotoneCubicSpline.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_values_errors():

def test_grid_errors():
with pytest.raises(ValueError, match='NaN.*not allowed in grid'):
PiecewiseMonotoneCubicSpline([0, 1], grid=[0, np.NaN])
PiecewiseMonotoneCubicSpline([0, 1], grid=[0, np.nan])
with pytest.raises(ValueError, match='grid.*must be strictly ascending'):
PiecewiseMonotoneCubicSpline([0, 1], grid=[0, 0])

Expand Down
2 changes: 1 addition & 1 deletion src/adapters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ where
let mut u_grid = Vec::new();
let mut u_missing = Vec::new();
for (i, &u) in inner.grid().iter().enumerate() {
if missing_times.iter().any(|&x| x == i) {
if missing_times.contains(&i) {
u_missing.push(u);
} else {
u_grid.push(u);
Expand Down
2 changes: 1 addition & 1 deletion src/piecewisecubiccurve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl<V: Vector> PiecewiseCubicCurve<V> {
let segments = segments.into();
let grid = grid.into();
use Error::*;
if segments.len() < 1 {
if segments.is_empty() {
return Err(ZeroSegments);
}
if segments.len() + 1 != grid.len() {
Expand Down