repo_id stringclasses 400
values | commit_sha stringclasses 400
values | commit_index int32 0 951 | in_repo_split stringclasses 1
value | cross_repo_split stringclasses 1
value | test_file stringlengths 7 121 | test_function stringlengths 1 108 | assertion_type stringclasses 32
values | difficulty stringclasses 8
values | context_lines int32 3 600 | prefix large_stringlengths 44 113k | target large_stringlengths 1 498 | anchor_sha stringclasses 400
values | anchor_index int32 0 951 | qna_source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_create_rave_torque.py | test_torque_bound_barret | assert | collection | 24 | import pytest
import toppra
import numpy as np
def barret_robot(rave_env):
rave_env.Reset()
rave_env.Load("data/lab1.env.xml")
robot = rave_env.GetRobots()[0]
yield robot
@pytest.mark.parametrize("dof", [3, 5, 7])
def test_torque_bound_barret(barret_robot, dof):
barret_robot.SetActiveDOFs(range(do... | (2 * dof, dof) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_joint_acceleration.py | test_constraint_params | assert | none_literal | 56 | import pytest
import numpy as np
import numpy.testing as npt
import toppra as ta
import toppra.constraint as constraint
from toppra.constants import JACC_MAXU
def create_acceleration_pc_fixtures(request):
""" Parameterized Acceleration path constraint.
Return:
-------
data: A tuple. Contains path, s... | None | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_joint_acceleration.py | test_constraint_params | assert_* | complex_expr | 70 | import pytest
import numpy as np
import numpy.testing as npt
import toppra as ta
import toppra.constraint as constraint
from toppra.constants import JACC_MAXU
def create_acceleration_pc_fixtures(request):
""" Parameterized Acceleration path constraint.
Return:
-------
data: A tuple. Contains path, s... | ps[i]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_joint_acceleration.py | test_constraint_params | assert_* | complex_expr | 71 | import pytest
import numpy as np
import numpy.testing as npt
import toppra as ta
import toppra.constraint as constraint
from toppra.constants import JACC_MAXU
def create_acceleration_pc_fixtures(request):
""" Parameterized Acceleration path constraint.
Return:
-------
data: A tuple. Contains path, s... | pss[i]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_joint_acceleration.py | test_wrong_dimension | pytest.raises | variable | 51 | import pytest
import numpy as np
import numpy.testing as npt
import toppra as ta
import toppra.constraint as constraint
from toppra.constants import JACC_MAXU
def create_acceleration_pc_fixtures(request):
""" Parameterized Acceleration path constraint.
Return:
-------
data: A tuple. Contains path, s... | ValueError) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_joint_acceleration.py | test_constraint_type | assert | complex_expr | 52 | import pytest
import numpy as np
import numpy.testing as npt
import toppra as ta
import toppra.constraint as constraint
from toppra.constants import JACC_MAXU
def create_acceleration_pc_fixtures(request):
""" Parameterized Acceleration path constraint.
Return:
-------
data: A tuple. Contains path, s... | constraint.ConstraintType.CanonicalLinear | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_joint_acceleration.py | test_wrong_dimension | assert | string_literal | 53 | import pytest
import numpy as np
import numpy.testing as npt
import toppra as ta
import toppra.constraint as constraint
from toppra.constants import JACC_MAXU
def create_acceleration_pc_fixtures(request):
""" Parameterized Acceleration path constraint.
Return:
-------
data: A tuple. Contains path, s... | "Wrong dimension: constraint dof ({:d}) not equal to path dof ({:d})".format( pc.get_dof(), 10 ) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_robust_can_linear.py | test_basic | assert | numeric_literal | 27 | import toppra
import pytest
import numpy as np
def accel_constraint(request):
dof = 5
np.random.seed(0)
alim_ = np.random.rand(5)
alim = np.vstack((-alim_, alim_)).T
constraint = toppra.constraint.JointAccelerationConstraint(alim)
np.random.seed(0)
path = toppra.SplineInterpolator(np.linsp... | 5 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_robust_can_linear.py | test_negative_perb | pytest.raises | variable | 20 | import toppra
import pytest
import numpy as np
def accel_constraint(request):
dof = 5
np.random.seed(0)
alim_ = np.random.rand(5)
alim = np.vstack((-alim_, alim_)).T
constraint = toppra.constraint.JointAccelerationConstraint(alim)
np.random.seed(0)
path = toppra.SplineInterpolator(np.linsp... | ValueError) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_robust_can_linear.py | test_basic | assert_* | func_call | 44 | import toppra
import pytest
import numpy as np
def accel_constraint(request):
dof = 5
np.random.seed(0)
alim_ = np.random.rand(5)
alim = np.vstack((-alim_, alim_)).T
constraint = toppra.constraint.JointAccelerationConstraint(alim)
np.random.seed(0)
path = toppra.SplineInterpolator(np.linsp... | F0.dot(a0[i])) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_robust_can_linear.py | test_basic | assert_* | func_call | 45 | import toppra
import pytest
import numpy as np
def accel_constraint(request):
dof = 5
np.random.seed(0)
alim_ = np.random.rand(5)
alim = np.vstack((-alim_, alim_)).T
constraint = toppra.constraint.JointAccelerationConstraint(alim)
np.random.seed(0)
path = toppra.SplineInterpolator(np.linsp... | F0.dot(b0[i])) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_robust_can_linear.py | test_basic | assert_* | func_call | 46 | import toppra
import pytest
import numpy as np
def accel_constraint(request):
dof = 5
np.random.seed(0)
alim_ = np.random.rand(5)
alim = np.vstack((-alim_, alim_)).T
constraint = toppra.constraint.JointAccelerationConstraint(alim)
np.random.seed(0)
path = toppra.SplineInterpolator(np.linsp... | F0.dot(c0[i]) - g0) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_robust_can_linear.py | test_basic | assert_* | func_call | 49 | import toppra
import pytest
import numpy as np
def accel_constraint(request):
dof = 5
np.random.seed(0)
alim_ = np.random.rand(5)
alim = np.vstack((-alim_, alim_)).T
constraint = toppra.constraint.JointAccelerationConstraint(alim)
np.random.seed(0)
path = toppra.SplineInterpolator(np.linsp... | np.diag([0.1, 2, .3])) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_robust_can_linear.py | test_negative_perb | assert | string_literal | 22 | import toppra
import pytest
import numpy as np
def accel_constraint(request):
dof = 5
np.random.seed(0)
alim_ = np.random.rand(5)
alim = np.vstack((-alim_, alim_)).T
constraint = toppra.constraint.JointAccelerationConstraint(alim)
np.random.seed(0)
path = toppra.SplineInterpolator(np.linsp... | "Perturbation must be non-negative. Input {:}".format([-0.1, 2, .3]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_second_order.py | test_assemble_ABCFg | assert_* | complex_expr | 56 | import pytest
import numpy as np
import toppra
def coefficients_functions():
"Coefficients for the equation: A(q) ddot q + dot q B(q) dot q + C(q) = w"
def A(q):
return np.array([[np.sin(q[0]), 0],
[np.cos(q[1]), q[0] + q[1]]])
def B(q):
ret = np.zeros((2, 2, 2))
... | a[i]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_second_order.py | test_assemble_ABCFg | assert_* | complex_expr | 57 | import pytest
import numpy as np
import toppra
def coefficients_functions():
"Coefficients for the equation: A(q) ddot q + dot q B(q) dot q + C(q) = w"
def A(q):
return np.array([[np.sin(q[0]), 0],
[np.cos(q[1]), q[0] + q[1]]])
def B(q):
ret = np.zeros((2, 2, 2))
... | b[i]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_second_order.py | test_assemble_ABCFg | assert_* | complex_expr | 58 | import pytest
import numpy as np
import toppra
def coefficients_functions():
"Coefficients for the equation: A(q) ddot q + dot q B(q) dot q + C(q) = w"
def A(q):
return np.array([[np.sin(q[0]), 0],
[np.cos(q[1]), q[0] + q[1]]])
def B(q):
ret = np.zeros((2, 2, 2))
... | c[i]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_second_order.py | test_assemble_ABCFg | assert_* | complex_expr | 59 | import pytest
import numpy as np
import toppra
def coefficients_functions():
"Coefficients for the equation: A(q) ddot q + dot q B(q) dot q + C(q) = w"
def A(q):
return np.array([[np.sin(q[0]), 0],
[np.cos(q[1]), q[0] + q[1]]])
def B(q):
ret = np.zeros((2, 2, 2))
... | F[i]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_second_order.py | test_assemble_ABCFg | assert_* | complex_expr | 60 | import pytest
import numpy as np
import toppra
def coefficients_functions():
"Coefficients for the equation: A(q) ddot q + dot q B(q) dot q + C(q) = w"
def A(q):
return np.array([[np.sin(q[0]), 0],
[np.cos(q[1]), q[0] + q[1]]])
def B(q):
ret = np.zeros((2, 2, 2))
... | g[i]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_second_order.py | test_wrong_dimension | pytest.raises | variable | 40 | import pytest
import numpy as np
import toppra
def coefficients_functions():
"Coefficients for the equation: A(q) ddot q + dot q B(q) dot q + C(q) = w"
def A(q):
return np.array([[np.sin(q[0]), 0],
[np.cos(q[1]), q[0] + q[1]]])
def B(q):
ret = np.zeros((2, 2, 2))
... | AssertionError) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/constraint/test_second_order.py | test_wrong_dimension | assert | string_literal | 42 | import pytest
import numpy as np
import toppra
def coefficients_functions():
"Coefficients for the equation: A(q) ddot q + dot q B(q) dot q + C(q) = w"
def A(q):
return np.array([[np.sin(q[0]), 0],
[np.cos(q[1]), q[0] + q[1]]])
def B(q):
ret = np.zeros((2, 2, 2))
... | "Wrong dimension: constraint dof ({:d}) not equal to path dof ({:d})".format( constraint.get_dof(), 10 ) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_poly_interpolator.py | test_scalar | assert | numeric_literal | 10 | import numpy as np
import numpy.testing as npt
from toppra import PolynomialPath
class Test_PolynomialInterpolator(object):
def test_scalar(self):
pi = PolynomialPath([1, 2, 3], s_start=0, s_end=2) # 1 + 2s + 3s^2
assert pi.dof == | 1 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_poly_interpolator.py | test_2_dof | assert | numeric_literal | 12 | import numpy as np
import numpy.testing as npt
from toppra import PolynomialPath
class Test_PolynomialInterpolator(object):
def test_2_dof(self):
pi = PolynomialPath([[1, 2, 3], [-2, 3, 4, 5]])
# [1 + 2s + 3s^2]
# [-2 + 3s + 4s^2 + 5s^3]
assert pi.dof == | 2 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_poly_interpolator.py | test_scalar | assert_* | collection | 12 | import numpy as np
import numpy.testing as npt
from toppra import PolynomialPath
class Test_PolynomialInterpolator(object):
def test_scalar(self):
pi = PolynomialPath([1, 2, 3], s_start=0, s_end=2) # 1 + 2s + 3s^2
assert pi.dof == 1
npt.assert_allclose(pi.eval([0, 0.5, 1]), [1, 2.75, 6])
... | [2, 5, 8]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_poly_interpolator.py | test_scalar | assert_* | collection | 13 | import numpy as np
import numpy.testing as npt
from toppra import PolynomialPath
class Test_PolynomialInterpolator(object):
def test_scalar(self):
pi = PolynomialPath([1, 2, 3], s_start=0, s_end=2) # 1 + 2s + 3s^2
assert pi.dof == 1
npt.assert_allclose(pi.eval([0, 0.5, 1]), [1, 2.75, 6])
... | [6, 6, 6]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_poly_interpolator.py | test_scalar | assert_* | complex_expr | 14 | import numpy as np
import numpy.testing as npt
from toppra import PolynomialPath
class Test_PolynomialInterpolator(object):
def test_scalar(self):
pi = PolynomialPath([1, 2, 3], s_start=0, s_end=2) # 1 + 2s + 3s^2
assert pi.dof == 1
npt.assert_allclose(pi.eval([0, 0.5, 1]), [1, 2.75, 6])
... | np.r_[0, 2]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_poly_interpolator.py | test_scalar | assert_* | collection | 11 | import numpy as np
import numpy.testing as npt
from toppra import PolynomialPath
class Test_PolynomialInterpolator(object):
def test_scalar(self):
pi = PolynomialPath([1, 2, 3], s_start=0, s_end=2) # 1 + 2s + 3s^2
assert pi.dof == 1
npt.assert_allclose(pi.eval([0, 0.5, 1]), | [1, 2.75, 6]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_poly_interpolator.py | test_2_dof | assert_* | collection | 17 | import numpy as np
import numpy.testing as npt
from toppra import PolynomialPath
class Test_PolynomialInterpolator(object):
def test_2_dof(self):
pi = PolynomialPath([[1, 2, 3], [-2, 3, 4, 5]])
# [1 + 2s + 3s^2]
# [-2 + 3s + 4s^2 + 5s^3]
assert pi.dof == 2
npt.assert_allclo... | [[6, 8], [6, 23], [6, 38]]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_poly_interpolator.py | test_2_dof | assert_* | collection | 15 | import numpy as np
import numpy.testing as npt
from toppra import PolynomialPath
class Test_PolynomialInterpolator(object):
def test_2_dof(self):
pi = PolynomialPath([[1, 2, 3], [-2, 3, 4, 5]])
# [1 + 2s + 3s^2]
# [-2 + 3s + 4s^2 + 5s^3]
assert pi.dof == 2
npt.assert_allclo... | [[2, 3], [5, 10.75], [8, 26]]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_poly_interpolator.py | test_2_dof | assert_* | collection | 13 | import numpy as np
import numpy.testing as npt
from toppra import PolynomialPath
class Test_PolynomialInterpolator(object):
def test_2_dof(self):
pi = PolynomialPath([[1, 2, 3], [-2, 3, 4, 5]])
# [1 + 2s + 3s^2]
# [-2 + 3s + 4s^2 + 5s^3]
assert pi.dof == 2
npt.assert_allcl... | [[1, -2], [2.75, 1.125], [6, 10]]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_rave_trajectory.py | test_consistency | assert_* | variable | 55 | import numpy as np
import pytest
import toppra
def env():
env = orpy.Environment()
env.Load('data/lab1.env.xml')
env.GetRobots()[0].SetActiveDOFs(range(7))
yield env
env.Destroy()
@pytest.mark.skipif(not FOUND_OPENRAVE, reason="Not found openrave installation")
@pytest.mark.parametrize("traj_stri... | qs_ra) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_rave_trajectory.py | test_consistency | assert_* | variable | 56 | import numpy as np
import pytest
import toppra
def env():
env = orpy.Environment()
env.Load('data/lab1.env.xml')
env.GetRobots()[0].SetActiveDOFs(range(7))
yield env
env.Destroy()
@pytest.mark.skipif(not FOUND_OPENRAVE, reason="Not found openrave installation")
@pytest.mark.parametrize("traj_stri... | qds_ra) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_rave_trajectory.py | test_consistency | assert_* | variable | 58 | import numpy as np
import pytest
import toppra
def env():
env = orpy.Environment()
env.Load('data/lab1.env.xml')
env.GetRobots()[0].SetActiveDOFs(range(7))
yield env
env.Destroy()
@pytest.mark.skipif(not FOUND_OPENRAVE, reason="Not found openrave installation")
@pytest.mark.parametrize("traj_stri... | qdds_ra) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_scalar | assert | numeric_literal | 33 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | 1 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_5_dof | assert | numeric_literal | 32 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | 5 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_1waypoints | assert | numeric_literal | 29 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | 3 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_scalar | assert | collection | 38 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | () | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_2waypoints | assert_* | variable | 33 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | xs) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_2waypoints | assert_* | variable | 34 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | yd) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_5_dof | assert | collection | 33 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | (10, 5) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_compute_rave_trajectory | assert_* | variable | 60 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | qs_rave) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_compute_rave_trajectory | assert_* | variable | 61 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | qds_rave) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_compute_rave_trajectory | assert_* | variable | 62 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | qdds_rave) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_scalar | assert | collection | 35 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | (len(ss), ) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_5_dof | assert_* | complex_expr | 36 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | np.r_[0, 1]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_1waypoints | assert_* | complex_expr | 30 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | np.r_[0, 0]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_1waypoints | assert_* | complex_expr | 31 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | np.r_[1, 2, 3]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_1waypoints | assert_* | complex_expr | 32 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | np.r_[0, 0, 0]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/interpolators/test_spline_interpolator.py | test_2waypoints | assert_* | func_call | 35 | import numpy as np
import numpy.testing as npt
import pytest
from toppra import SplineInterpolator
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# G... | np.zeros_like(ys[0])) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_desired_duration_algorithm.py | test_specific_duration_parametrization | assert_* | variable | 44 | import pytest
import numpy as np
import toppra
import toppra.constraint
toppra.setup_logging(level="INFO")
def velocity_acceleration_fixture(request):
""" A pair of velocity, acceleration constraints.
"""
np.random.seed(request.param)
vvlim_ = 5 * np.random.rand(5) + 0.1
valim_ = 20 * np.random.ra... | t_desired) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_general_cases.py | test_toppra_linear | assert | none_literal | 28 | import pytest
import numpy as np
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="INFO")
@pytest.mark.parametrize("solver_wrapper", ["cvxpy", "qpoases", "hotqpoases", "seidel"])
def test_toppra_linear(basic_constraints, basic_path, solver_wrapper):
"""Solve some basic problem insta... | None | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_general_cases.py | test_toppra_linear_compare | assert_* | complex_expr | 30 | import pytest
import numpy as np
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="INFO")
@pytest.mark.parametrize("solver_wrapper", [
"cvxpy,qpoases",
"qpoases,hotqpoases",
"qpoases,seidel",
"hotqpoases,seidel"
])
def test_toppra_linear_compare(basic_constraints, basic_... | K2[i]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_general_cases.py | test_toppra_linear_compare | assert_* | complex_expr | 36 | import pytest
import numpy as np
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="INFO")
@pytest.mark.parametrize("solver_wrapper", [
"cvxpy,qpoases",
"qpoases,hotqpoases",
"qpoases,seidel",
"hotqpoases,seidel"
])
def test_toppra_linear_compare(basic_constraints, basic_... | X2[i]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_general_cases.py | test_toppra_linear_compare | assert_* | complex_expr | 42 | import pytest
import numpy as np
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="INFO")
@pytest.mark.parametrize("solver_wrapper", [
"cvxpy,qpoases",
"qpoases,hotqpoases",
"qpoases,seidel",
"hotqpoases,seidel"
])
def test_toppra_linear_compare(basic_constraints, basic_... | sd2[i]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_retime_scaling.py | test_linear_case1 | assert_* | complex_expr | 25 | import pytest
import numpy as np
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="INFO")
@pytest.mark.parametrize("solver_wrapper", ["cvxpy", "hotqpoases", "seidel"])
def test_linear_case1(basic_constraints, basic_path, solver_wrapper):
"""A generic test case.
Compare scaling ... | traj05.duration) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_retime_wconic_constraints.py | test_toppra_conic | assert | none_literal | 43 | import pytest
import numpy as np
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="INFO")
def vel_accel_robustaccel(request):
"Velocity + Acceleration + Robust Acceleration constraint"
dtype_a, dtype_ra = request.param
vlims = np.array([[-1, 1], [-1, 2], [-1, 4]], dtype=floa... | None | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_retime_with_openrave.py | test_retime_kinematics_ravetraj | assert | numeric_literal | 47 | import pytest
import toppra
import numpy as np
toppra.setup_logging("DEBUG")
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# Generate IKFast if nee... | 2 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_retime_with_openrave.py | test_retime_kinematics_ravetraj | assert | none_literal | 52 | import pytest
import toppra
import numpy as np
toppra.setup_logging("DEBUG")
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# Generate IKFast if nee... | None | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_retime_with_openrave.py | test_retime_kinematics_ravetraj | assert | func_call | 58 | import pytest
import toppra
import numpy as np
toppra.setup_logging("DEBUG")
def robot_fixture():
env = orpy.Environment()
env.Load("data/lab1.env.xml")
robot = env.GetRobots()[0]
manipulator = robot.GetManipulators()[0]
robot.SetActiveDOFs(manipulator.GetArmIndices())
# Generate IKFast if nee... | traj.GetDuration() + 1 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_zero_motions.py | test_scalar_zero_motion | assert | none_literal | 38 | import pytest
import numpy as np
import toppra
toppra.setup_logging(level="INFO")
@pytest.mark.parametrize("scaling", [1e-3, 1e-4])
@pytest.mark.parametrize("Ngrid", [101, 501, 1001])
def test_scalar_zero_motion(scaling, Ngrid):
"""The simple zero motion trajectory
Note: Paths with very small displacement, l... | None | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/retime/test_zero_motions.py | test_scalar_zero_motion | assert | numeric_literal | 39 | import pytest
import numpy as np
import toppra
toppra.setup_logging(level="INFO")
@pytest.mark.parametrize("scaling", [1e-3, 1e-4])
@pytest.mark.parametrize("Ngrid", [101, 501, 1001])
def test_scalar_zero_motion(scaling, Ngrid):
"""The simple zero motion trajectory
Note: Paths with very small displacement, l... | 9e-4 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp1d.py | test_infeasible | assert | numeric_literal | 30 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
import pytest
testdata = [
(np.array([1.0, 2], dtype=float), np.array([]), np.array([]), -1.0, 1.0, 1, 3, 1, -2),
(np.array([1.0, 2], dtype=float), [], [], -1.0, 1.0, 1, 3, 1, -2),
(np.array([1.0, 2], dtype=float), None, None,... | 0 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp1d.py | test_correct | assert | variable | 32 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
import pytest
testdata = [
(np.array([1.0, 2], dtype=float), np.array([]), np.array([]), -1.0, 1.0, 1, 3, 1, -2),
(np.array([1.0, 2], dtype=float), [], [], -1.0, 1.0, 1, 3, 1, -2),
(np.array([1.0, 2], dtype=float), None, None,... | res_expected | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp1d.py | test_correct | assert | variable | 33 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
import pytest
testdata = [
(np.array([1.0, 2], dtype=float), np.array([]), np.array([]), -1.0, 1.0, 1, 3, 1, -2),
(np.array([1.0, 2], dtype=float), [], [], -1.0, 1.0, 1, 3, 1, -2),
(np.array([1.0, 2], dtype=float), None, None,... | optval_expected | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp1d.py | test_correct | assert | variable | 34 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
import pytest
testdata = [
(np.array([1.0, 2], dtype=float), np.array([]), np.array([]), -1.0, 1.0, 1, 3, 1, -2),
(np.array([1.0, 2], dtype=float), [], [], -1.0, 1.0, 1, 3, 1, -2),
(np.array([1.0, 2], dtype=float), None, None,... | optvar_expected | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp1d.py | test_correct | assert | variable | 35 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
import pytest
testdata = [
(np.array([1.0, 2], dtype=float), np.array([]), np.array([]), -1.0, 1.0, 1, 3, 1, -2),
(np.array([1.0, 2], dtype=float), [], [], -1.0, 1.0, 1, 3, 1, -2),
(np.array([1.0, 2], dtype=float), None, None,... | active_c_expected | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp2d.py | test_random_constraints | assert | numeric_literal | 81 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
from numpy import array
import pytest
import cvxpy as cvx
testdata_correct = [
([1, 2, 3.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
1, 6, [1, 1], [-2, -4]),
([-2, 2, 2.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
... | 1 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp2d.py | test_random_constraints | assert | numeric_literal | 85 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
from numpy import array
import pytest
import cvxpy as cvx
testdata_correct = [
([1, 2, 3.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
1, 6, [1, 1], [-2, -4]),
([-2, 2, 2.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
... | 0 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp2d.py | test_random_constraints | assert_* | complex_expr | 82 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
from numpy import array
import pytest
import cvxpy as cvx
testdata_correct = [
([1, 2, 3.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
1, 6, [1, 1], [-2, -4]),
([-2, 2, 2.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
... | prob.value) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp2d.py | test_correct | assert | variable | 64 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
from numpy import array
import pytest
import cvxpy as cvx
testdata_correct = [
([1, 2, 3.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
1, 6, [1, 1], [-2, -4]),
([-2, 2, 2.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
... | res_expected | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp2d.py | test_correct | assert_* | variable | 65 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
from numpy import array
import pytest
import cvxpy as cvx
testdata_correct = [
([1, 2, 3.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
1, 6, [1, 1], [-2, -4]),
([-2, 2, 2.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
... | optval_expected) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp2d.py | test_correct | assert_* | variable | 66 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
from numpy import array
import pytest
import cvxpy as cvx
testdata_correct = [
([1, 2, 3.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
1, 6, [1, 1], [-2, -4]),
([-2, 2, 2.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
... | optvar_expected) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp2d.py | test_correct | assert | func_call | 67 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
from numpy import array
import pytest
import cvxpy as cvx
testdata_correct = [
([1, 2, 3.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
1, 6, [1, 1], [-2, -4]),
([-2, 2, 2.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
... | set(active_c_expected) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp2d.py | test_random_constraints | assert_* | func_call | 83 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
from numpy import array
import pytest
import cvxpy as cvx
testdata_correct = [
([1, 2, 3.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
1, 6, [1, 1], [-2, -4]),
([-2, 2, 2.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
... | np.asarray(x.value).flatten()) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/seidel/test_lp2d.py | test_err2 | assert_* | func_call | 91 | import toppra.solverwrapper.cy_seidel_solverwrapper as seidel
import numpy as np
from numpy import array
import pytest
import cvxpy as cvx
testdata_correct = [
([1, 2, 3.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
1, 6, [1, 1], [-2, -4]),
([-2, 2, 2.0], None, None, None, [-1, -1], [1, 1], [-1, 1],
... | np.asarray(x.value).flatten()[1]) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/solverwrapper/test_basic_can_linear.py | compute_constraint_params | assert | numeric_literal | 22 | import pytest
import numpy as np
import numpy.testing as npt
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="INFO")
class RandomSecondOrderLinearConstraint(constraint.CanonicalLinearConstraint):
def __init__(self, dof, discretization_scheme=constraint.DiscretizationType.Collocat... | 1.0 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/solverwrapper/test_basic_can_linear.py | test_basic_init | assert_* | variable | 117 | import pytest
import numpy as np
import numpy.testing as npt
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="INFO")
def basic_init_fixture(request):
""" A fixture for testing basic capability of the solver wrapper.
This test case has only two constraints, one velocity constr... | actual) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/solverwrapper/test_basic_conic_can_linear.py | test_vel_robust_accel | assert | numeric_literal | 69 | import pytest
import numpy as np
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="DEBUG")
@pytest.mark.parametrize("i", [0, 5, 9])
@pytest.mark.parametrize("H", [None])
@pytest.mark.parametrize("g", [np.array([0.2, -1]), np.array([0.5, 1]), np.array([2.0, 1])])
@pytest.mark.parametrize... | 0 | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/solverwrapper/test_basic_conic_can_linear.py | test_compare_accel_robust_accel | assert_* | variable | 43 | import pytest
import numpy as np
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="DEBUG")
@pytest.mark.parametrize("i", [0, 5, 9])
@pytest.mark.parametrize("H", [np.array([[1.5, 0], [0, 1.0]]), None])
@pytest.mark.parametrize("g", [np.array([0.2, -1])])
@pytest.mark.parametrize("x_ineq... | ro_result) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/solverwrapper/test_basic_conic_can_linear.py | test_vel_robust_accel | assert_* | func_call | 66 | import pytest
import numpy as np
import toppra
import toppra.constraint as constraint
toppra.setup_logging(level="DEBUG")
@pytest.mark.parametrize("i", [0, 5, 9])
@pytest.mark.parametrize("H", [None])
@pytest.mark.parametrize("g", [np.array([0.2, -1]), np.array([0.5, 1]), np.array([2.0, 1])])
@pytest.mark.parametrize... | actual.flatten()) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hungpham2511/toppra | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | train | train | tests/solverwrapper/test_ecos_wrapper.py | test_linear_constraints_only | assert_* | variable | 28 | import pytest
import numpy as np
import toppra
import toppra.constraint as constraint
from toppra.solverwrapper.ecos_solverwrapper import ecosWrapper
from toppra.solverwrapper.qpoases_solverwrapper import qpOASESSolverWrapper
toppra.setup_logging(level="DEBUG")
@pytest.mark.parametrize("i", [0, 5, 9])
@pytest.mark.pa... | target_result) | 386881ea270237f11c5d43968628338ffe0050d5 | 43 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_command.py | test_call_handler_dispatch | assert | numeric_literal | 44 | import pytest
from unittest.mock import Mock, patch, AsyncMock, MagicMock
import asyncio
import sys
from pyprland.command import Pyprland, PyprError
def pyprland_app():
"""Fixture to create a Pyprland instance with mocked dependencies."""
with patch("pyprland.command.ipc_init"), patch("pyprland.command.get_log... | 1 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_command.py | test_call_handler_dispatch | assert | bool_literal | 42 | import pytest
from unittest.mock import Mock, patch, AsyncMock, MagicMock
import asyncio
import sys
from pyprland.command import Pyprland, PyprError
def pyprland_app():
"""Fixture to create a Pyprland instance with mocked dependencies."""
with patch("pyprland.command.ipc_init"), patch("pyprland.command.get_log... | True | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_command.py | test_load_config_toml | assert_* | bool_literal | 45 | import pytest
from unittest.mock import Mock, patch, AsyncMock, MagicMock
import asyncio
import sys
from pyprland.command import Pyprland, PyprError
def pyprland_app():
"""Fixture to create a Pyprland instance with mocked dependencies."""
with patch("pyprland.command.ipc_init"), patch("pyprland.command.get_log... | True) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_command.py | test_run_plugin_handler_success | assert_* | string_literal | 28 | import pytest
from unittest.mock import Mock, patch, AsyncMock, MagicMock
import asyncio
import sys
from pyprland.command import Pyprland, PyprError
def pyprland_app():
"""Fixture to create a Pyprland instance with mocked dependencies."""
with patch("pyprland.command.ipc_init"), patch("pyprland.command.get_log... | "arg1") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_command.py | test_load_config_toml | assert | variable | 42 | import pytest
from unittest.mock import Mock, patch, AsyncMock, MagicMock
import asyncio
import sys
from pyprland.command import Pyprland, PyprError
def pyprland_app():
"""Fixture to create a Pyprland instance with mocked dependencies."""
with patch("pyprland.command.ipc_init"), patch("pyprland.command.get_log... | mock_toml | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_command.py | test_load_config_json_fallback | assert | variable | 44 | import pytest
from unittest.mock import Mock, patch, AsyncMock, MagicMock
import asyncio
import sys
from pyprland.command import Pyprland, PyprError
def pyprland_app():
"""Fixture to create a Pyprland instance with mocked dependencies."""
with patch("pyprland.command.ipc_init"), patch("pyprland.command.get_log... | mock_json | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_command.py | test_load_config_missing | pytest.raises | variable | 20 | import pytest
from unittest.mock import Mock, patch, AsyncMock, MagicMock
import asyncio
import sys
from pyprland.command import Pyprland, PyprError
def pyprland_app():
"""Fixture to create a Pyprland instance with mocked dependencies."""
with patch("pyprland.command.ipc_init"), patch("pyprland.command.get_log... | PyprError) | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_command.py | test_read_command_socket | assert_* | string_literal | 31 | import pytest
from unittest.mock import Mock, patch, AsyncMock, MagicMock
import asyncio
import sys
from pyprland.command import Pyprland, PyprError
def pyprland_app():
"""Fixture to create a Pyprland instance with mocked dependencies."""
with patch("pyprland.command.ipc_init"), patch("pyprland.command.get_log... | "run_reload") | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_command.py | test_load_config_toml_with_notify | assert | complex_expr | 40 | import pytest
from unittest.mock import Mock, patch, AsyncMock, MagicMock
import asyncio
import sys
from pyprland.command import Pyprland, PyprError
def pyprland_app():
"""Fixture to create a Pyprland instance with mocked dependencies."""
with patch("pyprland.command.ipc_init"), patch("pyprland.command.get_log... | pyprland_app.plugins | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_types.py | test_version_info_init | assert | numeric_literal | 6 | from pyprland.models import VersionInfo
def test_version_info_init():
v = VersionInfo(1, 2, 3)
assert v.major == | 1 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_types.py | test_version_info_init | assert | numeric_literal | 7 | from pyprland.models import VersionInfo
def test_version_info_init():
v = VersionInfo(1, 2, 3)
assert v.major == 1
assert v.minor == | 2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_types.py | test_version_info_init | assert | numeric_literal | 8 | from pyprland.models import VersionInfo
def test_version_info_init():
v = VersionInfo(1, 2, 3)
assert v.major == 1
assert v.minor == 2
assert v.micro == | 3 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_types.py | test_version_info_defaults | assert | numeric_literal | 6 | from pyprland.models import VersionInfo
def test_version_info_defaults():
v = VersionInfo()
assert v.major == | 0 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_types.py | test_version_info_compare_major | assert | variable | 7 | from pyprland.models import VersionInfo
def test_version_info_compare_major():
v1 = VersionInfo(1, 0, 0)
v2 = VersionInfo(0, 9, 9)
assert v1 > | v2 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_types.py | test_version_info_compare_major | assert | variable | 8 | from pyprland.models import VersionInfo
def test_version_info_compare_major():
v1 = VersionInfo(1, 0, 0)
v2 = VersionInfo(0, 9, 9)
assert v1 > v2
assert v2 < | v1 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_types.py | test_version_info_equality | assert | variable | 9 | from pyprland.models import VersionInfo
def test_version_info_equality():
v1 = VersionInfo(1, 2, 3)
v2 = VersionInfo(1, 2, 3)
v3 = VersionInfo(1, 2, 4)
assert v1 == v2
assert v1 != | v3 | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_utils.py | test_is_rotated | assert | bool_literal | 6 | import pytest
from pyprland.common import merge, apply_filter, is_rotated
def test_is_rotated():
assert is_rotated({"transform": 1}) is | True | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_utils.py | test_is_rotated | assert | bool_literal | 11 | import pytest
from pyprland.common import merge, apply_filter, is_rotated
def test_is_rotated():
assert is_rotated({"transform": 1}) is True
assert is_rotated({"transform": 3}) is True
assert is_rotated({"transform": 5}) is True
assert is_rotated({"transform": 7}) is True
assert is_rotated({"tran... | False | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
hyprland-community/pyprland | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | train | train | tests/test_common_utils.py | test_apply_filter_empty | assert | string_literal | 6 | import pytest
from pyprland.common import merge, apply_filter, is_rotated
def test_apply_filter_empty():
assert apply_filter("hello", "") == | "hello" | 1ad5eacf8cae1f52bc20557d9e20942eca379b00 | 78 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.