py_trees 2.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. py_trees-2.5.0/.github/workflows/pre-merge.yaml +40 -0
  2. py_trees-2.5.0/.gitignore +27 -0
  3. py_trees-2.5.0/.readthedocs.yaml +28 -0
  4. py_trees-2.5.0/.vscode/extensions.json +11 -0
  5. py_trees-2.5.0/.vscode/settings.json +22 -0
  6. py_trees-2.5.0/CHANGELOG.rst +593 -0
  7. py_trees-2.5.0/CONTRIBUTING.md +64 -0
  8. py_trees-2.5.0/DEVELOPING.md +67 -0
  9. py_trees-2.5.0/LICENSE +32 -0
  10. py_trees-2.5.0/Makefile +15 -0
  11. py_trees-2.5.0/PKG-INFO +186 -0
  12. py_trees-2.5.0/README.md +165 -0
  13. py_trees-2.5.0/docs/.gitignore +3 -0
  14. py_trees-2.5.0/docs/Makefile +20 -0
  15. py_trees-2.5.0/docs/behaviours.rst +158 -0
  16. py_trees-2.5.0/docs/blackboards.rst +13 -0
  17. py_trees-2.5.0/docs/changelog.rst +1 -0
  18. py_trees-2.5.0/docs/composites.rst +31 -0
  19. py_trees-2.5.0/docs/conf.py +108 -0
  20. py_trees-2.5.0/docs/decorators.rst +5 -0
  21. py_trees-2.5.0/docs/demos.rst +229 -0
  22. py_trees-2.5.0/docs/dot/blackboard-with-variables.dot +190 -0
  23. py_trees-2.5.0/docs/dot/composites.dot +8 -0
  24. py_trees-2.5.0/docs/dot/decorators.dot +14 -0
  25. py_trees-2.5.0/docs/dot/demo-blackboard.dot +37 -0
  26. py_trees-2.5.0/docs/dot/demo-context_switching.dot +14 -0
  27. py_trees-2.5.0/docs/dot/demo-dot-graphs.dot +30 -0
  28. py_trees-2.5.0/docs/dot/demo-either-or.dot +51 -0
  29. py_trees-2.5.0/docs/dot/demo-eternal-guard.dot +17 -0
  30. py_trees-2.5.0/docs/dot/demo-logging.dot +18 -0
  31. py_trees-2.5.0/docs/dot/demo-selector.dot +10 -0
  32. py_trees-2.5.0/docs/dot/demo-sequence.dot +12 -0
  33. py_trees-2.5.0/docs/dot/demo-tree-stewardship.dot +40 -0
  34. py_trees-2.5.0/docs/dot/demo_tree.dot +15 -0
  35. py_trees-2.5.0/docs/dot/idiom-either-or.dot +23 -0
  36. py_trees-2.5.0/docs/dot/naive_context_switching.dot +12 -0
  37. py_trees-2.5.0/docs/dot/oneshot.dot +26 -0
  38. py_trees-2.5.0/docs/dot/parallel.dot +12 -0
  39. py_trees-2.5.0/docs/dot/pick_up_where_you_left_off.dot +34 -0
  40. py_trees-2.5.0/docs/dot/selector.dot +12 -0
  41. py_trees-2.5.0/docs/dot/selector_with_memory.dot +13 -0
  42. py_trees-2.5.0/docs/dot/sequence.dot +14 -0
  43. py_trees-2.5.0/docs/dot/sequence_with_memory.dot +15 -0
  44. py_trees-2.5.0/docs/examples/blackboard_activity_stream.py +16 -0
  45. py_trees-2.5.0/docs/examples/blackboard_behaviour.py +46 -0
  46. py_trees-2.5.0/docs/examples/blackboard_disconnected.py +17 -0
  47. py_trees-2.5.0/docs/examples/blackboard_display.py +25 -0
  48. py_trees-2.5.0/docs/examples/blackboard_namespaces.py +23 -0
  49. py_trees-2.5.0/docs/examples/blackboard_nested.py +29 -0
  50. py_trees-2.5.0/docs/examples/blackboard_read_write.py +10 -0
  51. py_trees-2.5.0/docs/examples/decorators.py +12 -0
  52. py_trees-2.5.0/docs/examples/oneshot.py +19 -0
  53. py_trees-2.5.0/docs/examples/parallel.py +15 -0
  54. py_trees-2.5.0/docs/examples/pickup_where_you_left_off.py +30 -0
  55. py_trees-2.5.0/docs/examples/selector.py +12 -0
  56. py_trees-2.5.0/docs/examples/selector_with_memory.py +12 -0
  57. py_trees-2.5.0/docs/examples/sequence.py +13 -0
  58. py_trees-2.5.0/docs/examples/sequence_with_memory.py +13 -0
  59. py_trees-2.5.0/docs/examples/skeleton_behaviour.py +104 -0
  60. py_trees-2.5.0/docs/examples/skeleton_tree.py +29 -0
  61. py_trees-2.5.0/docs/faq.rst +16 -0
  62. py_trees-2.5.0/docs/idioms.rst +45 -0
  63. py_trees-2.5.0/docs/images/action.gif +0 -0
  64. py_trees-2.5.0/docs/images/blackboard.jpg +0 -0
  65. py_trees-2.5.0/docs/images/context_switching.gif +0 -0
  66. py_trees-2.5.0/docs/images/crazy_hospital.jpg +0 -0
  67. py_trees-2.5.0/docs/images/either_or.gif +0 -0
  68. py_trees-2.5.0/docs/images/eternal_guard.gif +0 -0
  69. py_trees-2.5.0/docs/images/lifecycle.gif +0 -0
  70. py_trees-2.5.0/docs/images/logging.gif +0 -0
  71. py_trees-2.5.0/docs/images/pick_up_where_you_left_off.gif +0 -0
  72. py_trees-2.5.0/docs/images/render.gif +0 -0
  73. py_trees-2.5.0/docs/images/selector.gif +0 -0
  74. py_trees-2.5.0/docs/images/sequence.gif +0 -0
  75. py_trees-2.5.0/docs/images/ticking_tree.jpg +0 -0
  76. py_trees-2.5.0/docs/images/tree_stewardship.gif +0 -0
  77. py_trees-2.5.0/docs/images/yggdrasil.jpg +0 -0
  78. py_trees-2.5.0/docs/index.rst +44 -0
  79. py_trees-2.5.0/docs/introduction.rst +121 -0
  80. py_trees-2.5.0/docs/modules.rst +163 -0
  81. py_trees-2.5.0/docs/ports.rst +397 -0
  82. py_trees-2.5.0/docs/programs.rst +13 -0
  83. py_trees-2.5.0/docs/requirements.txt +60 -0
  84. py_trees-2.5.0/docs/terminology.rst +73 -0
  85. py_trees-2.5.0/docs/the_crazy_hospital.rst +42 -0
  86. py_trees-2.5.0/docs/trees.rst +106 -0
  87. py_trees-2.5.0/docs/visualisation.rst +55 -0
  88. py_trees-2.5.0/docs/weblinks.rst +8 -0
  89. py_trees-2.5.0/package.xml +27 -0
  90. py_trees-2.5.0/py_trees/__init__.py +39 -0
  91. py_trees-2.5.0/py_trees/behaviour.py +428 -0
  92. py_trees-2.5.0/py_trees/behaviours.py +808 -0
  93. py_trees-2.5.0/py_trees/blackboard.py +1397 -0
  94. py_trees-2.5.0/py_trees/common.py +302 -0
  95. py_trees-2.5.0/py_trees/composites.py +778 -0
  96. py_trees-2.5.0/py_trees/console.py +432 -0
  97. py_trees-2.5.0/py_trees/decorators.py +936 -0
  98. py_trees-2.5.0/py_trees/demos/README.md +8 -0
  99. py_trees-2.5.0/py_trees/demos/__init__.py +31 -0
  100. py_trees-2.5.0/py_trees/demos/action.py +200 -0
  101. py_trees-2.5.0/py_trees/demos/blackboard.py +278 -0
  102. py_trees-2.5.0/py_trees/demos/blackboard_namespaces.py +146 -0
  103. py_trees-2.5.0/py_trees/demos/blackboard_remappings.py +141 -0
  104. py_trees-2.5.0/py_trees/demos/context_switching.py +194 -0
  105. py_trees-2.5.0/py_trees/demos/display_modes.py +151 -0
  106. py_trees-2.5.0/py_trees/demos/dot_graphs.py +160 -0
  107. py_trees-2.5.0/py_trees/demos/either_or.py +254 -0
  108. py_trees-2.5.0/py_trees/demos/eternal_guard.py +214 -0
  109. py_trees-2.5.0/py_trees/demos/lifecycle.py +149 -0
  110. py_trees-2.5.0/py_trees/demos/logging.py +234 -0
  111. py_trees-2.5.0/py_trees/demos/pick_up_where_you_left_off.py +213 -0
  112. py_trees-2.5.0/py_trees/demos/ports/__init__.py +9 -0
  113. py_trees-2.5.0/py_trees/demos/ports/basic.py +89 -0
  114. py_trees-2.5.0/py_trees/demos/ports/nested_subtrees.py +120 -0
  115. py_trees-2.5.0/py_trees/demos/ports/nested_subtrees.xml +65 -0
  116. py_trees-2.5.0/py_trees/demos/ports/remapping.py +165 -0
  117. py_trees-2.5.0/py_trees/demos/ports/xml_tree.py +113 -0
  118. py_trees-2.5.0/py_trees/demos/ports/xml_tree.xml +15 -0
  119. py_trees-2.5.0/py_trees/demos/selector.py +149 -0
  120. py_trees-2.5.0/py_trees/demos/sequence.py +147 -0
  121. py_trees-2.5.0/py_trees/demos/stewardship.py +261 -0
  122. py_trees-2.5.0/py_trees/display.py +1075 -0
  123. py_trees-2.5.0/py_trees/idioms.py +259 -0
  124. py_trees-2.5.0/py_trees/logging.py +122 -0
  125. py_trees-2.5.0/py_trees/meta.py +74 -0
  126. py_trees-2.5.0/py_trees/parsers/__init__.py +21 -0
  127. py_trees-2.5.0/py_trees/parsers/behaviour_tree_xml.py +1066 -0
  128. py_trees-2.5.0/py_trees/ports.py +808 -0
  129. py_trees-2.5.0/py_trees/ports_utils.py +464 -0
  130. py_trees-2.5.0/py_trees/programs/__init__.py +15 -0
  131. py_trees-2.5.0/py_trees/programs/render.py +205 -0
  132. py_trees-2.5.0/py_trees/py.typed +0 -0
  133. py_trees-2.5.0/py_trees/syntax_highlighting.py +73 -0
  134. py_trees-2.5.0/py_trees/tests.py +121 -0
  135. py_trees-2.5.0/py_trees/timers.py +87 -0
  136. py_trees-2.5.0/py_trees/trees.py +481 -0
  137. py_trees-2.5.0/py_trees/utilities.py +196 -0
  138. py_trees-2.5.0/py_trees/version.py +17 -0
  139. py_trees-2.5.0/py_trees/visitors.py +226 -0
  140. py_trees-2.5.0/pyproject.toml +154 -0
  141. py_trees-2.5.0/resource/py_trees +0 -0
  142. py_trees-2.5.0/setup.py +67 -0
  143. py_trees-2.5.0/tests/README.md +26 -0
  144. py_trees-2.5.0/tests/__init__.py +11 -0
  145. py_trees-2.5.0/tests/benchmark_blackboard.py +286 -0
  146. py_trees-2.5.0/tests/profile_blackboard +4 -0
  147. py_trees-2.5.0/tests/test_blackboard.py +718 -0
  148. py_trees-2.5.0/tests/test_blackboard_behaviours.py +594 -0
  149. py_trees-2.5.0/tests/test_composites.py +134 -0
  150. py_trees-2.5.0/tests/test_console.py +20 -0
  151. py_trees-2.5.0/tests/test_decorators.py +742 -0
  152. py_trees-2.5.0/tests/test_display.py +184 -0
  153. py_trees-2.5.0/tests/test_either_or.py +136 -0
  154. py_trees-2.5.0/tests/test_eternal_guard.py +161 -0
  155. py_trees-2.5.0/tests/test_meta.py +42 -0
  156. py_trees-2.5.0/tests/test_oneshot.py +238 -0
  157. py_trees-2.5.0/tests/test_parallels.py +474 -0
  158. py_trees-2.5.0/tests/test_pickup.py +88 -0
  159. py_trees-2.5.0/tests/test_ports.py +333 -0
  160. py_trees-2.5.0/tests/test_ports_helpers.py +232 -0
  161. py_trees-2.5.0/tests/test_ports_xml_parser.py +1208 -0
  162. py_trees-2.5.0/tests/test_probabilistic_behaviour.py +57 -0
  163. py_trees-2.5.0/tests/test_selectors.py +189 -0
  164. py_trees-2.5.0/tests/test_sequences.py +279 -0
  165. py_trees-2.5.0/tests/test_timer.py +41 -0
  166. py_trees-2.5.0/tests/test_tip.py +280 -0
  167. py_trees-2.5.0/tests/test_tree.py +800 -0
  168. py_trees-2.5.0/tests/test_utilities.py +64 -0
  169. py_trees-2.5.0/tests/test_visitors.py +76 -0
  170. py_trees-2.5.0/tests/xml/grandparent_test.xml +36 -0
  171. py_trees-2.5.0/tests/xml/main_tree_with_include.xml +14 -0
  172. py_trees-2.5.0/tests/xml/subtrees/subtree_library.xml +7 -0
  173. py_trees-2.5.0/uv.lock +813 -0
@@ -0,0 +1,40 @@
1
+ name: pre-merge
2
+
3
+ on:
4
+ pull_request:
5
+ workflow_dispatch:
6
+
7
+ jobs:
8
+ lint:
9
+ runs-on: ubuntu-24.04
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - name: Install uv
13
+ uses: astral-sh/setup-uv@v5
14
+ with:
15
+ enable-cache: true
16
+ - name: Install dependencies
17
+ run: uv sync
18
+ - name: Ruff (format)
19
+ run: uv run ruff format --check
20
+ - name: Ruff (lint)
21
+ run: uv run ruff check
22
+ - name: ty (type check)
23
+ run: uv run ty check
24
+
25
+ test:
26
+ runs-on: ubuntu-latest
27
+ strategy:
28
+ fail-fast: false
29
+ matrix:
30
+ python-version: ["3.10", "3.12", "3.14"]
31
+ steps:
32
+ - uses: actions/checkout@v4
33
+ - name: Install uv
34
+ uses: astral-sh/setup-uv@v5
35
+ with:
36
+ enable-cache: true
37
+ - name: Install dependencies
38
+ run: uv sync --python ${{ matrix.python-version }}
39
+ - name: Pytest
40
+ run: uv run --python ${{ matrix.python-version }} pytest -s --cov=py_trees tests/
@@ -0,0 +1,27 @@
1
+ .claude
2
+ .coverage
3
+ .venv
4
+ py_trees.egg-info
5
+ */doc/html
6
+ */doc/manifest.yaml
7
+ *.pyc
8
+ *.png
9
+ *.svg
10
+ install
11
+ log
12
+ build
13
+ dist
14
+ deb_dist
15
+ py_trees*.tar.gz
16
+ *~
17
+ \#*
18
+ .#*
19
+ .DS_Store
20
+ .README.md.html
21
+ .eggs
22
+ tests/.README.md.html
23
+ nosetests.html
24
+ eclipse
25
+ dump.json
26
+ tests/blackboard.cprofile
27
+ testies
@@ -0,0 +1,28 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the version of Python and other tools you might need
9
+ build:
10
+ os: ubuntu-24.04
11
+ tools:
12
+ python: "3.12"
13
+ apt_packages:
14
+ - graphviz
15
+
16
+ # Build documentation in the docs/ directory with Sphinx
17
+ sphinx:
18
+ configuration: docs/conf.py
19
+ fail_on_warning: true
20
+
21
+ # If using Sphinx, optionally build your docs in additional formats such as PDF
22
+ # formats:
23
+ # - pdf
24
+
25
+ # Optionally declare the Python requirements required to build your docs
26
+ python:
27
+ install:
28
+ - requirements: docs/requirements.txt
@@ -0,0 +1,11 @@
1
+ {
2
+ "recommendations": [
3
+ "bierner.github-markdown-preview",
4
+ "bungcip.better-toml",
5
+ "streetsidesoftware.code-spell-checker",
6
+ "lextudio.restructuredtext",
7
+ "ms-python.python",
8
+ "ms-vscode-remote.vscode-remote-extensionpack",
9
+ "omnilib.ufmt"
10
+ ]
11
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "python.linting.enabled": false,
3
+ "python.formatting.provider": "none",
4
+ "[python]": {
5
+ "editor.defaultFormatter": "omnilib.ufmt",
6
+ "editor.formatOnSave": true
7
+ },
8
+ "cSpell.language": "en-GB",
9
+ "cSpell.words": [
10
+ "backported",
11
+ "behaviour",
12
+ "behaviours",
13
+ "bierner",
14
+ "bungcip",
15
+ "omnilib",
16
+ "py_trees",
17
+ "pydot",
18
+ "pypi",
19
+ "ufmt",
20
+ "usort"
21
+ ]
22
+ }