From efd20a29a5da80a47ce4528d3c4d1f0d74656b2a Mon Sep 17 00:00:00 2001 From: Kyle Cochran Date: Wed, 11 Oct 2023 00:41:17 +0000 Subject: [PATCH] refactor: rename state method in python to build_state --- .../OpenSpaceToolkitAstrodynamicsPy/Trajectory/StateBuilder.cpp | 2 +- bindings/python/test/trajectory/test_state_builder.py | 2 +- .../Astrodynamics/Trajectory/StateBuilder.test.cpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Trajectory/StateBuilder.cpp b/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Trajectory/StateBuilder.cpp index a4cb47b8d..cd81df008 100644 --- a/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Trajectory/StateBuilder.cpp +++ b/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Trajectory/StateBuilder.cpp @@ -36,7 +36,7 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Trajectory_StateBuilder(pybind11::mo .def("is_defined", &StateBuilder::isDefined) - .def("state", &StateBuilder::buildState) + .def("build_state", &StateBuilder::buildState) .def("get_coordinates_subsets", &StateBuilder::getCoordinatesSubsets) .def("get_frame", &StateBuilder::getFrame) diff --git a/bindings/python/test/trajectory/test_state_builder.py b/bindings/python/test/trajectory/test_state_builder.py index 327c8331b..84c956242 100644 --- a/bindings/python/test/trajectory/test_state_builder.py +++ b/bindings/python/test/trajectory/test_state_builder.py @@ -79,7 +79,7 @@ def test_build_state( state_builder: StateBuilder, ): coordinates = [1, 2, 3, 1, 2, 3] - state: State = state_builder.state(instant, coordinates) + state: State = state_builder.build_state(instant, coordinates) assert state is not None assert isinstance(state, State) diff --git a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/StateBuilder.test.cpp b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/StateBuilder.test.cpp index 3ad7abbf9..68f01353c 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/StateBuilder.test.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/StateBuilder.test.cpp @@ -82,6 +82,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Trajectory_StateBuilder, EqualToOperator) const StateBuilder anotherStateBuilder = {Frame::GCRF(), posVelMassBrokerSPtr}; EXPECT_FALSE(aStateBuilder == anotherStateBuilder); + EXPECT_FALSE(anotherStateBuilder == aStateBuilder); } {