Skip to content

Commit b329244

Browse files
committed
[docs] 2.2.x release documentation
1 parent 29526cf commit b329244

25 files changed

+256
-162
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"extensions": [
1515
"bierner.github-markdown-preview",
1616
"bungcip.better-toml",
17+
"lextudio.restructuredtext",
1718
"ms-python.python",
1819
"omnilib.ufmt"
1920

.devcontainer/py310/.devcontainer/devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"extensions": [
1515
"bierner.github-markdown-preview",
1616
"bungcip.better-toml",
17+
"lextudio.restructuredtext",
1718
"ms-python.python",
1819
"omnilib.ufmt"
1920

.readthedocs.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ build:
1010
os: ubuntu-22.04
1111
tools:
1212
python: "3.10"
13-
# You can also specify other tool versions:
14-
# nodejs: "19"
15-
# rust: "1.64"
16-
# golang: "1.19"
13+
apt_packages:
14+
- graphviz
1715

1816
# Build documentation in the docs/ directory with Sphinx
1917
sphinx:

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"python.linting.flake8Enabled": false,
33
"[python]": {
44
"editor.defaultFormatter": "omnilib.ufmt"
5-
}
5+
},
6+
"esbonio.sphinx.confDir": ""
67
}

CHANGELOG.rst

Lines changed: 69 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,87 @@ Release Notes
33

44
Forthcoming
55
-----------
6+
* [docs] 2.2.x release documentation, bugfix for graphviz on read-the-docs, `#400 <https://github.com/splintered-reality/py_trees/pull/400>`_
67

78
2.2.1 (2023-01-28)
89
------------------
910
* [tox] format with black, usort and fix flake8 warnings, `#397 <https://github.com/splintered-reality/py_trees/pull/397>`_
1011
* [docs] sphinx 1.4 -> 5.3, `#391 <https://github.com/splintered-reality/py_trees/pull/391>`_
1112

12-
2.2.0 (2023-01-23)
13-
------------------
14-
* [poetry] setuptools -> poetry, `#389 <https://github.com/splintered-reality/py_trees/pull/389>`_
15-
* [common] remove viral ramifications of Any from ComparisonExpression, `#386 <https://github.com/splintered-reality/py_trees/pull/386>`_
16-
* [display] bugfix off-the-grid bb nodes and render exclusive write edges, `#383 <https://github.com/splintered-reality/py_trees/pull/383>`_
17-
* [tests] it's mypy now, by the time this ends, it'll be someone else's py , `#380 <https://github.com/splintered-reality/py_trees/pull/380>`_
13+
2.2.x (2023-01-23) - Sequences and Selectors with and without Memory!
14+
---------------------------------------------------------------------
15+
16+
**Headline Feature**
17+
18+
* [composites] sequences and selectors with and without memory (previously experimental in 2.1.6)
19+
20+
This can become confusing, so pay attention and let's define some terminology:
21+
22+
.. code-block:: python
23+
24+
Without Memory - ticking starts with the **first** child
25+
With Memory - ticking attempts to start with the **current** child
26+
27+
Whether the current child exists or not, the composite will always follow the logic above. The only bearing
28+
that the current child has on proceedings is in what happens next. Without memory, if the current child is reached,
29+
it will tick it without re-initialising it since it is already RUNNING (all other children are not RUNNING
30+
and subsequently will be re-initialised). With memory, if no current child is found on that first tick,
31+
it will fall back to starting with the first child.
32+
33+
Previously **Selectors** operated without memory and **Sequences** with memory. Now both composites support both
34+
paradigms. Not only does this bring a pleasing symmetry to the universe that his noodliness would approve of,
35+
but it does unlock several practical use cases that previously required rather complex idioms
36+
(combinations of behaviours / subtrees).
37+
38+
Refer to the `Eternal Guard Demo <https://py-trees.readthedocs.io/en/release-2.2.x/demos.html#py-trees-demo-eternal-guard>`_
39+
for an example of a practically useful idiom with two Sequences, one with and the other without memory.
40+
41+
**Other New Features**
42+
43+
* [decorators] Repeat and Retry, `#371 <https://github.com/splintered-reality/py_trees/pull/371>`_
44+
* [devenv] much improved development environment, comprehensive formatting, linting, type-checking and testing
45+
46+
* [poetry] setuptools -> poetry, `#389 <https://github.com/splintered-reality/py_trees/pull/389>`_
47+
* [common] remove viral ramifications of Any from ComparisonExpression, `#386 <https://github.com/splintered-reality/py_trees/pull/386>`_
48+
* [tests] it's mypy now, by the time this ends, it'll be someone else's py , `#380 <https://github.com/splintered-reality/py_trees/pull/380>`_
49+
* [tests] use tox, flake8 in prem-merge `#354 <https://github.com/splintered-reality/py_trees/pull/354>`_
50+
* [tests] switch from deprecating nose to pytest, `#350 <https://github.com/splintered-reality/py_trees/pull/350>`_
51+
52+
**Breaking API**
53+
1854
* [behaviours, decorators] behaviours.Count -> behaviours.StatusQueue + decorators.Count (new), `#376 <https://github.com/splintered-reality/py_trees/pull/376>`_
19-
* [behaviours, decorators, composites] abstract base classes, `#375 <https://github.com/splintered-reality/py_trees/pull/375>`_
2055
* [behaviours] StatusSequence -> StatusQueue, `#372 <https://github.com/splintered-reality/py_trees/pull/372>`_
21-
* [decorators] repeat and retry, `#371 <https://github.com/splintered-reality/py_trees/pull/371>`_
56+
* [behaviours, decorators, composites] abstract base classes, `#375 <https://github.com/splintered-reality/py_trees/pull/375>`_
2257
* [composites] use explicit composite arguments, `#370 <https://github.com/splintered-reality/py_trees/pull/370>`_
23-
* [composites] restart the sequence, but allow children to retain their state `#368 <https://github.com/splintered-reality/py_trees/pull/368>`_
58+
59+
The latter is a theme adopted more liberally across (most) of the py_trees library. As this library has grown, it's
60+
become apparent that being explicit about passing arguments to constructors is more important than the convenience
61+
of eliminating a few characters. Not only does it prevent bugs, it eases refactoring and greatly
62+
improves readability of the code. In fact, you'll save time in the long run.
63+
64+
.. code-block:: python
65+
66+
# This:
67+
parallel = py_trees.composite.Parallel(
68+
name="Parallel",
69+
policy=py_trees.common.ParallelPolicy.SuccessOnAll()
70+
)
71+
72+
# Is better than:
73+
parallel = py_trees.composite.Parallel()
74+
75+
When upgrading, if you don't regularly pass in arguments with keywords, i.e. you do ``Parallel("Foo")`` instead of
76+
``Parallel(name="Foo")``, be on the lookout for bugs created by the ordering having changed in the method signatures.
77+
Quite often the argument for ``name`` had a default and was at the end of the line. With these changes it has moved
78+
to the front of the line in order to adopt a consistent convention across the whole library.
79+
80+
**Bugfixes**
81+
82+
* [display] bugfix off-the-grid bb nodes and render exclusive write edges, `#383 <https://github.com/splintered-reality/py_trees/pull/383>`_
2483
* [common] a practical inf, `#366 <https://github.com/splintered-reality/py_trees/pull/366>`_
2584
* [composites] avoid redundant stop for non-running children `#360 <https://github.com/splintered-reality/py_trees/pull/360>`_
2685
* [display] bugfix unicode use when no unicode for dot `#359 <https://github.com/splintered-reality/py_trees/pull/359>`_
27-
* [tests] use tox, flake8 in prem-merge `#354 <https://github.com/splintered-reality/py_trees/pull/354>`_
28-
* [tests] switch from deprecating nose to pytest, `#350 <https://github.com/splintered-reality/py_trees/pull/350>`_
86+
* [composites] restart the sequence, but allow children to retain their state `#368 <https://github.com/splintered-reality/py_trees/pull/368>`_
2987

3088
2.1.6 (2021-05-31)
3189
------------------

CONTRIBUTING.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Successfully collaborating on common problems is always an edifying experience that increases the desire to do more.
44

5+
## Development Environment
6+
7+
Short of having a poetry environment of your own, you can make use of github's codespaces.
8+
9+
Refer to the [README - Getting Started](../README.md#geting-started) for details.
10+
511
## Pull Requests
612

713
### Before Submitting
@@ -19,36 +25,51 @@ Some recommendations to help align your contribution and minimise the eventual b
1925
If it is a feature or bugfix that you'd like to see backported to one of the release branches, open a parallel PR for that
2026
release branch or mention that you'd like to see it backported in the original PR's description.
2127

22-
### Coding
23-
24-
Running `. ./venv.bash` in the root of the repository can create a nice, self-contained sandbox within which you can develop and test your contribution.
25-
2628
### The Pull Request
2729

2830
Be sure to state clearly in the pull request's **description** (this helps expedite review):
2931

3032
* The motivation, i.e. what problem is this solving.
3133
* A concise summary of what was done (and why if relevant).
3234

33-
### Style
35+
### Format, Lint, Type-Check and Test
36+
37+
The repository aims to conform to PEP8, please endeavour to do so. CI will get cranky if you don't ;)
38+
39+
Test against at least one of `py38`, `py310`.
40+
41+
```
42+
# Auto-format your code (if using VSCode, install the ufmt extension)
43+
$ poetry run tox -e format
3444
35-
The repository aims to conform to PEP8, please endeavour to do so. There is a simple script `./lint/flake8` that can be used to check that the
36-
code conforms. This is run as part of the CI checks.
45+
# Style, Format
46+
$ poetry run tox -e check
3747
38-
### Tests
48+
# Type-Check
49+
$ poetry run mypy38
3950
40-
See [tests/README.md](tests/README.md) for instructions on how to run the tests all together or manually. If you are contributing new features, or
41-
bugfixing a problem that did not have coverage, it is expected that the pull requests will include a test for regression purposes.
51+
# Tests
52+
$ poetry run tox -e py38
53+
```
4254

4355
### Documentation
4456

4557
Documentation is auto-generated as part of the PR process, but if you do wish to make changes and check locally:
4658

59+
Generate the docs, view them from `./docs/html` in a browser.
60+
61+
```
62+
# Install dependencies
63+
$ poetry install --with docs
64+
65+
# Build
66+
$ poetry run make -C docs html
67+
```
68+
69+
On doc dependency changes in `pyproject.toml`, export the requirements for ReadTheDocs.
70+
4771
```
48-
. ./venv.bash
49-
make docs
50-
...
51-
The HTML pages are in doc/html.
72+
$ poetry export -f requirements.txt --with docs -o docs/requirements.txt
5273
```
5374

5475
### Changelog
@@ -68,8 +89,7 @@ Once the large button has gone `GREEN`, you or the reviewer may merge the pull r
6889

6990
## Releasing
7091

71-
If you are interested in seeing your changes make it into a release (sooner rather than later) and distributed on
72-
PyPi, PPA or via the ROS ecosystem, please make the request via a comment in your PR or in an issue.
92+
If you are interested in seeing your changes make it into a release (sooner rather than later), please make the request via a comment in your PR or in an issue.
7393

7494
## Social Conduct
7595

0 commit comments

Comments
 (0)