Skip to content

Commit e89d925

Browse files
docs: Add JOSS publication badge
1 parent 0810959 commit e89d925

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
[![Fury - PyPi stable version](https://badge.fury.io/py/hcraft.svg)](https://badge.fury.io/py/hcraft)
44
[![PePy - Downloads](https://static.pepy.tech/badge/hcraft)](https://pepy.tech/project/hcraft)
55
[![PePy - Downloads per week](https://static.pepy.tech/badge/hcraft/week)](https://pepy.tech/project/hcraft)
6+
7+
[![DOI](https://joss.theoj.org/papers/10.21105/joss.06468/status.svg)](https://doi.org/10.21105/joss.06468)
68
[![Licence - GPLv3](https://img.shields.io/github/license/IRLL/HierarchyCraft?style=plastic)](https://www.gnu.org/licenses/)
79

10+
811
[![Codacy - grade](https://app.codacy.com/project/badge/Grade/b5010ccc46274c0eb1e3ae563934efdd)](https://www.codacy.com/gh/IRLL/HierarchyCraft/dashboard?utm_source=github.com&utm_medium=referral&utm_content=IRLL/HierarchyCraft&utm_campaign=Badge_Grade)
912
[![Codacy - coverage](https://app.codacy.com/project/badge/Coverage/b5010ccc46274c0eb1e3ae563934efdd)](https://www.codacy.com/gh/IRLL/HierarchyCraft/dashboard?utm_source=github.com&utm_medium=referral&utm_content=IRLL/HierarchyCraft&utm_campaign=Badge_Coverage)
1013
[![CodeStyle - Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

tests/solving_behaviors/test_mineHcraft.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from pathlib import Path
2+
13
from matplotlib import pyplot as plt
24
from hcraft.examples.minecraft.env import MineHcraftEnv
35
from hcraft.task import Task
@@ -17,7 +19,7 @@
1719
@pytest.mark.slow
1820
def test_solving_behaviors():
1921
"""All tasks should be solved by their solving behavior."""
20-
draw_call_graph = False
22+
draw_call_graph = True
2123

2224
if draw_call_graph:
2325
_fig, ax = plt.subplots()
@@ -29,7 +31,10 @@ def test_solving_behaviors():
2931
task = [t for t in tasks_left if t.name == "Place enchanting_table anywhere"][0]
3032
solving_behavior = env.solving_behavior(task)
3133
easy_tasks_left = [task]
34+
call_path = Path("call_graph")
35+
step = 0
3236
while not done and not env.purpose.terminated:
37+
step += 1
3338
tasks_left = [t for t in tasks_left if not t.terminated]
3439
if task is None:
3540
easy_tasks_left = [t for t in tasks_left if t.name not in HARD_TASKS]
@@ -44,6 +49,7 @@ def test_solving_behaviors():
4449
plt.cla()
4550
solving_behavior.graph.call_graph.draw(ax)
4651
plt.show(block=False)
52+
plt.savefig(call_path / f"{step}.png", figsize=(16, 9))
4753
observation, _reward, terminated, truncated, _info = env.step(action)
4854
done = terminated or truncated
4955
if task.terminated:

0 commit comments

Comments
 (0)