Skip to content

Commit 7e56d35

Browse files
committed
Remove old code
1 parent 9d9f5a1 commit 7e56d35

4 files changed

Lines changed: 17 additions & 239 deletions

File tree

drone_models/drones.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""List of available drones.
2+
3+
TODO: Add description.
4+
"""
5+
6+
available_drones: tuple[str] = ("cf2x_L250",)

drone_models/utils/constants.py

Lines changed: 0 additions & 175 deletions
This file was deleted.

drone_models/utils/constants_controllers.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

tests/unit/test_models.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from drone_models import available_models, model_features
1717
from drone_models.core import parametrize
18-
from drone_models.utils.constants import available_drone_types
18+
from drone_models.drones import available_drones
1919

2020
if TYPE_CHECKING:
2121
from array_api_typing import Array
@@ -78,7 +78,7 @@ def test_model_features(model_name: str, model: Callable):
7878

7979
@pytest.mark.unit
8080
@pytest.mark.parametrize("model_name, model", available_models.items())
81-
@pytest.mark.parametrize("drone_type", available_drone_types)
81+
@pytest.mark.parametrize("drone_type", available_drones)
8282
def test_model_single_no_rotor_dynamics(model_name: str, model: Callable, drone_type: str):
8383
pos, quat, vel, ang_vel, _, _, _ = create_rnd_states()
8484
model = parametrize(model, drone_type)
@@ -96,7 +96,7 @@ def test_model_single_no_rotor_dynamics(model_name: str, model: Callable, drone_
9696

9797
@pytest.mark.unit
9898
@pytest.mark.parametrize("model_name, model", available_models.items())
99-
@pytest.mark.parametrize("drone_type", available_drone_types)
99+
@pytest.mark.parametrize("drone_type", available_drones)
100100
def test_model_single_rotor_dynamics(model_name: str, model: Callable, drone_type: str):
101101
skip_models_without_features(model, ["rotor_dynamics"])
102102
model = parametrize(model, drone_type)
@@ -113,7 +113,7 @@ def test_model_single_rotor_dynamics(model_name: str, model: Callable, drone_typ
113113

114114
@pytest.mark.unit
115115
@pytest.mark.parametrize("model_name, model", available_models.items())
116-
@pytest.mark.parametrize("drone_type", available_drone_types)
116+
@pytest.mark.parametrize("drone_type", available_drones)
117117
def test_model_single_external_wrench(model_name: str, model: Callable, drone_type: str):
118118
model = parametrize(model, drone_type)
119119
pos, quat, vel, ang_vel, rotor_vel, dist_f, dist_t = create_rnd_states()
@@ -130,7 +130,7 @@ def test_model_single_external_wrench(model_name: str, model: Callable, drone_ty
130130

131131
@pytest.mark.unit
132132
@pytest.mark.parametrize("model_name, model", available_models.items())
133-
@pytest.mark.parametrize("drone_type", available_drone_types)
133+
@pytest.mark.parametrize("drone_type", available_drones)
134134
def test_model_batched_no_rotor_dynamics(model_name: str, model: Callable, drone_type: str):
135135
model = parametrize(model, drone_type)
136136
batch_shape = (10, 5)
@@ -149,7 +149,7 @@ def test_model_batched_no_rotor_dynamics(model_name: str, model: Callable, drone
149149

150150
@pytest.mark.unit
151151
@pytest.mark.parametrize("model_name, model", available_models.items())
152-
@pytest.mark.parametrize("drone_type", available_drone_types)
152+
@pytest.mark.parametrize("drone_type", available_drones)
153153
def test_model_batched_rotor_dynamics(model_name: str, model: Callable, drone_type: str):
154154
skip_models_without_features(model, ["rotor_dynamics"])
155155
model = parametrize(model, drone_type)
@@ -167,7 +167,7 @@ def test_model_batched_rotor_dynamics(model_name: str, model: Callable, drone_ty
167167

168168
@pytest.mark.unit
169169
@pytest.mark.parametrize("model_name, model", available_models.items())
170-
@pytest.mark.parametrize("drone_type", available_drone_types)
170+
@pytest.mark.parametrize("drone_type", available_drones)
171171
def test_model_batched_external_wrench(model_name: str, model: Callable, drone_type: str):
172172
model = parametrize(model, drone_type)
173173

@@ -188,7 +188,7 @@ def test_model_batched_external_wrench(model_name: str, model: Callable, drone_t
188188

189189
@pytest.mark.unit
190190
@pytest.mark.parametrize("model_name, model", available_models.items())
191-
@pytest.mark.parametrize("drone_type", available_drone_types)
191+
@pytest.mark.parametrize("drone_type", available_drones)
192192
def test_symbolic_dynamics(model_name: str, model: Callable, drone_type: str):
193193
symbolic_dynamics = getattr(sys.modules[model.__module__], "symbolic_dynamics")
194194
symbolic_dynamics = parametrize(symbolic_dynamics, drone_type)
@@ -227,7 +227,7 @@ def test_symbolic_dynamics(model_name: str, model: Callable, drone_type: str):
227227

228228
@pytest.mark.unit
229229
@pytest.mark.parametrize("model_name, model", available_models.items())
230-
@pytest.mark.parametrize("drone_type", available_drone_types)
230+
@pytest.mark.parametrize("drone_type", available_drones)
231231
def test_symbolic_dynamics_external_wrench(model_name: str, model: Callable, drone_type: str):
232232
symbolic_dynamics = getattr(sys.modules[model.__module__], "symbolic_dynamics")
233233
symbolic_dynamics = parametrize(symbolic_dynamics, drone_type)
@@ -275,7 +275,7 @@ def test_symbolic_dynamics_external_wrench(model_name: str, model: Callable, dro
275275

276276
@pytest.mark.unit
277277
@pytest.mark.parametrize("model_name, model", available_models.items())
278-
@pytest.mark.parametrize("drone_type", available_drone_types)
278+
@pytest.mark.parametrize("drone_type", available_drones)
279279
def test_compare_batched_non_batched(model_name: str, model: Callable, drone_type: str):
280280
"""Tests if batching works and if the results are identical to the non-batched version."""
281281
model = parametrize(model, drone_type)
@@ -307,7 +307,7 @@ def test_compare_batched_non_batched(model_name: str, model: Callable, drone_typ
307307

308308
@pytest.mark.unit
309309
@pytest.mark.parametrize("model_name, model", available_models.items())
310-
@pytest.mark.parametrize("drone_type", available_drone_types)
310+
@pytest.mark.parametrize("drone_type", available_drones)
311311
def test_numeric_jit(model_name: str, model: Callable, drone_type: str):
312312
"""Tests if the models are jitable and if the results are identical to the array API ones."""
313313
model = parametrize(model, drone_type)

0 commit comments

Comments
 (0)