epignatelli / navix

Accelerated minigrid environments with JAX
Apache License 2.0
116 stars 10 forks source link

Add examples and make sure obs match those in minigrid #59

Closed epignatelli closed 5 months ago

github-actions[bot] commented 5 months ago
************* Module ppo
baselines/ppo.py:1:0: C0114: Missing module docstring (missing-module-docstring)
baselines/ppo.py:16:0: C0116: Missing function or method docstring (missing-function-docstring)
baselines/ppo.py:16:0: C0103: Function name "FlattenObsWrapper" doesn't conform to snake_case naming style (invalid-name)
baselines/ppo.py:16:22: W0621: Redefining name 'env' from outer scope (line 44) (redefined-outer-name)
baselines/ppo.py:17:21: C3001: Lambda expression assigned to a variable. Define a function using the "def" keyword instead. (unnecessary-lambda-assignment)
baselines/ppo.py:26:0: C0115: Missing class docstring (missing-class-docstring)
baselines/ppo.py:7:0: C0412: Imports from package jax are not grouped (ungrouped-imports)
************* Module docs.performance
docs/performance.py:1:0: C0114: Missing module docstring (missing-module-docstring)
docs/performance.py:7:0: E0611: No name 'wrappers' in module 'minigrid' (no-name-in-module)
docs/performance.py:19:0: C0116: Missing function or method docstring (missing-function-docstring)
docs/performance.py:22:15: W0212: Access to a protected member _reset of a client class (protected-access)
docs/performance.py:32:0: C0116: Missing function or method docstring (missing-function-docstring)
docs/performance.py:32:21: W0613: Unused argument 'seed' (unused-argument)
docs/performance.py:41:17: W0612: Unused variable 'info' (unused-variable)
docs/performance.py:44:8: W0612: Unused variable 'timestep' (unused-variable)
docs/performance.py:53:8: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
docs/performance.py:64:10: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
docs/performance.py:68:8: W0108: Lambda may not be necessary (unnecessary-lambda)
docs/performance.py:74:8: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
docs/performance.py:5:0: C0411: third party import "gymnasium" should be placed before first party import "navix"  (wrong-import-order)
docs/performance.py:6:0: C0411: third party import "minigrid" should be placed before first party import "navix"  (wrong-import-order)
docs/performance.py:7:0: C0411: third party import "minigrid.wrappers.ImgObsWrapper" should be placed before first party import "navix"  (wrong-import-order)
docs/performance.py:8:0: C0411: standard import "random" should be placed before third party imports "jax", "jax.numpy", "gymnasium", "minigrid", "minigrid.wrappers.ImgObsWrapper" and first party import "navix"  (wrong-import-order)
docs/performance.py:9:0: C0411: standard import "time" should be placed before third party imports "jax", "jax.numpy", "gymnasium", "minigrid", "minigrid.wrappers.ImgObsWrapper" and first party import "navix"  (wrong-import-order)
docs/performance.py:11:0: C0411: standard import "timeit.timeit" should be placed before third party imports "jax", "jax.numpy", "gymnasium", "minigrid", "minigrid.wrappers.ImgObsWrapper" and first party import "navix"  (wrong-import-order)
docs/performance.py:6:0: W0611: Unused import minigrid (unused-import)
************* Module examples.ppo
examples/ppo.py:1:0: C0114: Missing module docstring (missing-module-docstring)
examples/ppo.py:15:0: C0115: Missing class docstring (missing-class-docstring)
examples/ppo.py:29:4: C0116: Missing function or method docstring (missing-function-docstring)
examples/ppo.py:29:4: C0103: Function name "FlattenObsWrapper" doesn't conform to snake_case naming style (invalid-name)
examples/ppo.py:29:26: W0621: Redefining name 'env' from outer scope (line 37) (redefined-outer-name)
examples/ppo.py:30:25: C3001: Lambda expression assigned to a variable. Define a function using the "def" keyword instead. (unnecessary-lambda-assignment)
************* Module navix.__init__
navix/__init__.py:39:0: C0304: Final newline missing (missing-final-newline)
************* Module navix
navix/__init__.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module navix._version
navix/_version.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module navix.actions
navix/actions.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/actions.py:177:0: W0622: Redefining built-in 'open' (redefined-builtin)
navix/actions.py:62:56: W0640: Cell variable k defined in loop (cell-var-from-loop)
navix/actions.py:87:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/actions.py:91:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/actions.py:95:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/actions.py:99:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/actions.py:104:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/actions.py:109:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/actions.py:114:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/actions.py:119:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/actions.py:160:14: W0612: Unused variable 'events' (unused-variable)
navix/actions.py:173:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/actions.py:199:4: W0621: Redefining name 'open' from outer scope (line 177) (redefined-outer-name)
navix/actions.py:223:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/actions.py:236:0: W0105: String statement has no effect (pointless-string-statement)
navix/actions.py:26:0: W0611: Unused Player imported from entities (unused-import)
************* Module navix.agents
navix/agents/__init__.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module navix.agents.agent
navix/agents/agent.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/agents/agent.py:9:0: C0115: Missing class docstring (missing-class-docstring)
navix/agents/agent.py:13:0: C0115: Missing class docstring (missing-class-docstring)
navix/agents/agent.py:16:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/agents/agent.py:19:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module navix.agents.models
navix/agents/models.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/agents/models.py:7:0: C0115: Missing class docstring (missing-class-docstring)
navix/agents/models.py:7:0: R0903: Too few public methods (1/2) (too-few-public-methods)
navix/agents/models.py:22:0: C0115: Missing class docstring (missing-class-docstring)
navix/agents/models.py:22:0: R0903: Too few public methods (1/2) (too-few-public-methods)
navix/agents/models.py:42:0: C0115: Missing class docstring (missing-class-docstring)
navix/agents/models.py:42:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module navix.agents.ppo
navix/agents/ppo.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/agents/ppo.py:28:0: C0115: Missing class docstring (missing-class-docstring)
navix/agents/ppo.py:28:0: R0902: Too many instance attributes (17/7) (too-many-instance-attributes)
navix/agents/ppo.py:65:0: C0115: Missing class docstring (missing-class-docstring)
navix/agents/ppo.py:65:0: R0903: Too few public methods (0/2) (too-few-public-methods)
navix/agents/ppo.py:77:0: C0115: Missing class docstring (missing-class-docstring)
navix/agents/ppo.py:77:0: R0903: Too few public methods (0/2) (too-few-public-methods)
navix/agents/ppo.py:84:0: C0115: Missing class docstring (missing-class-docstring)
navix/agents/ppo.py:89:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/agents/ppo.py:131:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/agents/ppo.py:148:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/agents/ppo.py:148:4: R0914: Too many local variables (21/15) (too-many-locals)
navix/agents/ppo.py:205:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/agents/ppo.py:216:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/agents/ppo.py:216:4: R0914: Too many local variables (16/15) (too-many-locals)
navix/agents/ppo.py:247:37: W0640: Cell variable n_samples defined in loop (cell-var-from-loop)
navix/agents/ppo.py:250:38: W0640: Cell variable permutation defined in loop (cell-var-from-loop)
navix/agents/ppo.py:266:28: W0108: Lambda may not be necessary (unnecessary-lambda)
navix/agents/ppo.py:331:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/agents/ppo.py:347:17: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
navix/agents/ppo.py:331:24: W0613: Unused argument 'inspectable' (unused-argument)
navix/agents/ppo.py:370:53: W0640: Cell variable step defined in loop (cell-var-from-loop)
navix/agents/ppo.py:12:0: C0411: standard import "typing.Dict" should be placed before third party imports "numpy", "jax", "jax.numpy", "optax" (wrong-import-order)
navix/agents/ppo.py:15:0: C0412: Imports from package flax are not grouped (ungrouped-imports)
************* Module navix.entities
navix/entities.py:228:0: C0301: Line too long (105/100) (line-too-long)
navix/entities.py:229:0: C0301: Line too long (112/100) (line-too-long)
navix/entities.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/entities.py:26:0: C0115: Missing class docstring (missing-class-docstring)
navix/entities.py:26:0: R0903: Too few public methods (0/2) (too-few-public-methods)
navix/entities.py:38:0: C0115: Missing class docstring (missing-class-docstring)
navix/entities.py:38:0: R0903: Too few public methods (0/2) (too-few-public-methods)
navix/entities.py:51:0: C0115: Missing class docstring (missing-class-docstring)
navix/entities.py:51:0: R0903: Too few public methods (0/2) (too-few-public-methods)
navix/entities.py:65:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:71:15: E1101: Instance of 'Field' has no 'shape' member (no-member)
navix/entities.py:74:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:75:15: E1101: Instance of 'Field' has no 'ndim' member (no-member)
navix/entities.py:78:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:82:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:90:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:120:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:154:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:178:30: E1101: Instance of 'Field' has no 'shape' member (no-member)
navix/entities.py:192:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:196:8: W0622: Redefining built-in 'id' (redefined-builtin)
navix/entities.py:216:30: E1101: Instance of 'Field' has no 'shape' member (no-member)
navix/entities.py:235:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:240:8: W0622: Redefining built-in 'open' (redefined-builtin)
navix/entities.py:267:30: E1101: Instance of 'Field' has no 'shape' member (no-member)
navix/entities.py:276:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:284:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:305:30: E1101: Instance of 'Field' has no 'shape' member (no-member)
navix/entities.py:318:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:341:30: E1101: Instance of 'Field' has no 'shape' member (no-member)
navix/entities.py:354:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/entities.py:377:30: E1101: Instance of 'Field' has no 'shape' member (no-member)
************* Module navix.environments
navix/environments/__init__.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module navix.environments.crossings
navix/environments/crossings.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/crossings.py:38:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/crossings.py:42:4: R0914: Too many local variables (24/15) (too-many-locals)
navix/environments/crossings.py:105:12: W0612: Unused variable 'i' (unused-variable)
navix/environments/crossings.py:106:16: W0612: Unused variable 'k3' (unused-variable)
************* Module navix.environments.dist_shift
navix/environments/dist_shift.py:110:82: C0303: Trailing whitespace (trailing-whitespace)
navix/environments/dist_shift.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/dist_shift.py:39:0: C0115: Missing class docstring (missing-class-docstring)
************* Module navix.environments.door_key
navix/environments/door_key.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/door_key.py:39:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/door_key.py:42:4: R0914: Too many local variables (29/15) (too-many-locals)
************* Module navix.environments.dynamic_obstacles
navix/environments/dynamic_obstacles.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/dynamic_obstacles.py:41:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/dynamic_obstacles.py:45:4: R0914: Too many local variables (17/15) (too-many-locals)
************* Module navix.environments.empty
navix/environments/empty.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/empty.py:39:0: C0115: Missing class docstring (missing-class-docstring)
************* Module navix.environments.environment
navix/environments/environment.py:53:0: C0301: Line too long (105/100) (line-too-long)
navix/environments/environment.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/environment.py:36:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/environment.py:36:0: R0903: Too few public methods (0/2) (too-few-public-methods)
navix/environments/environment.py:47:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/environment.py:63:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/environment.py:66:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/environment.py:69:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/environment.py:72:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/environment.py:75:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/environment.py:79:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/environment.py:105:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/environment.py:105:4: R0913: Too many arguments (12/5) (too-many-arguments)
navix/environments/environment.py:156:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/environment.py:162:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/environment.py:212:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/environment.py:223:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
navix/environments/environment.py:223:11: W0143: Comparing against a callable, did you omit the parenthesis? (comparison-with-callable)
navix/environments/environment.py:227:13: W0143: Comparing against a callable, did you omit the parenthesis? (comparison-with-callable)
navix/environments/environment.py:229:13: W0143: Comparing against a callable, did you omit the parenthesis? (comparison-with-callable)
navix/environments/environment.py:232:13: W0143: Comparing against a callable, did you omit the parenthesis? (comparison-with-callable)
navix/environments/environment.py:238:13: W0143: Comparing against a callable, did you omit the parenthesis? (comparison-with-callable)
navix/environments/environment.py:245:13: W0143: Comparing against a callable, did you omit the parenthesis? (comparison-with-callable)
navix/environments/environment.py:251:13: W0143: Comparing against a callable, did you omit the parenthesis? (comparison-with-callable)
navix/environments/environment.py:260:16: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
navix/environments/environment.py:220:4: R0911: Too many return statements (7/6) (too-many-return-statements)
************* Module navix.environments.four_rooms
navix/environments/four_rooms.py:115:82: C0303: Trailing whitespace (trailing-whitespace)
navix/environments/four_rooms.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/four_rooms.py:45:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/four_rooms.py:46:4: R0914: Too many local variables (20/15) (too-many-locals)
************* Module navix.environments.go_to_door
navix/environments/go_to_door.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/go_to_door.py:41:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/go_to_door.py:44:4: R0914: Too many local variables (30/15) (too-many-locals)
navix/environments/go_to_door.py:80:8: W0622: Redefining built-in 'open' (redefined-builtin)
************* Module navix.environments.key_corridor
navix/environments/key_corridor.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/key_corridor.py:41:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/key_corridor.py:42:4: R0914: Too many local variables (41/15) (too-many-locals)
navix/environments/key_corridor.py:79:30: W0622: Redefining built-in 'open' (redefined-builtin)
navix/environments/key_corridor.py:82:56: W0640: Cell variable k5 defined in loop (cell-var-from-loop)
navix/environments/key_corridor.py:76:24: W0612: Unused variable 'k8' (unused-variable)
navix/environments/key_corridor.py:100:21: W0612: Unused variable 'k11' (unused-variable)
************* 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 navix.environments.registry
navix/environments/registry.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/registry.py:26:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/registry.py:30:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/registry.py:34:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module navix.environments.wrappers
navix/environments/wrappers.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/environments/wrappers.py:16:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/wrappers.py:16:0: R0903: Too few public methods (0/2) (too-few-public-methods)
navix/environments/wrappers.py:21:0: C0115: Missing class docstring (missing-class-docstring)
navix/environments/wrappers.py:26:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/wrappers.py:30:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/wrappers.py:33:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/wrappers.py:33:27: W0613: Unused argument 'params' (unused-argument)
navix/environments/wrappers.py:36:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/wrappers.py:36:32: W0613: Unused argument 'params' (unused-argument)
navix/environments/wrappers.py:45:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/wrappers.py:46:30: W0613: Unused argument 'params' (unused-argument)
navix/environments/wrappers.py:54:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/environments/wrappers.py:55:14: W0613: Unused argument 'key' (unused-argument)
navix/environments/wrappers.py:55:65: W0613: Unused argument 'params' (unused-argument)
************* Module navix.experiment
navix/experiment.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/experiment.py:11:0: C0115: Missing class docstring (missing-class-docstring)
navix/experiment.py:12:4: R0913: Too many arguments (7/5) (too-many-arguments)
navix/experiment.py:28:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/experiment.py:51:47: W0640: Cell variable seed defined in loop (cell-var-from-loop)
navix/experiment.py:11:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module navix.grid
navix/grid.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/grid.py:36:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:40:38: W0621: Redefining name 'coordinates' from outer scope (line 36) (redefined-outer-name)
navix/grid.py:73:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:85:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:89:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:93:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:97:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:101:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:114:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:125:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:129:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:133:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:162:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:175:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:188:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:230:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:253:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:253:0: W0102: Dangerous default value {} as argument (dangerous-default-value)
navix/grid.py:268:0: C0115: Missing class docstring (missing-class-docstring)
navix/grid.py:273:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:288:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:301:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/grid.py:25:0: W0611: Unused List imported from typing (unused-import)
navix/grid.py:29:0: W0611: Unused jax.tree_util imported as jtu (unused-import)
************* Module navix.observations
navix/observations.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/observations.py:37:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/observations.py:37:9: W0613: Unused argument 'state' (unused-argument)
navix/observations.py:41:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/observations.py:53:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/observations.py:79:4: C0103: Variable name "H" doesn't conform to snake_case naming style (invalid-name)
navix/observations.py:79:7: C0103: Variable name "W" doesn't conform to snake_case naming style (invalid-name)
navix/observations.py:133:0: C0116: Missing function or method docstring (missing-function-docstring)
navix/observations.py:151:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module navix.rendering.registry
navix/rendering/registry.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/rendering/registry.py:52:0: C0115: Missing class docstring (missing-class-docstring)
navix/rendering/registry.py:61:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/rendering/registry.py:65:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/rendering/registry.py:69:0: C0115: Missing class docstring (missing-class-docstring)
navix/rendering/registry.py:86:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/rendering/registry.py:89:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/rendering/registry.py:92:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/rendering/registry.py:95:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/rendering/registry.py:101:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/rendering/registry.py:111:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/rendering/registry.py:121:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/rendering/registry.py:124:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/rendering/registry.py:130:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module navix.spaces
navix/spaces.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/spaces.py:27:0: C0115: Missing class docstring (missing-class-docstring)
navix/spaces.py:33:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/spaces.py:27:0: R0903: Too few public methods (1/2) (too-few-public-methods)
navix/spaces.py:37:0: C0115: Missing class docstring (missing-class-docstring)
navix/spaces.py:39:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/spaces.py:55:0: C0115: Missing class docstring (missing-class-docstring)
navix/spaces.py:57:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module navix.states
navix/states.py:1:0: C0114: Missing module docstring (missing-module-docstring)
navix/states.py:38:0: C0115: Missing class docstring (missing-class-docstring)
navix/states.py:38:0: R0903: Too few public methods (0/2) (too-few-public-methods)
navix/states.py:48:0: C0115: Missing class docstring (missing-class-docstring)
navix/states.py:64:0: C0115: Missing class docstring (missing-class-docstring)
navix/states.py:74:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:75:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
navix/states.py:83:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:84:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
navix/states.py:90:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:102:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:114:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:126:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:136:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:148:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:160:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:172:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:184:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:214:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:217:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:221:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:224:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:228:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:231:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:231:41: W0613: Unused argument 'idx' (unused-argument)
navix/states.py:236:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:239:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:243:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:246:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:250:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:253:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:257:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:260:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:263:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:266:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:270:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:274:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:277:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:280:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:283:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:286:4: C0116: Missing function or method docstring (missing-function-docstring)
navix/states.py:197:0: R0904: Too many public methods (22/20) (too-many-public-methods)
************* Module grid
tests/performance/grid.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/performance/grid.py:15:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/performance/grid.py:21:19: W0212: Access to a protected member _reset of a client class (protected-access)
tests/performance/grid.py:28:10: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/performance/grid.py:35:10: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/performance/grid.py:39:8: W0108: Lambda may not be necessary (unnecessary-lambda)
************* Module minigrid
tests/performance/minigrid.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/performance/minigrid.py:17:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/performance/minigrid.py:22:15: W0212: Access to a protected member _reset of a client class (protected-access)
tests/performance/minigrid.py:17:23: W0613: Unused argument 'seed' (unused-argument)
tests/performance/minigrid.py:32:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/performance/minigrid.py:32:21: W0613: Unused argument 'seed' (unused-argument)
tests/performance/minigrid.py:34:17: W0612: Unused variable 'info' (unused-variable)
tests/performance/minigrid.py:37:21: W0612: Unused variable 'reward' (unused-variable)
tests/performance/minigrid.py:48:8: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/performance/minigrid.py:57:10: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/performance/minigrid.py:61:8: W0108: Lambda may not be necessary (unnecessary-lambda)
tests/performance/minigrid.py:69:10: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/performance/minigrid.py:5:0: C0411: third party import "gymnasium" should be placed before first party import "navix"  (wrong-import-order)
tests/performance/minigrid.py:6:0: C0411: standard import "random" should be placed before third party imports "jax", "jax.numpy", "gymnasium" and first party import "navix"  (wrong-import-order)
tests/performance/minigrid.py:7:0: C0411: standard import "time" should be placed before third party imports "jax", "jax.numpy", "gymnasium" and first party import "navix"  (wrong-import-order)
tests/performance/minigrid.py:9:0: C0411: standard import "timeit.repeat" should be placed before third party imports "jax", "jax.numpy", "gymnasium" and first party import "navix"  (wrong-import-order)
************* Module observations
tests/performance/observations.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/performance/observations.py:15:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/performance/observations.py:21:19: W0212: Access to a protected member _reset of a client class (protected-access)
tests/performance/observations.py:44:8: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/performance/observations.py:57:10: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/performance/observations.py:61:8: W0108: Lambda may not be necessary (unnecessary-lambda)
************* Module profiling
tests/performance/profiling.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/performance/profiling.py:11:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/performance/profiling.py:14:4: W0621: Redefining name 'timestep' from outer scope (line 52) (redefined-outer-name)
tests/performance/profiling.py:14:15: W0212: Access to a protected member _reset of a client class (protected-access)
tests/performance/profiling.py:22:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/performance/profiling.py:25:4: W0621: Redefining name 'timestep' from outer scope (line 52) (redefined-outer-name)
tests/performance/profiling.py:25:15: W0212: Access to a protected member _reset of a client class (protected-access)
tests/performance/profiling.py:28:8: W0621: Redefining name 'timestep' from outer scope (line 52) (redefined-outer-name)
tests/performance/profiling.py:27:24: W0613: Unused argument 'x' (unused-argument)
tests/performance/profiling.py:4:0: C0411: standard import "time" should be placed before third party imports "jax", "jax.numpy" and first party import "navix"  (wrong-import-order)
tests/performance/profiling.py:4:0: W0611: Unused import time (unused-import)
************* Module tests.test_actions
tests/test_actions.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_actions.py:12:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_actions.py:36:12: W0212: Access to a protected member _rotate of a client class (protected-access)
tests/test_actions.py:41:12: W0212: Access to a protected member _rotate of a client class (protected-access)
tests/test_actions.py:46:12: W0212: Access to a protected member _rotate of a client class (protected-access)
tests/test_actions.py:51:12: W0212: Access to a protected member _rotate of a client class (protected-access)
tests/test_actions.py:12:0: R1711: Useless return at end of function or method (useless-return)
tests/test_actions.py:58:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_actions.py:85:4: W0105: String statement has no effect (pointless-string-statement)
tests/test_actions.py:58:0: R0915: Too many statements (57/50) (too-many-statements)
tests/test_actions.py:160:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_actions.py:187:4: W0105: String statement has no effect (pointless-string-statement)
tests/test_actions.py:211:22: W0212: Access to a protected member _can_walk_there of a client class (protected-access)
tests/test_actions.py:214:11: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:249:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_actions.py:272:4: W0105: String statement has no effect (pointless-string-statement)
tests/test_actions.py:297:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:310:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:316:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:319:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_actions.py:372:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:382:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:394:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:405:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:416:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:425:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:434:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
tests/test_actions.py:319:0: R0915: Too many statements (52/50) (too-many-statements)
************* Module tests.test_entities
tests/test_entities.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_entities.py:8:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_entities.py:19:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module tests.test_environments
tests/test_environments.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_environments.py:6:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_environments.py:10:24: W0212: Access to a protected member _reset of a client class (protected-access)
tests/test_environments.py:36:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_environments.py:40:24: W0212: Access to a protected member _reset of a client class (protected-access)
tests/test_environments.py:74:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_environments.py:78:15: W0212: Access to a protected member _reset of a client class (protected-access)
tests/test_environments.py:74:0: R1711: Useless return at end of function or method (useless-return)
tests/test_environments.py:78:4: W0612: Unused variable 'timestep' (unused-variable)
************* Module tests.test_observations
tests/test_observations.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_observations.py:12:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_observations.py:12:0: R0914: Too many local variables (21/15) (too-many-locals)
tests/test_observations.py:12:0: R1711: Useless return at end of function or method (useless-return)
tests/test_observations.py:99:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module tests.test_spaces
tests/test_spaces.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_spaces.py:12:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_spaces.py:26:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_spaces.py:1:0: W0611: Unused import sys (unused-import)
************* Module tests.test_tasks
tests/test_tasks.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_tasks.py:50:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_tasks.py:62:19: W0212: Access to a protected member _reset of a client class (protected-access)
************* Module tests.test_terminations
tests/test_terminations.py:1:0: C0114: Missing module docstring (missing-module-docstring)
tests/test_terminations.py:10:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_terminations.py:38:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.empty:[66:87]
==navix.environments.four_rooms:[87:108]
        }

        # systems
        state = State(
            key=key,
            grid=grid,
            cache=cache or RenderingCache.init(grid),
            entities=entities,
        )

        return Timestep(
            t=jnp.asarray(0, dtype=jnp.int32),
            observation=self.observation_fn(state),
            action=jnp.asarray(0, dtype=jnp.int32),
            reward=jnp.asarray(0.0, dtype=jnp.float32),
            step_type=jnp.asarray(0, dtype=jnp.int32),
            state=state,
        )

register_env( (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.door_key:[116:135]
==navix.environments.lava_gap:[77:96]
        }

        state = State(
            key=key,
            grid=grid,
            cache=cache or RenderingCache.init(grid),
            entities=entities,
        )
        return Timestep(
            t=jnp.asarray(0, dtype=jnp.int32),
            observation=self.observation_fn(state),
            action=jnp.asarray(-1, dtype=jnp.int32),
            reward=jnp.asarray(0.0, dtype=jnp.float32),
            step_type=jnp.asarray(0, dtype=jnp.int32),
            state=state,
        )

register_env( (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.dist_shift:[68:89]
==navix.environments.dynamic_obstacles:[80:101]
        }

        # systems
        state = State(
            key=key,
            grid=grid,
            cache=cache or RenderingCache.init(grid),
            entities=entities,
        )

        return Timestep(
            t=jnp.asarray(0, dtype=jnp.int32),
            observation=self.observation_fn(state),
            action=jnp.asarray(0, dtype=jnp.int32),
            reward=jnp.asarray(0.0, dtype=jnp.float32),
            step_type=jnp.asarray(0, dtype=jnp.int32),
            state=state,
        )

register_env( (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.door_key:[118:135]
==navix.environments.key_corridor:[132:149]
        state = State(
            key=key,
            grid=grid,
            cache=cache or RenderingCache.init(grid),
            entities=entities,
        )
        return Timestep(
            t=jnp.asarray(0, dtype=jnp.int32),
            observation=self.observation_fn(state),
            action=jnp.asarray(-1, dtype=jnp.int32),
            reward=jnp.asarray(0.0, dtype=jnp.float32),
            step_type=jnp.asarray(0, dtype=jnp.int32),
            state=state,
        )

register_env( (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.crossings:[115:128]
==navix.environments.door_key:[122:135]
            entities=entities,
        )
        return Timestep(
            t=jnp.asarray(0, dtype=jnp.int32),
            observation=self.observation_fn(state),
            action=jnp.asarray(-1, dtype=jnp.int32),
            reward=jnp.asarray(0.0, dtype=jnp.float32),
            step_type=jnp.asarray(0, dtype=jnp.int32),
            state=state,
        )

register_env( (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.dynamic_obstacles:[80:93]
==navix.environments.lava_gap:[77:88]
        }

        state = State(
            key=key,
            grid=grid,
            cache=cache or RenderingCache.init(grid),
            entities=entities,
        )
        return Timestep(
            t=jnp.asarray(0, dtype=jnp.int32),
            observation=self.observation_fn(state), (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.dist_shift:[76:89]
==navix.environments.go_to_door:[106:119]
        )

        return Timestep(
            t=jnp.asarray(0, dtype=jnp.int32),
            observation=self.observation_fn(state),
            action=jnp.asarray(0, dtype=jnp.int32),
            reward=jnp.asarray(0.0, dtype=jnp.float32),
            step_type=jnp.asarray(0, dtype=jnp.int32),
            state=state,
        )

register_env( (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.dist_shift:[68:81]
==navix.environments.door_key:[116:127]
        }

        state = State(
            key=key,
            grid=grid,
            cache=cache or RenderingCache.init(grid),
            entities=entities,
        )
        return Timestep(
            t=jnp.asarray(0, dtype=jnp.int32),
            observation=self.observation_fn(state), (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.dist_shift:[71:81]
==navix.environments.key_corridor:[132:141]
        state = State(
            key=key,
            grid=grid,
            cache=cache or RenderingCache.init(grid),
            entities=entities,
        )
        return Timestep(
            t=jnp.asarray(0, dtype=jnp.int32),
            observation=self.observation_fn(state), (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==grid:[37:47]
==observations:[59:69]
    res = repeat(
        lambda: test_jit(seeds).observation.block_until_ready(),
        number=N_TIMEIT_LOOPS,
        repeat=N_REPEAT,
    )
    res = jnp.asarray(res)
    print(f"\t {jnp.mean(res)} ± {jnp.std(res)}")

if __name__ == "__main__": (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.key_corridor:[175:184]
==navix.environments.lava_gap:[122:131]
        *args,
        **kwargs,
        height=7,
        width=7,
        observation_fn=kwargs.pop("observation_fn", observations.symbolic),
        reward_fn=kwargs.pop("reward_fn", rewards.on_goal_reached),
        termination_fn=kwargs.pop("termination_fn", terminations.on_goal_reached),
    ),
) (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.crossings:[159:167]
==navix.environments.dynamic_obstacles:[121:129]
        observation_fn=kwargs.pop("observation_fn", observations.symbolic),
        reward_fn=kwargs.pop("reward_fn", rewards.on_goal_reached),
        termination_fn=kwargs.pop("termination_fn", terminations.on_goal_reached),
        *args,
        **kwargs,
    ),
)
register_env( (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.crossings:[146:154]
==navix.environments.dynamic_obstacles:[107:115]
        observation_fn=kwargs.pop("observation_fn", observations.symbolic),
        reward_fn=kwargs.pop("reward_fn", rewards.on_goal_reached),
        termination_fn=kwargs.pop("termination_fn", terminations.on_goal_reached),
        *args,
        **kwargs,
    ),
)
register_env( (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.crossings:[133:141]
==navix.environments.dist_shift:[94:102]
        observation_fn=kwargs.pop("observation_fn", observations.symbolic),
        reward_fn=kwargs.pop("reward_fn", rewards.on_goal_reached),
        termination_fn=kwargs.pop("termination_fn", terminations.on_goal_reached),
        *args,
        **kwargs,
    ),
)
register_env( (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==tests.test_tasks:[36:44]
==tests.test_terminations:[19:28]
    }

    state = State(
        key=jax.random.PRNGKey(0),
        grid=grid,
        cache=nx.rendering.cache.RenderingCache.init(grid),
        entities=entities,
    ) (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==tests.test_observations:[110:117]
==tests.test_tasks:[25:33]
        position=jnp.asarray([(1, 5), (1, 6)]),
        requires=jnp.asarray((0, 0)),
        open=jnp.asarray((False, True)),
        colour=PALETTE.YELLOW,
    )
    entities = {
        Entities.PLAYER: players[None], (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==tests.test_observations:[12:20]
==tests.test_tasks:[12:20]
    height = 10
    width = 10
    grid = jnp.zeros((height - 2, width - 2), dtype=jnp.int32)
    grid = jnp.pad(grid, 1, mode="constant", constant_values=-1)

    players = Player(
        position=jnp.asarray((1, 1)), direction=jnp.asarray(0), pocket=EMPTY_POCKET_ID
    ) (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.dist_shift:[46:54]
==navix.environments.dynamic_obstacles:[55:64]
            player_pos = jnp.asarray([1, 1])
            direction = jnp.asarray(0)
        # player
        player = Player.create(
            position=player_pos,
            direction=direction,
            pocket=EMPTY_POCKET_ID,
        )
        # goal (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.crossings:[52:61]
==navix.environments.lava_gap:[53:63]
        player_pos = jnp.asarray([1, 1])
        player_dir = jnp.asarray(0)
        player = Player.create(
            position=player_pos, direction=player_dir, pocket=EMPTY_POCKET_ID
        )
        # goal
        goal_pos = jnp.asarray([self.height - 2, self.width - 2])
        goals = Goal.create(position=goal_pos, probability=jnp.asarray(1.0))
 (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.crossings:[159:166]
==navix.environments.four_rooms:[112:119]
        observation_fn=kwargs.pop("observation_fn", observations.symbolic),
        reward_fn=kwargs.pop("reward_fn", rewards.on_goal_reached),
        termination_fn=kwargs.pop("termination_fn", terminations.on_goal_reached),
        *args,
        **kwargs,
    ),
) (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.crossings:[146:153]
==navix.environments.dynamic_obstacles:[177:184]
        observation_fn=kwargs.pop("observation_fn", observations.symbolic),
        reward_fn=kwargs.pop("reward_fn", rewards.on_goal_reached),
        termination_fn=kwargs.pop("termination_fn", terminations.on_goal_reached),
        *args,
        **kwargs,
    ),
) (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.crossings:[172:179]
==navix.environments.dist_shift:[94:101]
        observation_fn=kwargs.pop("observation_fn", observations.symbolic),
        reward_fn=kwargs.pop("reward_fn", rewards.on_goal_reached),
        termination_fn=kwargs.pop("termination_fn", terminations.on_goal_reached),
        *args,
        **kwargs,
    ),
) (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.crossings:[133:140]
==navix.environments.dist_shift:[107:114]
        observation_fn=kwargs.pop("observation_fn", observations.symbolic),
        reward_fn=kwargs.pop("reward_fn", rewards.on_goal_reached),
        termination_fn=kwargs.pop("termination_fn", terminations.on_goal_reached),
        *args,
        **kwargs,
    ),
) (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==tests.test_observations:[32:39]
==tests.test_tasks:[34:41]
        Entities.KEY: keys[None],
        Entities.DOOR: doors,
    }

    state = State(
        key=jax.random.PRNGKey(0),
        grid=grid, (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.door_key:[43:50]
==navix.environments.lava_gap:[41:48]
        assert (
            self.height > 3
        ), f"Room height must be greater than 3, got {self.height} instead"
        assert (
            self.width > 4
        ), f"Room width must be greater than 5, got {self.width} instead"
 (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==examples.ppo:[29:36]
==ppo:[16:24]
        flatten_obs_fn = lambda x: jnp.ravel(env.observation_fn(x))
        flatten_obs_shape = (int(np.prod(env.observation_space.shape)),)
        return env.replace(
            observation_fn=flatten_obs_fn,
            observation_space=env.observation_space.replace(shape=flatten_obs_shape),
        )
 (duplicate-code)
tests/test_terminations.py:1:0: R0801: Similar lines in 2 files
==navix.environments.crossings:[111:116]
==navix.environments.go_to_door:[100:105]
        state = State(
            key=key,
            grid=grid,
            cache=RenderingCache.init(grid),
            entities=entities, (duplicate-code)
tests/test_terminations.py:1:0: R0401: Cyclic import (navix.environments -> navix.environments.lava_gap) (cyclic-import)
tests/test_terminations.py:1:0: R0401: Cyclic import (navix.environments -> navix.environments.crossings) (cyclic-import)
tests/test_terminations.py:1:0: R0401: Cyclic import (navix.environments -> navix.environments.door_key) (cyclic-import)
tests/test_terminations.py:1:0: R0401: Cyclic import (navix.environments -> navix.environments.key_corridor) (cyclic-import)

Report
======
2312 statements analysed.

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

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |41     |NC         |NC         |0.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |48     |NC         |NC         |20.83       |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |147    |NC         |NC         |40.82       |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |87     |NC         |NC         |29.89       |2.30     |
+---------+-------+-----------+-----------+------------+---------+

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

    minigrid (docs.performance)
    navix (docs.performance,examples.ppo,grid,minigrid,observations,ppo,profiling,tests.test_actions,tests.test_environments,tests.test_observations,tests.test_tasks,tests.test_terminations)
      \-actions (navix.environments.environment)
      \-agents (examples.ppo,ppo)
      \-components (navix.environments.crossings,navix.environments.dist_shift,navix.environments.door_key,navix.environments.dynamic_obstacles,navix.environments.empty,navix.environments.four_rooms,navix.environments.go_to_door,navix.environments.key_corridor,navix.environments.lava_gap,tests.test_actions,tests.test_observations,tests.test_tasks,tests.test_terminations)
      \-entities (navix.environments.crossings,navix.environments.dist_shift,navix.environments.door_key,navix.environments.dynamic_obstacles,navix.environments.empty,navix.environments.four_rooms,navix.environments.go_to_door,navix.environments.key_corridor,navix.environments.lava_gap,tests.test_actions,tests.test_entities,tests.test_observations,tests.test_tasks,tests.test_terminations)
      \-environments (navix.agents.ppo)
      | \-environment (examples.ppo,navix.agents.ppo,ppo)
      \-grid (navix.environments.dist_shift,navix.environments.door_key,navix.environments.dynamic_obstacles,navix.environments.empty,navix.environments.four_rooms,navix.environments.go_to_door,navix.environments.key_corridor,navix.environments.lava_gap)
      \-observations (examples.ppo,navix.agents.ppo,navix.environments.crossings,navix.environments.dist_shift,navix.environments.door_key,navix.environments.dynamic_obstacles,navix.environments.empty,navix.environments.environment,navix.environments.four_rooms,navix.environments.go_to_door,navix.environments.key_corridor,navix.environments.lava_gap)
      \-rendering 
      | \-cache (navix.environments.crossings,navix.environments.dist_shift,navix.environments.door_key,navix.environments.dynamic_obstacles,navix.environments.empty,navix.environments.environment,navix.environments.four_rooms,navix.environments.go_to_door,navix.environments.key_corridor,navix.environments.lava_gap,tests.test_observations)
      | \-registry (navix.environments.door_key,navix.environments.dynamic_obstacles,tests.test_actions,tests.test_entities,tests.test_observations,tests.test_tasks)
      \-rewards (navix.environments.crossings,navix.environments.dist_shift,navix.environments.door_key,navix.environments.dynamic_obstacles,navix.environments.empty,navix.environments.environment,navix.environments.four_rooms,navix.environments.go_to_door,navix.environments.key_corridor,navix.environments.lava_gap)
      \-spaces (navix.environments.environment,tests.test_spaces)
      \-states (navix.agents.ppo,navix.environments.crossings,navix.environments.dist_shift,navix.environments.door_key,navix.environments.dynamic_obstacles,navix.environments.empty,navix.environments.environment,navix.environments.four_rooms,navix.environments.go_to_door,navix.environments.key_corridor,navix.environments.lava_gap,tests.test_actions,tests.test_observations,tests.test_tasks,tests.test_terminations)
      \-terminations (navix.environments.crossings,navix.environments.dist_shift,navix.environments.door_key,navix.environments.dynamic_obstacles,navix.environments.empty,navix.environments.environment,navix.environments.four_rooms,navix.environments.go_to_door,navix.environments.key_corridor,navix.environments.lava_gap)
      \-transitions (navix.environments.environment)

5687 lines have been analyzed

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

+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |3979   |69.97 |NC       |NC         |
+----------+-------+------+---------+-----------+
|docstring |223    |3.92  |NC       |NC         |
+----------+-------+------+---------+-----------+
|comment   |575    |10.11 |NC       |NC         |
+----------+-------+------+---------+-----------+
|empty     |910    |16.00 |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 |275    |NC       |NC         |
+-----------+-------+---------+-----------+
|refactor   |67     |NC       |NC         |
+-----------+-------+---------+-----------+
|warning    |79     |NC       |NC         |
+-----------+-------+---------+-----------+
|error      |9      |NC       |NC         |
+-----------+-------+---------+-----------+

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

+-------------------------------------+------+--------+---------+-----------+
|module                               |error |warning |refactor |convention |
+=====================================+======+========+=========+===========+
|navix.entities                       |88.89 |2.53    |4.48     |6.91       |
+-------------------------------------+------+--------+---------+-----------+
|docs.performance                     |11.11 |7.59    |0.00     |4.36       |
+-------------------------------------+------+--------+---------+-----------+
|tests.test_actions                   |0.00  |10.13   |4.48     |6.18       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.environment       |0.00  |8.86    |5.97     |5.45       |
+-------------------------------------+------+--------+---------+-----------+
|profiling                            |0.00  |8.86    |0.00     |1.45       |
+-------------------------------------+------+--------+---------+-----------+
|navix.agents.ppo                     |0.00  |7.59    |7.46     |4.73       |
+-------------------------------------+------+--------+---------+-----------+
|navix.actions                        |0.00  |7.59    |0.00     |4.00       |
+-------------------------------------+------+--------+---------+-----------+
|minigrid                             |0.00  |7.59    |0.00     |3.64       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.wrappers          |0.00  |6.33    |1.49     |3.27       |
+-------------------------------------+------+--------+---------+-----------+
|tests.test_environments              |0.00  |5.06    |1.49     |1.45       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.key_corridor      |0.00  |5.06    |1.49     |0.73       |
+-------------------------------------+------+--------+---------+-----------+
|navix.grid                           |0.00  |5.06    |0.00     |7.64       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.crossings         |0.00  |2.53    |1.49     |0.73       |
+-------------------------------------+------+--------+---------+-----------+
|observations                         |0.00  |2.53    |0.00     |1.45       |
+-------------------------------------+------+--------+---------+-----------+
|grid                                 |0.00  |2.53    |0.00     |1.45       |
+-------------------------------------+------+--------+---------+-----------+
|navix.states                         |0.00  |1.27    |5.97     |13.45      |
+-------------------------------------+------+--------+---------+-----------+
|navix.experiment                     |0.00  |1.27    |2.99     |1.09       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.go_to_door        |0.00  |1.27    |1.49     |0.73       |
+-------------------------------------+------+--------+---------+-----------+
|navix.observations                   |0.00  |1.27    |0.00     |2.91       |
+-------------------------------------+------+--------+---------+-----------+
|ppo                                  |0.00  |1.27    |0.00     |2.18       |
+-------------------------------------+------+--------+---------+-----------+
|examples.ppo                         |0.00  |1.27    |0.00     |1.82       |
+-------------------------------------+------+--------+---------+-----------+
|tests.test_spaces                    |0.00  |1.27    |0.00     |1.09       |
+-------------------------------------+------+--------+---------+-----------+
|tests.test_tasks                     |0.00  |1.27    |0.00     |0.73       |
+-------------------------------------+------+--------+---------+-----------+
|tests.test_terminations              |0.00  |0.00    |46.27    |1.09       |
+-------------------------------------+------+--------+---------+-----------+
|navix.agents.models                  |0.00  |0.00    |4.48     |1.45       |
+-------------------------------------+------+--------+---------+-----------+
|tests.test_observations              |0.00  |0.00    |2.99     |1.09       |
+-------------------------------------+------+--------+---------+-----------+
|navix.spaces                         |0.00  |0.00    |1.49     |2.55       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.four_rooms        |0.00  |0.00    |1.49     |1.09       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.lava_gap          |0.00  |0.00    |1.49     |0.73       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.dynamic_obstacles |0.00  |0.00    |1.49     |0.73       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.door_key          |0.00  |0.00    |1.49     |0.73       |
+-------------------------------------+------+--------+---------+-----------+
|navix.rendering.registry             |0.00  |0.00    |0.00     |5.09       |
+-------------------------------------+------+--------+---------+-----------+
|navix.agents.agent                   |0.00  |0.00    |0.00     |1.82       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.registry          |0.00  |0.00    |0.00     |1.45       |
+-------------------------------------+------+--------+---------+-----------+
|tests.test_entities                  |0.00  |0.00    |0.00     |1.09       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.dist_shift        |0.00  |0.00    |0.00     |1.09       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.empty             |0.00  |0.00    |0.00     |0.73       |
+-------------------------------------+------+--------+---------+-----------+
|navix.__init__                       |0.00  |0.00    |0.00     |0.73       |
+-------------------------------------+------+--------+---------+-----------+
|navix.environments.__init__          |0.00  |0.00    |0.00     |0.36       |
+-------------------------------------+------+--------+---------+-----------+
|navix.agents.__init__                |0.00  |0.00    |0.00     |0.36       |
+-------------------------------------+------+--------+---------+-----------+
|navix._version                       |0.00  |0.00    |0.00     |0.36       |
+-------------------------------------+------+--------+---------+-----------+

Messages
--------

+-------------------------------+------------+
|message id                     |occurrences |
+===============================+============+
|missing-function-docstring     |148         |
+-------------------------------+------------+
|missing-module-docstring       |41          |
+-------------------------------+------------+
|missing-class-docstring        |38          |
+-------------------------------+------------+
|duplicate-code                 |27          |
+-------------------------------+------------+
|consider-using-f-string        |22          |
+-------------------------------+------------+
|protected-access               |15          |
+-------------------------------+------------+
|too-few-public-methods         |13          |
+-------------------------------+------------+
|wrong-import-order             |12          |
+-------------------------------+------------+
|unused-argument                |12          |
+-------------------------------+------------+
|unused-variable                |10          |
+-------------------------------+------------+
|too-many-locals                |10          |
+-------------------------------+------------+
|no-member                      |8           |
+-------------------------------+------------+
|redefined-outer-name           |7           |
+-------------------------------+------------+
|comparison-with-callable       |7           |
+-------------------------------+------------+
|unused-import                  |6           |
+-------------------------------+------------+
|cell-var-from-loop             |6           |
+-------------------------------+------------+
|unnecessary-lambda             |5           |
+-------------------------------+------------+
|redefined-builtin              |5           |
+-------------------------------+------------+
|pointless-string-statement     |4           |
+-------------------------------+------------+
|invalid-name                   |4           |
+-------------------------------+------------+
|cyclic-import                  |4           |
+-------------------------------+------------+
|useless-return                 |3           |
+-------------------------------+------------+
|no-else-return                 |3           |
+-------------------------------+------------+
|line-too-long                  |3           |
+-------------------------------+------------+
|unnecessary-lambda-assignment  |2           |
+-------------------------------+------------+
|ungrouped-imports              |2           |
+-------------------------------+------------+
|trailing-whitespace            |2           |
+-------------------------------+------------+
|too-many-statements            |2           |
+-------------------------------+------------+
|too-many-arguments             |2           |
+-------------------------------+------------+
|too-many-return-statements     |1           |
+-------------------------------+------------+
|too-many-public-methods        |1           |
+-------------------------------+------------+
|too-many-instance-attributes   |1           |
+-------------------------------+------------+
|no-name-in-module              |1           |
+-------------------------------+------------+
|missing-final-newline          |1           |
+-------------------------------+------------+
|f-string-without-interpolation |1           |
+-------------------------------+------------+
|dangerous-default-value        |1           |
+-------------------------------+------------+

-----------------------------------
Your code has been rated at 7.98/10