Skip to content

feat: Complete simulator-agnostic TSR library overhaul with template generators #12

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

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
22df809
Refactor TSR library to remove OpenRAVE dependencies and modernize bu…
siddhss5 Jul 31, 2025
cf3de1d
Refactor TSR library: Remove legacy implementation and modernize code…
siddhss5 Aug 4, 2025
10ba73f
refactor: Complete simulator-agnostic TSR library overhaul
siddhss5 Aug 13, 2025
9c5874e
docs: Add conceptual explanation of relational library in README
siddhss5 Aug 13, 2025
49084d6
ci: Remove outdated Travis CI configuration
siddhss5 Aug 13, 2025
ff26196
feat: Add YAML serialization and semantic context to TSR templates
siddhss5 Aug 13, 2025
75d523a
docs: Update README with YAML serialization and semantic context feat…
siddhss5 Aug 13, 2025
4818eee
feat: Add comprehensive template I/O utilities for YAML file management
siddhss5 Aug 14, 2025
2fb5438
chore: Update project metadata and version to 1.0.0
siddhss5 Aug 14, 2025
39820a6
fix: Resolve type annotation issues in TSRLibraryRelational
siddhss5 Aug 14, 2025
b9d5e66
feat: Add template directory with example YAML files
siddhss5 Aug 14, 2025
534cd4a
feat: Add template generators for primitive objects
siddhss5 Aug 14, 2025
e7ba0cc
ci: Add GitHub Actions CI workflow
siddhss5 Aug 14, 2025
40af34c
chore: Enhance pyproject.toml for CI and development
siddhss5 Aug 14, 2025
43d5749
fix: Fix CI workflow issues
siddhss5 Aug 14, 2025
c44972f
fix: Use string literals for Python versions in CI matrix
siddhss5 Aug 14, 2025
e00e32a
fix: Fix CI compatibility issues
siddhss5 Aug 14, 2025
1468e75
fix: Use cross-platform directory listing in CI
siddhss5 Aug 14, 2025
d6fd12e
fix: Use dir command that works on all platforms
siddhss5 Aug 14, 2025
e12d6b8
fix: Use Python for cross-platform directory listing
siddhss5 Aug 14, 2025
d77add5
fix: Install build dependency in CI build job
siddhss5 Aug 14, 2025
11d2a52
fix: Create virtual environment in build job
siddhss5 Aug 14, 2025
ccbf61a
feat: Add optional preshape field to TSR templates
siddhss5 Aug 14, 2025
f4aebcd
docs: Update READMEs with preshape functionality documentation
siddhss5 Aug 14, 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
138 changes: 138 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: CI

on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]

jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
# Exclude some combinations to reduce CI time
- os: windows-latest
python-version: "3.8"
- os: windows-latest
python-version: "3.9"
- os: macos-latest
python-version: "3.8"

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v2
with:
version: latest

- name: Cache uv dependencies
uses: actions/cache@v3
with:
path: |
.venv
.uv/cache
key: ${{ runner.os }}-${{ matrix.python-version }}-uv-${{ hashFiles('**/pyproject.toml', '**/uv.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-uv-

- name: Install dependencies
run: |
uv venv
uv pip install -e ".[test]"
uv pip list

- name: Run tests
run: |
uv run pytest tests/ -v --tb=short
# Ensure pytest is available
uv run python -c "import pytest; print(f'Pytest version: {pytest.__version__}')"

- name: Run performance benchmarks
run: |
uv run pytest tests/benchmarks/ -v --tb=short

- name: Test package import
run: |
uv run python -c "import tsr; print('Package imports successfully')"
uv run python -c "from tsr import TSR, TSRTemplate, generate_mug_grasp_template; print('Core features import successfully')"

- name: Test examples directory
run: |
# Test that examples directory exists and contains expected files
python -c "import os; print('Examples files:', os.listdir('examples/'))"
echo "Examples directory structure verified"

# Separate job for testing with pip (to ensure compatibility)
test-pip:
name: Test with pip (Python 3.11)
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install dependencies with pip
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
pip list

- name: Run tests with pip
run: |
pytest tests/ -v --tb=short

- name: Test package import with pip
run: |
python -c "import tsr; print('Package imports successfully with pip')"
python -c "from tsr import TSR, TSRTemplate, generate_mug_grasp_template; print('Core features import successfully with pip')"

# Build and test package installation
build:
name: Build package
runs-on: ubuntu-latest
needs: test

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v2
with:
version: latest

- name: Build package
run: |
uv venv
uv pip install build
uv run python -m build

- name: Test built package
run: |
# Install the built package and test it
uv run pip install dist/*.whl
uv run python -c "import tsr; print('Built package imports successfully')"
uv run python -c "from tsr import TSR, TSRTemplate, generate_mug_grasp_template; print('Built package core features work')"
219 changes: 216 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,217 @@
*.pyc
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Generated by nosetest
*.noseids
# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be added to the global gitignore or merged into this project gitignore. For a PyCharm
# project, it is recommended to include the following files in version control:
# - .idea/modules.xml
# - .idea/*.iml
# - .idea/misc.xml
# - .idea/vcs.xml
# - .idea/workspace.xml
# - .idea/tasks.xml
# - .idea/usage.statistics.xml
# - .idea/shelf
# - .idea/dictionaries
# - .idea/inspectionProfiles
# - .idea/libraries
# - .idea/runConfigurations
# - .idea/scopes
# - .idea/tools
# - .idea/uiDesigner.xml
# - .idea/artifacts
# - .idea/compiler.xml
# - .idea/libraries with .xml
# - .idea/jarRepositories.xml
# - .idea/encodings.xml
# - .idea/misc.xml
# - .idea/modules.xml
# - .idea/*.iml
# - .idea/modules
# - *.iml
# - *.ipr
.idea/

# VS Code
.vscode/

# macOS
.DS_Store
.AppleDouble
.LSOverride

# Windows
Thumbs.db
ehthumbs.db
Desktop.ini

# Linux
*~

# ROS specific (if any remnants)
*.launch
*.urdf
*.sdf
*.world

# Temporary files
*.tmp
*.temp
*.swp
*.swo
*~

# uv specific
.uv/
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

10 changes: 0 additions & 10 deletions CMakeLists.txt

This file was deleted.

Loading
Loading