epignatelli / navix

Accelerated minigrid environments with JAX
Apache License 2.0
103 stars 7 forks source link

Fix walkable #84

Closed epignatelli closed 2 months ago

epignatelli commented 2 months ago

Fixes #82

@danieljarne this should be fixed. Would you mind cross-checking that on your side as well?

github-actions[bot] commented 2 months ago
************* Module navix._version
navix/_version.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module navix.actions
navix/actions.py:300:0: C0301: Line too long (107/100) (line-too-long)
navix/actions.py:301:0: C0301: Line too long (119/100) (line-too-long)
navix/actions.py:337:0: C0301: Line too long (113/100) (line-too-long)
navix/actions.py:337:0: C0301: Line too long (113/100) (line-too-long)
navix/actions.py:248:0: W0622: Redefining built-in 'open' (redefined-builtin)
navix/actions.py:66:56: W0640: Cell variable k defined in loop (cell-var-from-loop)
navix/actions.py:224:14: W0612: Unused variable 'events' (unused-variable)
navix/actions.py:275:4: W0621: Redefining name 'open' from outer scope (line 248) (redefined-outer-name)
navix/actions.py:320:0: W0105: String statement has no effect (pointless-string-statement)
navix/actions.py:30:0: W0611: Unused Player imported from entities (unused-import)
************* Module navix.environments.lava_gap
navix/environments/lava_gap.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/lava_gap.py:39:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/lava_gap.py:40:4: R0914: Too many local variables (19/15) (too-many-locals)
************* Module tests.test_issues
tests/test_issues.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_issues.py:29:0: C0116: Missing function or method docstring (missing-function-docstring)

Report
======
169 statements analysed.

Statistics by type
------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |4      |NC         |NC         |25.00       |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |1      |NC         |NC         |0.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |1      |NC         |NC         |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |16     |NC         |NC         |93.75       |0.00     |
+---------+-------+-----------+-----------+------------+---------+

External dependencies
---------------------
::

    navix (tests.test_issues)
      \-components (navix.environments.lava_gap)
      \-entities (navix.environments.lava_gap)
      \-grid (navix.environments.lava_gap)
      \-observations (navix.environments.lava_gap,tests.test_issues)
      \-rendering 
      | \-cache (navix.environments.lava_gap)
      \-rewards (navix.environments.lava_gap)
      \-states (navix.environments.lava_gap)
      \-terminations (navix.environments.lava_gap)

583 lines have been analyzed

Raw metrics
-----------

+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |282    |48.37 |NC       |NC         |
+----------+-------+------+---------+-----------+
|docstring |99     |16.98 |NC       |NC         |
+----------+-------+------+---------+-----------+
|comment   |95     |16.30 |NC       |NC         |
+----------+-------+------+---------+-----------+
|empty     |107    |18.35 |NC       |NC         |
+----------+-------+------+---------+-----------+

Duplication
-----------

+-------------------------+------+---------+-----------+
|                         |now   |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines      |0     |NC       |NC         |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |NC       |NC         |
+-------------------------+------+---------+-----------+

Messages by category
--------------------

+-----------+-------+---------+-----------+
|type       |number |previous |difference |
+===========+=======+=========+===========+
|convention |9      |NC       |NC         |
+-----------+-------+---------+-----------+
|refactor   |1      |NC       |NC         |
+-----------+-------+---------+-----------+
|warning    |6      |NC       |NC         |
+-----------+-------+---------+-----------+
|error      |0      |NC       |NC         |
+-----------+-------+---------+-----------+

% errors / warnings by module
-----------------------------

+----------------------------+------+--------+---------+-----------+
|module                      |error |warning |refactor |convention |
+============================+======+========+=========+===========+
|navix.actions               |0.00  |100.00  |0.00     |44.44      |
+----------------------------+------+--------+---------+-----------+
|navix.environments.lava_gap |0.00  |0.00    |100.00   |22.22      |
+----------------------------+------+--------+---------+-----------+
|tests.test_issues           |0.00  |0.00    |0.00     |22.22      |
+----------------------------+------+--------+---------+-----------+
|navix._version              |0.00  |0.00    |0.00     |11.11      |
+----------------------------+------+--------+---------+-----------+

Messages
--------

+---------------------------+------------+
|message id                 |occurrences |
+===========================+============+
|line-too-long              |4           |
+---------------------------+------------+
|missing-module-docstring   |3           |
+---------------------------+------------+
|unused-variable            |1           |
+---------------------------+------------+
|unused-import              |1           |
+---------------------------+------------+
|too-many-locals            |1           |
+---------------------------+------------+
|redefined-outer-name       |1           |
+---------------------------+------------+
|redefined-builtin          |1           |
+---------------------------+------------+
|pointless-string-statement |1           |
+---------------------------+------------+
|missing-function-docstring |1           |
+---------------------------+------------+
|missing-class-docstring    |1           |
+---------------------------+------------+
|cell-var-from-loop         |1           |
+---------------------------+------------+

-----------------------------------
Your code has been rated at 9.05/10
epignatelli commented 2 months ago

Since this is quite foundational, I merged the fix, but let me know if there is any issue.

danieljarne commented 2 months ago

Fixed :) thanks for the fast reaction!

epignatelli commented 2 months ago

No problem, thanks for flagging this, instead!