Skip to content

Commit

Permalink
Enabled flake8-requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
DiddiZ committed May 28, 2023
1 parent e2efb42 commit 9827e95
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
- flake8-future-annotations
- flake8-no-implicit-concat
- flake8-print
# - flake8-requirements
- flake8-requirements
- flake8-simplify
- flake8-use-fstring
- flake8-use-pathlib
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ per-file-ignores =
tests/*:D101,D102,ANN201
max-line-length = 120
docstring-convention = google
known-modules = donk.ai:[donk]

[isort]
line_length = 120
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"pandas~=1.5",
"tensorflow~=2.12",
"tensorflow-probability~=0.20",
"keras~=2.12",
"sympy~=1.12",
"tqdm",
],
Expand Down
2 changes: 1 addition & 1 deletion tests/costs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
from numpy.testing import assert_allclose

from tests.utils import random_spd
from .utils import random_spd


def _create_symbols(D):
Expand Down
2 changes: 1 addition & 1 deletion tests/data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from tests.data.data import load_state_controller_dataset
from .data import load_state_controller_dataset

__all__ = [
"load_state_controller_dataset",
Expand Down
2 changes: 1 addition & 1 deletion tests/dynamics_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
from numpy.testing import assert_allclose, assert_array_equal

from tests.utils import random_spd
from .utils import random_spd


class Test_LinearDynamics(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/policy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
from numpy.testing import assert_allclose

from tests.utils import random_spd
from .utils import random_spd


class Test_LinearGaussianPolicy(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/samples_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
from numpy.testing import assert_allclose, assert_array_equal

from tests.utils import random_spd
from .utils import random_spd


class Test_TransitionPool(unittest.TestCase):
Expand Down
15 changes: 10 additions & 5 deletions tests/traj_opt_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class Test_LQG(unittest.TestCase):
def test_forward(self):
from donk.samples import StateDistribution
from donk.traj_opt import lqg
from tests.utils import random_lq_pol, random_spd, random_tvlg

from .utils import random_lq_pol, random_spd, random_tvlg

T, dX, dU = 5, 3, 2
rng = np.random.default_rng(0)
Expand Down Expand Up @@ -65,7 +66,8 @@ def test_forward(self):
def test_backward(self):
from donk.costs import loss_l2
from donk.traj_opt import lqg
from tests.utils import random_tvlg

from .utils import random_tvlg

T, dX, dU = 5, 3, 2
rng = np.random.default_rng(0)
Expand All @@ -92,7 +94,8 @@ def test_backward(self):

def test_extended_cost(self):
from donk.traj_opt import lqg
from tests.utils import random_lq_pol

from .utils import random_lq_pol

T, dX, dU = 5, 2, 3
rng = np.random.default_rng(0)
Expand Down Expand Up @@ -132,7 +135,8 @@ def test_extended_cost(self):

def test_kl_divergence_action(self):
from donk.traj_opt import lqg
from tests.utils import random_lq_pol

from .utils import random_lq_pol

T, dX, dU = 5, 3, 2
rng = np.random.default_rng(0)
Expand All @@ -148,7 +152,8 @@ def test_kl_divergence_action(self):
class TrajectoryDistribution(unittest.TestCase):
def test_trajectory_distribution(self):
from donk.samples import TrajectoryDistribution
from tests.utils import random_spd

from .utils import random_spd

T, dX, dU = 5, 3, 2
rng = np.random.default_rng(0)
Expand Down
2 changes: 1 addition & 1 deletion tests/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
from numpy.testing import assert_allclose, assert_array_equal

from tests.utils import random_spd
from .utils import random_spd


class Test_Batches(unittest.TestCase):
Expand Down

0 comments on commit 9827e95

Please sign in to comment.