Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial py_trees_parser repo setup #1

Merged
merged 31 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
258145e
Merge branch 'ORTHO-272/simulation_launch_file' into 'humble'
erichlf Jan 16, 2025
84a23b2
Update to remove non-parser code
erichlf Jan 20, 2025
3b381e0
Add license file
erichlf Jan 20, 2025
ff038f8
Add repos file
erichlf Jan 21, 2025
54e7acb
Add github action
erichlf Jan 21, 2025
4d5f2e6
Change behavior_tree reference to py_trees_parser
erichlf Jan 22, 2025
5782f8a
Fix typo package name in action
erichlf Jan 22, 2025
dec1138
Add missing resource file
erichlf Jan 22, 2025
4b67fcd
Add PR template
erichlf Jan 22, 2025
a37019e
Fix testing
erichlf Jan 22, 2025
72ec7cd
Remove behavior_tree references from README
erichlf Jan 22, 2025
ec27685
Add pyproject file for linting
erichlf Jan 22, 2025
8b0f314
Try industrial_ci
erichlf Jan 22, 2025
68ed621
Update ruff action and pyproject.toml
erichlf Jan 22, 2025
a4f2ef2
Update linting rules and apply ruff
erichlf Jan 22, 2025
19f5cea
Remove commented lines in action
erichlf Jan 22, 2025
57cae04
Add linting test
erichlf Jan 22, 2025
da5d5cf
Fix copyright testing
erichlf Jan 22, 2025
76f97f3
Fix ruff version
erichlf Jan 22, 2025
1a7f568
Update change log
erichlf Jan 24, 2025
ad4c047
Add .local/bin to PATH for linting
erichlf Jan 27, 2025
6b676c4
Add .gitignore
erichlf Jan 27, 2025
b6e810f
Fix cascading args and add a test
erichlf Jan 28, 2025
4183600
Update PR template
erichlf Jan 30, 2025
31f1c9b
Pin py_trees_ros to a 2.3.0
erichlf Jan 30, 2025
a041d57
Update README and changelog
erichlf Jan 30, 2025
e9dc63a
Fix docstring
erichlf Jan 30, 2025
46a410f
Update test to include a nested subtree for cascading args
erichlf Jan 30, 2025
02f2d80
Remove unused dependencies
erichlf Jan 31, 2025
83c3788
Add example of python interpreter
erichlf Jan 31, 2025
c8e9722
Fix minor typos
erichlf Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions test/test_flake8.py → .ci/python/lint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2017 Open Source Robotics Foundation, Inc.
#!/usr/bin/env bash
# Copyright 2025 SAM-XL
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,12 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
from ament_flake8.main import main_with_errors
set -ex

export PATH=$PATH:$HOME/.local/bin
pip install ruff==0.9.2

# lint the code (replaces flake8, isort, etc.)
ruff check .

# check if formatting is correct (~ equivalent of `black format --check`)
ruff format --check .

@pytest.mark.flake8
@pytest.mark.linter
def test_flake8():
rc, errors = main_with_errors(argv=[])
assert rc == 0, "Found %d code style errors / warnings:\n" % len(errors) + "\n".join(errors)
34 changes: 34 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Description of MR/PR...

Fixes #

## Motivation and Context

Why is this change implemented? Add screenshots, images, or other media if this helps explain.

## Changes

- Item 1
- Item 2

## Type of changes

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to change)

[comment]: # (Delete the lines in "Type of changes" that are not appropriate)

## Checklist

- [ ] Update dependencies
- [ ] Update version
- [ ] Update README

## Testing

This should contain instructions on how to test the new code, or details on how
the new code was tested, e.g.

1. `colcon build --packages-up-to py_trees_parser`
2. `colcon test --event-handlers console_cohesion+ --packages-select py_trees_parser`
28 changes: 28 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on: # this determines when this workflow is run
pull_request:
workflow_dispatch: # allow manually starting this workflow

jobs:
industrial_ci:
name: ROS ${{ matrix.ROS_DISTRO }} (${{ matrix.ROS_REPO }})
runs-on: ubuntu-latest
strategy:
# fail-fast: false # uncomment if failing jobs should not cancel the others immediately
matrix: # matrix is the product of entries
ROS_DISTRO: [humble]
ROS_REPO: [main]
env:
UPSTREAM_WORKSPACE: .repos
steps:
- name: Checkout out Git repository
uses: actions/checkout@v4 # clone target repository
- name: Run python linting
uses: chartboost/ruff-action@v1
with:
config: pyproject.toml
changed-files: true
- name: Run unit tests
uses: ros-industrial/industrial_ci@master # run industrial_ci
env: # either pass all entries explicitly
ROS_DISTRO: ${{ matrix.ROS_DISTRO }}
ROS_REPO: ${{ matrix.ROS_REPO }}
68 changes: 68 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Python
__pycache__/
*.py[cod]
*.pyo
*.pyd
*.egg-info/
dist/
build/
.eggs/
*.egg

# ROS 2 specific
build/
install/
log/
*.so
*.dSYM/
*.swp
*.swo

# VS Code settings
.vscode/
*.code-workspace

# Pytest
.cache/
*.cover
*.coverage
nosetests.xml
coverage.xml
*.log

# Jupyter Notebook
.ipynb_checkpoints

# Environment variables
.env
.venv/
venv/
env/
ENV/
env.bak/
venv.bak/

# MacOS
.DS_Store

# Linux
*~

# Temporary files
*.tmp
*.temp
*.bak
*.orig
*.swp
*.swo

# IDE specific
.idea/
*.iml
*.ipr
*.iws

# Other
*.log
*.out
*.err
10 changes: 10 additions & 0 deletions .repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repositories:
vendors/py_trees:
type: git
url: https://github.com/splintered-reality/py_trees.git
version: 2.2.3

vendors/py_trees_ros:
type: git
url: https://github.com/splintered-reality/py_trees_ros.git
version: 2.3.0
30 changes: 8 additions & 22 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
Changelog for package behavior_tree
Changelog for package py_trees_parser

.. This is only a rough description of the main changes of the repository
0.6.0 (2025-01-24)
------------------
* Split py_trees_parser out into its own repo

0.5.0 (2024-10-14)
------------------
* Use `args` in subtrees

0.4.0 (2024-09-18)
------------------
* Make `ImageDict` more encapsulated, by adding setters and getters
* Remove Thermoplast specific sensors from `ImageDict`
* Generalize `Robot._sensors` and its subscriptions
* Generalize `Robot._triggers` and its services
* Fix bug in `camera_info` subscription that used wrong data type
* Improve encapsulation of Robot
* No relevant changes for py_trees_parser

0.3.0 (2024-09-03)
------------------
Expand All @@ -24,27 +23,14 @@ Changelog for package behavior_tree
* Bump version
* Add `Changelog`

0.1.7 (2024-08-14)
------------------
* Add Joint motion behaviors: `MoveToNamedTarget` and `MoveJoint`
* Create `Pick and Place` pipeline

0.1.4 (2024-08-02)
------------------
* Add a `RepeatFromBlackboard` Behavior

0.1.2 (2024-07-24)
------------------
* Add a `SetABBIOSignal` Behavior

0.1.0 (2024-07-23)
------------------
* Create a cartesian motion behavior `MoveCartesian`
* No relevant changes for py_trees_parser

0.0.3 (2024-07-03)
------------------
* Add the ability to include subtrees

0.0.2 (2024-04-02)
------------------
* First release of behavior_tree
* First release of py_trees_parser
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Any contribution that you make to this repository will
be under the Apache 2 License, as dictated by that
[license](http://www.apache.org/licenses/LICENSE-2.0.html):

~~~
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
~~~
Loading
Loading