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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ chrono = { version = "0.4", features = ["serde"] }
indexmap = { version = "2.7", features = ["serde"] }
ndarray = { version = "0.17", features = ["serde"] }
internment = { version = "0.8", features = ["serde"] }
pyo3 = "0.27"
pyo3 = "0.28"
num-traits = "0.2"
auto_ops = "0.3"
numpy = "0.27"
numpy = "0.28"
itertools = "0.14"
statrs = "0.18"
bincode = { version = "2.0", features = ["serde"] }
Expand Down
18 changes: 9 additions & 9 deletions python/rateslib/enums/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@
if TYPE_CHECKING:
pass

rateslib.rs.PyFloatFixingMethod_RFRPaymentDelay = rateslib.rs.FloatFixingMethod.RFRPaymentDelay # type: ignore[attr-defined]
rateslib.rs.PyFloatFixingMethod_RFRObservationShift = ( # type: ignore[attr-defined]
rateslib.rs.RFRPaymentDelay = rateslib.rs.FloatFixingMethod.RFRPaymentDelay # type: ignore[attr-defined]
rateslib.rs.RFRObservationShift = ( # type: ignore[attr-defined]
rateslib.rs.FloatFixingMethod.RFRObservationShift
)
rateslib.rs.PyFloatFixingMethod_RFRLockout = rateslib.rs.FloatFixingMethod.RFRLockout # type: ignore[attr-defined]
rateslib.rs.PyFloatFixingMethod_RFRLookback = rateslib.rs.FloatFixingMethod.RFRLookback # type: ignore[attr-defined]
rateslib.rs.PyFloatFixingMethod_RFRPaymentDelayAverage = ( # type: ignore[attr-defined]
rateslib.rs.RFRLockout = rateslib.rs.FloatFixingMethod.RFRLockout # type: ignore[attr-defined]
rateslib.rs.RFRLookback = rateslib.rs.FloatFixingMethod.RFRLookback # type: ignore[attr-defined]
rateslib.rs.RFRPaymentDelayAverage = ( # type: ignore[attr-defined]
rateslib.rs.FloatFixingMethod.RFRPaymentDelayAverage
)
rateslib.rs.PyFloatFixingMethod_RFRObservationShiftAverage = ( # type: ignore[attr-defined]
rateslib.rs.RFRObservationShiftAverage = ( # type: ignore[attr-defined]
rateslib.rs.FloatFixingMethod.RFRObservationShiftAverage
)
rateslib.rs.PyFloatFixingMethod_RFRLockoutAverage = rateslib.rs.FloatFixingMethod.RFRLockoutAverage # type: ignore[attr-defined]
rateslib.rs.PyFloatFixingMethod_RFRLookbackAverage = ( # type: ignore[attr-defined]
rateslib.rs.RFRLockoutAverage = rateslib.rs.FloatFixingMethod.RFRLockoutAverage # type: ignore[attr-defined]
rateslib.rs.RFRLookbackAverage = ( # type: ignore[attr-defined]
rateslib.rs.FloatFixingMethod.RFRLookbackAverage
)
rateslib.rs.PyFloatFixingMethod_IBOR = rateslib.rs.FloatFixingMethod.IBOR # type: ignore[attr-defined]
rateslib.rs.IBOR = rateslib.rs.FloatFixingMethod.IBOR # type: ignore[attr-defined]


class OptionType(float, Enum):
Expand Down
44 changes: 22 additions & 22 deletions python/rateslib/scheduling/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@
from rateslib.scheduling.schedule import Schedule

# Patch the namespace for pyo3 pickling: see https://github.com/PyO3/pyo3/discussions/5226
rateslib.rs.RollDay_Day = rateslib.rs.RollDay.Day # type: ignore[attr-defined]
rateslib.rs.RollDay_IMM = rateslib.rs.RollDay.IMM # type: ignore[attr-defined]

rateslib.rs.PyAdjuster_Actual = rateslib.rs.Adjuster.Actual # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_Following = rateslib.rs.Adjuster.Following # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_ModifiedFollowing = rateslib.rs.Adjuster.ModifiedFollowing # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_Previous = rateslib.rs.Adjuster.Previous # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_ModifiedPrevious = rateslib.rs.Adjuster.ModifiedPrevious # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_FollowingSettle = rateslib.rs.Adjuster.FollowingSettle # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_ModifiedFollowingSettle = rateslib.rs.Adjuster.ModifiedFollowingSettle # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_PreviousSettle = rateslib.rs.Adjuster.PreviousSettle # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_ModifiedPreviousSettle = rateslib.rs.Adjuster.ModifiedPreviousSettle # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_BusDaysLagSettle = rateslib.rs.Adjuster.BusDaysLagSettle # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_CalDaysLagSettle = rateslib.rs.Adjuster.CalDaysLagSettle # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_FollowingExLast = rateslib.rs.Adjuster.FollowingExLast # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_FollowingExLastSettle = rateslib.rs.Adjuster.FollowingExLastSettle # type: ignore[attr-defined]
rateslib.rs.PyAdjuster_BusDaysLagSettleInAdvance = rateslib.rs.Adjuster.BusDaysLagSettleInAdvance # type: ignore[attr-defined]

rateslib.rs.Frequency_CalDays = rateslib.rs.Frequency.CalDays # type: ignore[attr-defined]
rateslib.rs.Frequency_BusDays = rateslib.rs.Frequency.BusDays # type: ignore[attr-defined]
rateslib.rs.Frequency_Months = rateslib.rs.Frequency.Months # type: ignore[attr-defined]
rateslib.rs.Frequency_Zero = rateslib.rs.Frequency.Zero # type: ignore[attr-defined]
rateslib.rs.Day = rateslib.rs.RollDay.Day # type: ignore[attr-defined]
rateslib.rs.IMM = rateslib.rs.RollDay.IMM # type: ignore[attr-defined]

rateslib.rs.Actual = rateslib.rs.Adjuster.Actual # type: ignore[attr-defined]
rateslib.rs.Following = rateslib.rs.Adjuster.Following # type: ignore[attr-defined]
rateslib.rs.ModifiedFollowing = rateslib.rs.Adjuster.ModifiedFollowing # type: ignore[attr-defined]
rateslib.rs.Previous = rateslib.rs.Adjuster.Previous # type: ignore[attr-defined]
rateslib.rs.ModifiedPrevious = rateslib.rs.Adjuster.ModifiedPrevious # type: ignore[attr-defined]
rateslib.rs.FollowingSettle = rateslib.rs.Adjuster.FollowingSettle # type: ignore[attr-defined]
rateslib.rs.ModifiedFollowingSettle = rateslib.rs.Adjuster.ModifiedFollowingSettle # type: ignore[attr-defined]
rateslib.rs.PreviousSettle = rateslib.rs.Adjuster.PreviousSettle # type: ignore[attr-defined]
rateslib.rs.ModifiedPreviousSettle = rateslib.rs.Adjuster.ModifiedPreviousSettle # type: ignore[attr-defined]
rateslib.rs.BusDaysLagSettle = rateslib.rs.Adjuster.BusDaysLagSettle # type: ignore[attr-defined]
rateslib.rs.CalDaysLagSettle = rateslib.rs.Adjuster.CalDaysLagSettle # type: ignore[attr-defined]
rateslib.rs.FollowingExLast = rateslib.rs.Adjuster.FollowingExLast # type: ignore[attr-defined]
rateslib.rs.FollowingExLastSettle = rateslib.rs.Adjuster.FollowingExLastSettle # type: ignore[attr-defined]
rateslib.rs.BusDaysLagSettleInAdvance = rateslib.rs.Adjuster.BusDaysLagSettleInAdvance # type: ignore[attr-defined]

rateslib.rs.CalDays = rateslib.rs.Frequency.CalDays # type: ignore[attr-defined]
rateslib.rs.BusDays = rateslib.rs.Frequency.BusDays # type: ignore[attr-defined]
rateslib.rs.Months = rateslib.rs.Frequency.Months # type: ignore[attr-defined]
rateslib.rs.Zero = rateslib.rs.Frequency.Zero # type: ignore[attr-defined]

Imm.__doc__ = """
Enumerable type for International Money-Market (IMM) date definitions.
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_splines.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def test_dual_float_raises() -> None:
_0 = Dual(0.0, [], [])
y0, y1 = Dual(0.0, ["y0"], []), Dual(0.0, ["y1"], [])
y2, y3 = Dual(2.0, ["y2"], []), Dual(2.0, ["y3"], [])
with pytest.raises(TypeError, match="argument 'y': 'float' object cannot be"):
with pytest.raises(TypeError, match="argument 'y': 'float' object is not an instance of 'Dua"):
sp.csolve([0, 0, 1, 3, 4, 4], [0.0, y0, y1, y2, y3, _0], 2, 2, False)


Expand Down
2 changes: 1 addition & 1 deletion rust/curves/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct CurveDF<T: CurveInterpolation, U: DateRoll> {
}

/// A rule to adjust a non-business day to a business day.
#[pyclass(module = "rateslib.rs", eq, eq_int)]
#[pyclass(module = "rateslib.rs", eq, eq_int, from_py_object)]
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Modifier {
/// Actual: date is unchanged, even if it is a non-business day.
Expand Down
2 changes: 1 addition & 1 deletion rust/curves/curve_py.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl CurveInterpolation for CurveInterpolator {
}
}

#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Deserialize, Serialize)]
pub(crate) struct Curve {
inner: CurveDF<CurveInterpolator, Calendar>,
Expand Down
2 changes: 1 addition & 1 deletion rust/curves/interpolation/intp_flat_backward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use serde::{Deserialize, Serialize};
use std::cmp::PartialEq;

/// Define flat backward interpolation of nodes.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct FlatBackwardInterpolator {}

Expand Down
2 changes: 1 addition & 1 deletion rust/curves/interpolation/intp_flat_forward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use serde::{Deserialize, Serialize};
use std::cmp::PartialEq;

/// Define flat forward interpolation of nodes.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct FlatForwardInterpolator {}

Expand Down
2 changes: 1 addition & 1 deletion rust/curves/interpolation/intp_linear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use serde::{Deserialize, Serialize};
use std::cmp::PartialEq;

/// Define linear interpolation of nodes.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct LinearInterpolator {}

Expand Down
2 changes: 1 addition & 1 deletion rust/curves/interpolation/intp_linear_zero_rate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use std::cmp::PartialEq;
/// Define linear zero rate interpolation of nodes.
///
/// This interpolation can only be used with discount factors node values.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct LinearZeroRateInterpolator {}

Expand Down
2 changes: 1 addition & 1 deletion rust/curves/interpolation/intp_log_cubic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use serde::{Deserialize, Serialize};
use std::cmp::PartialEq;

/// Define log-linear interpolation of nodes.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct LogCubicInterpolator<T: NumberMapping> {
spline: T
Expand Down
2 changes: 1 addition & 1 deletion rust/curves/interpolation/intp_log_linear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use serde::{Deserialize, Serialize};
use std::cmp::PartialEq;

/// Define log-linear interpolation of nodes.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct LogLinearInterpolator {}

Expand Down
2 changes: 1 addition & 1 deletion rust/curves/interpolation/intp_null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use std::cmp::PartialEq;
/// Define a null interpolation object.
///
/// This is used by PyO3 binding to indicate interpolation occurs in Python.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct NullInterpolator {}

Expand Down
4 changes: 2 additions & 2 deletions rust/dual/dual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use std::cmp::PartialEq;
use std::sync::Arc;

/// A dual number data type supporting first order derivatives.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
pub struct Dual {
pub(crate) real: f64,
Expand All @@ -31,7 +31,7 @@ pub struct Dual {
}

/// A dual number data type supporting second order derivatives.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
pub struct Dual2 {
pub(crate) real: f64,
Expand Down
2 changes: 1 addition & 1 deletion rust/dual/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use pyo3::{pyclass, FromPyObject, IntoPyObject, PyErr};
use serde::{Deserialize, Serialize};

/// Defines the order of gradients available in a calculation with AD.
#[pyclass(module = "rateslib.rs", eq, eq_int)]
#[pyclass(module = "rateslib.rs", eq, eq_int, from_py_object)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
pub enum ADOrder {
/// Floating point arithmetic only.
Expand Down
2 changes: 1 addition & 1 deletion rust/enums/py/float_fixing_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use pyo3::types::PyTuple;
use serde::{Deserialize, Serialize};

/// Python wrapper for Adjuster to facilitate complex enum pickling.
#[pyclass(module = "rateslib.rs", name = "FloatFixingMethod", eq)]
#[pyclass(module = "rateslib.rs", name = "FloatFixingMethod", eq, from_py_object)]
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
pub(crate) enum PyFloatFixingMethod {
#[pyo3(constructor = (_u8=0))]
Expand Down
2 changes: 1 addition & 1 deletion rust/fx/rates/ccy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use pyo3::{pyclass, PyErr};
use serde::{Deserialize, Serialize};

/// A currency identified by 3-ascii ISO code.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize)]
pub struct Ccy {
pub(crate) name: Intern<String>,
Expand Down
2 changes: 1 addition & 1 deletion rust/fx/rates/fxrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use pyo3::{pyclass, PyErr};
use serde::{Deserialize, Serialize};

/// An FX rate containing `FXPair`, `rate` and `settlement` info.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct FXRate {
pub(crate) pair: FXPair,
Expand Down
2 changes: 1 addition & 1 deletion rust/fx/rates/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub(crate) mod fxrate;
pub use crate::fx::rates::fxrate::FXRate;

/// A multi-currency FX market deriving all crosses from a vector of `FXRate`s.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(from = "FXRatesDataModel")]
pub struct FXRates {
Expand Down
2 changes: 1 addition & 1 deletion rust/scheduling/calendars/cal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::scheduling::calendars::named::{get_holidays_by_name, get_weekmask_by_
use crate::scheduling::{ndt, CalendarAdjustment, DateRoll, NamedCal, UnionCal};

/// A basic business day calendar containing holidays.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Cal {
/// A vector of specific dates that are defined as **non-business** days.
Expand Down
2 changes: 1 addition & 1 deletion rust/scheduling/calendars/named_cal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use serde::{Deserialize, Serialize};
use crate::scheduling::{Cal, CalendarAdjustment, DateRoll, UnionCal};

/// A wrapper for a UnionCal struct specified by a string representation.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(from = "NamedCalDataModel")]
pub struct NamedCal {
Expand Down
2 changes: 1 addition & 1 deletion rust/scheduling/calendars/union_cal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::scheduling::{ndt, Cal, CalendarAdjustment, DateRoll};
/// - A **settleable day** is such if it is a *business day* in each one of the
/// `settlement_calendars`, otherwise every calendar day is a *settleable day*.
/// - A **settleable business day** is both a *business day* and a *settleable day*.
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Default, Debug, Serialize, Deserialize)]
pub struct UnionCal {
/// A vector of [Cal] used to determine **business** days.
Expand Down
2 changes: 1 addition & 1 deletion rust/scheduling/convention.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::scheduling::{
};

/// Specifier for day count conventions
#[pyclass(module = "rateslib.rs", eq, eq_int, hash, frozen)]
#[pyclass(module = "rateslib.rs", eq, eq_int, hash, frozen, from_py_object)]
#[derive(Debug, Hash, Copy, Clone, Serialize, Deserialize, PartialEq)]
pub enum Convention {
/// Actual days in period divided by 365.
Expand Down
2 changes: 1 addition & 1 deletion rust/scheduling/frequency/frequency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use pyo3::{pyclass, PyErr};
use serde::{Deserialize, Serialize};

/// Specifier for generating unadjusted scheduling periods.
#[pyclass(module = "rateslib.rs", eq)]
#[pyclass(module = "rateslib.rs", eq, from_py_object)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum Frequency {
/// A set number of business days, defined by a [`Calendar`], which can only align with a
Expand Down
2 changes: 1 addition & 1 deletion rust/scheduling/frequency/imm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use std::cmp::{Eq, PartialEq};
use crate::scheduling::ndt;

/// Specifier for IMM date definitions.
#[pyclass(module = "rateslib.rs", eq)]
#[pyclass(module = "rateslib.rs", eq, from_py_object)]
#[derive(Debug, Copy, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum Imm {
/// 3rd Wednesday of March, June, September and December.
Expand Down
2 changes: 1 addition & 1 deletion rust/scheduling/frequency/rollday.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::cmp::{Eq, PartialEq};
use crate::scheduling::{Adjuster, Adjustment, Calendar, Imm};

/// A roll-day used with a [`Frequency::Months`](crate::scheduling::Frequency) variant.
#[pyclass(module = "rateslib.rs", eq)]
#[pyclass(module = "rateslib.rs", eq, from_py_object)]
#[derive(Debug, Copy, Hash, Clone, PartialEq, Eq, Deserialize, Serialize)]
pub enum RollDay {
/// A day of the month in [1, 31].
Expand Down
2 changes: 1 addition & 1 deletion rust/scheduling/py/adjuster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use serde::{Deserialize, Serialize};
use std::collections::HashMap;

/// Python wrapper for Adjuster to facilitate complex enum pickling.
#[pyclass(module = "rateslib.rs", name = "Adjuster", eq)]
#[pyclass(module = "rateslib.rs", name = "Adjuster", eq, from_py_object)]
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
pub(crate) enum PyAdjuster {
#[pyo3(constructor = (_u8=0))]
Expand Down
4 changes: 2 additions & 2 deletions rust/scheduling/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use pyo3::{pyclass, PyErr};
use serde::{Deserialize, Serialize};

/// Specifier used by [`Schedule::try_new_inferred`] to instruct its inference logic.
#[pyclass(module = "rateslib.rs", eq, eq_int)]
#[pyclass(module = "rateslib.rs", eq, eq_int, from_py_object)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum StubInference {
/// Short front stub inference.
Expand All @@ -43,7 +43,7 @@ pub enum StubInference {
/// - An **irregular** schedule has a ``ufront_stub`` and/or ``uback_stub`` dates defining periods
/// at the boundary of the schedule which are not a standard length of time defined by the
/// [`Frequency`]. However, a regular schedule must exist between those interior dates.
#[pyclass(module = "rateslib.rs", eq)]
#[pyclass(module = "rateslib.rs", eq, from_py_object)]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(from = "ScheduleDataModel")]
pub struct Schedule {
Expand Down
6 changes: 3 additions & 3 deletions rust/splines/spline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,21 +412,21 @@ where
}

/// Definitive [f64] type variant of a [PPSpline].
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Deserialize, Serialize)]
pub struct PPSplineF64 {
pub(crate) inner: PPSpline<f64>,
}

/// Definitive [Dual] type variant of a [PPSpline].
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Deserialize, Serialize)]
pub struct PPSplineDual {
pub(crate) inner: PPSpline<Dual>,
}

/// Definitive [Dual2] type variant of a [PPSpline].
#[pyclass(module = "rateslib.rs")]
#[pyclass(module = "rateslib.rs", from_py_object)]
#[derive(Clone, Deserialize, Serialize)]
pub struct PPSplineDual2 {
pub(crate) inner: PPSpline<Dual2>,
Expand Down