From bb5ffd3f6a880ad471e0808c7749a9dd007677c4 Mon Sep 17 00:00:00 2001 From: Christopher Rabotin Date: Sat, 26 Oct 2024 23:47:47 -0600 Subject: [PATCH] Fix build in prep for anise 0.5 --- Cargo.toml | 11 ++++------- src/lib.rs | 7 +++---- src/mc/multivariate.rs | 2 +- src/od/estimate/kfestimate.rs | 2 +- src/od/estimate/sc_uncertainty.rs | 2 +- src/od/filter/kalman.rs | 2 +- src/od/process/export.rs | 2 +- tests/mission_design/orbitaldyn.rs | 2 +- tests/propagation/stopcond.rs | 2 +- 9 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 46ec7cca..3c3d8611 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,8 +37,8 @@ gitlab = { repository = "nyx-space/nyx", branch = "master" } [dependencies] nalgebra = "0.33" log = "0.4" -hifitime = "4.0.0-alpha" -# anise = "0.4.0" +hifitime = "4.0.0" +# anise = "0.5.0" # UNRELEASED anise = { git = "https://github.com/nyx-space/anise.git", branch = "master" } flate2 = { version = "1.0", features = [ "rust_backend", @@ -56,9 +56,6 @@ rayon = "1.6" lazy_static = "1.4.0" approx = "0.5" rand_pcg = "0.3" -pyo3 = { version = "0.21", optional = true, features = ["extension-module"] } -pyo3-log = { version = "0.10", optional = true } -numpy = { version = "0.21", optional = true } indicatif = { version = "0.17", features = ["rayon"] } rstats = "2.0.1" parquet = { version = "53.0.0", default-features = false, features = [ @@ -74,7 +71,6 @@ num = "0.4.0" enum-iterator = "2.0.0" getrandom = { version = "0.2", features = ["js"] } typed-builder = "0.20.0" -pythonize = { version = "0.21", optional = true } snafu = { version = "0.8.3", features = ["backtrace"] } serde_dhall = "0.12" @@ -90,7 +86,8 @@ shadow-rs = "0.35.0" [features] default = [] -python = ["pyo3", "pyo3-log", "hifitime/python", "numpy", "pythonize"] +# python = ["pyo3", "pyo3-log", "hifitime/python", "numpy", "pythonize"] +python = [] [lib] crate-type = ["cdylib", "rlib"] diff --git a/src/lib.rs b/src/lib.rs index 505eddd4..0c7fcdfe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,7 +28,6 @@ Refer to [nyxspace.com](https://nyxspace.com) for a user guide, a show case, the #[macro_use] extern crate log; -extern crate nalgebra as na; /// Provides all the propagators / integrators available in `nyx`. pub mod propagators; @@ -74,14 +73,14 @@ pub mod time { /// Re-export nalgebra pub mod linalg { - pub use na::base::*; + pub use nalgebra::base::*; } /// Re-export some useful things pub use self::cosmic::{Orbit, Spacecraft, State, TimeTagged}; -#[cfg(feature = "python")] -mod python; +// #[cfg(feature = "python")] +// mod python; /// The GMAT Earth gravitation parameter, used only for testing. #[cfg(test)] diff --git a/src/mc/multivariate.rs b/src/mc/multivariate.rs index c5b10e0c..3aa1dd82 100644 --- a/src/mc/multivariate.rs +++ b/src/mc/multivariate.rs @@ -23,7 +23,7 @@ use crate::errors::StateError; use crate::md::prelude::{BPlane, OrbitDual}; use crate::md::{AstroSnafu, StateParameter}; use crate::{pseudo_inverse, NyxError, Spacecraft, State}; -use na::{DMatrix, DVector, SMatrix, SVector}; +use nalgebra::{DMatrix, DVector, SMatrix, SVector}; use rand_distr::{Distribution, Normal}; use snafu::ResultExt; diff --git a/src/od/estimate/kfestimate.rs b/src/od/estimate/kfestimate.rs index a03d3826..f2b3ea00 100644 --- a/src/od/estimate/kfestimate.rs +++ b/src/od/estimate/kfestimate.rs @@ -24,8 +24,8 @@ use crate::mc::{MultivariateNormal, StateDispersion}; use crate::md::prelude::OrbitDual; use crate::md::StateParameter; use crate::Spacecraft; -use na::SMatrix; use nalgebra::Const; +use nalgebra::SMatrix; use rand::SeedableRng; use rand_distr::Distribution; use rand_pcg::Pcg64Mcg; diff --git a/src/od/estimate/sc_uncertainty.rs b/src/od/estimate/sc_uncertainty.rs index 2573378b..99fa3aaf 100644 --- a/src/od/estimate/sc_uncertainty.rs +++ b/src/od/estimate/sc_uncertainty.rs @@ -20,7 +20,7 @@ use core::fmt; use anise::errors::MathError; use anise::{astro::PhysicsResult, errors::PhysicsError}; -use na::{SMatrix, SVector}; +use nalgebra::{SMatrix, SVector}; use typed_builder::TypedBuilder; use crate::{dynamics::guidance::LocalFrame, Spacecraft}; diff --git a/src/od/filter/kalman.rs b/src/od/filter/kalman.rs index 86581b59..3ebca8ce 100644 --- a/src/od/filter/kalman.rs +++ b/src/od/filter/kalman.rs @@ -175,7 +175,7 @@ where + Allocator + Allocator<::Size, A> + Allocator::Size> - + Allocator, M>, + + Allocator, M>, ::Size>>::Buffer: Copy, ::Size, ::Size>>::Buffer: Copy, { diff --git a/src/od/process/export.rs b/src/od/process/export.rs index d2e778dc..abff5ab0 100644 --- a/src/od/process/export.rs +++ b/src/od/process/export.rs @@ -30,7 +30,7 @@ use arrow::datatypes::{DataType, Field, Schema}; use arrow::record_batch::RecordBatch; use filter::kalman::KF; use hifitime::TimeScale; -use na::Const; +use nalgebra::Const; use parquet::arrow::ArrowWriter; use snafu::prelude::*; use std::collections::HashMap; diff --git a/tests/mission_design/orbitaldyn.rs b/tests/mission_design/orbitaldyn.rs index 3da4ad4b..b100db77 100644 --- a/tests/mission_design/orbitaldyn.rs +++ b/tests/mission_design/orbitaldyn.rs @@ -4,7 +4,7 @@ extern crate nyx_space as nyx; use anise::constants::celestial_objects::{EARTH, JUPITER_BARYCENTER, MOON, SUN}; use anise::constants::frames::IAU_EARTH_FRAME; use hifitime::MJD_J2000; -use na::{Const, OMatrix}; +use nalgebra::{Const, OMatrix}; use nyx::cosmic::{assert_orbit_eq_or_abs, Orbit}; use nyx::dynamics::{Dynamics, OrbitalDynamics, PointMasses, SpacecraftDynamics}; use nyx::linalg::Vector6; diff --git a/tests/propagation/stopcond.rs b/tests/propagation/stopcond.rs index a3442517..c11a7364 100644 --- a/tests/propagation/stopcond.rs +++ b/tests/propagation/stopcond.rs @@ -8,7 +8,7 @@ use anise::constants::celestial_objects::{EARTH, SUN}; use anise::constants::frames::{EARTH_J2000, MOON_J2000}; use anise::prelude::Almanac; use hifitime::JD_J2000; -use na::Vector3; +use nalgebra::Vector3; use nyx::cosmic::Orbit; use nyx::dynamics::guidance::{FiniteBurns, LocalFrame, Mnvr, Thruster}; use nyx::dynamics::orbital::OrbitalDynamics;