Skip to content
Merged

Dev #10

Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -42,8 +44,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
pip install -e '.[docs]'

- name: Build documentation
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- uses: pre-commit/action@v3.0.1
27 changes: 15 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,26 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
environment: pypi
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
cache: 'pip'
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools
pip install --upgrade build
pip install --upgrade twine
pip install -r requirements.txt
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
python -m twine upload dist/*
pip install build twine
- name: Build package
run: python -m build
- name: Verify package
run: twine check dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
37 changes: 7 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,32 @@ on:
branches: [ main, master ]

jobs:
build-linux:
runs-on: ubuntu-latest
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
- name: Testing with coverage
run: |
python -m pytest tests --cov=interpolatepy --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

build-macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
pip install -e '.[test]'
- name: Testing with coverage
run: |
python -m pytest tests --cov=interpolatepy --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,13 @@ venv.bak/
.history

CLAUDE.md

################################
########### C++ BUILD ##########
################################
cpp/build/
*.o
*.a
*.so
*.dylib
compile_commands.json
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ repos:
- id: check-toml

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.12.8'
rev: 'v0.15.7'
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [ --fix, --exit-non-zero-on-fix, --preview ]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.1
rev: v1.19.1
hooks:
- id: mypy
args: [--ignore-missing-imports]
Expand Down
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# InterpolatePy

![Python](https://img.shields.io/badge/python-3.10+-blue)
![Python](https://img.shields.io/badge/python-3.11+-blue)
[![PyPI Downloads](https://static.pepy.tech/badge/interpolatepy)](https://pepy.tech/projects/interpolatepy)
[![pre-commit](https://github.com/GiorgioMedico/InterpolatePy/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/GiorgioMedico/InterpolatePy/actions/workflows/pre-commit.yml)
[![ci-test](https://github.com/GiorgioMedico/InterpolatePy/actions/workflows/test.yml/badge.svg)](https://github.com/GiorgioMedico/InterpolatePy/actions/workflows/test.yml)
Expand All @@ -10,9 +10,9 @@

InterpolatePy provides 20+ algorithms for smooth trajectory generation with precise control over position, velocity, acceleration, and jerk. From cubic splines and B-curves to quaternion interpolation and S-curve motion profiles — everything you need for professional motion control.

**⚡ Fast:** Vectorized NumPy operations, ~1ms for 1000-point cubic splines
**🎯 Precise:** Research-grade algorithms with C² continuity and bounded derivatives
**📊 Visual:** Built-in plotting for every algorithm
**⚡ Fast:** Optional C++ backend with pybind11; pure-Python fallback uses vectorized NumPy
**🎯 Precise:** Research-grade algorithms with C² continuity and bounded derivatives
**📊 Visual:** Built-in plotting for every algorithm
**🔧 Complete:** Splines, motion profiles, quaternions, and path planning in one library

---
Expand All @@ -23,7 +23,7 @@ InterpolatePy provides 20+ algorithms for smooth trajectory generation with prec
pip install InterpolatePy
```

**Requirements:** Python ≥3.10, NumPy ≥2.0, SciPy ≥1.15, Matplotlib ≥3.10
**Requirements:** Python ≥3.11, NumPy ≥2.3, SciPy ≥1.16, Matplotlib ≥3.10.5

<details>
<summary><strong>Development Installation</strong></summary>
Expand Down Expand Up @@ -222,12 +222,23 @@ plt.show()

## Performance & Quality

- **Fast:** Vectorized NumPy operations, optimized algorithms
- **Reliable:** 85%+ test coverage, continuous integration
- **Modern:** Python 3.10+, strict typing, dataclass-based APIs
- **Fast:** Optional C++ backend (Eigen + pybind11) for maximum performance; pure-Python fallback uses vectorized NumPy
- **Reliable:** 85%+ test coverage, continuous integration, 142 additional C++ unit tests
- **Modern:** Python 3.11+, strict typing, dataclass-based APIs
- **Research-grade:** Peer-reviewed algorithms from robotics literature

**Typical Performance:**
**C++ Backend:**

InterpolatePy includes an optional compiled C++ extension for performance-critical workloads. The API is identical regardless of backend:

```python
import interpolatepy
print(f"C++ backend: {interpolatepy.HAS_CPP}") # True if extension is available
```

Set `INTERPOLATEPY_NO_CPP=1` to force pure-Python mode.

**Typical Performance (pure-Python):**
- Cubic spline (1000 points): ~1ms
- B-spline evaluation (10k points): ~5ms
- S-curve trajectory planning: ~0.5ms
Expand Down Expand Up @@ -256,6 +267,8 @@ ruff format interpolatepy/
ruff check interpolatepy/
mypy interpolatepy/

# Run all pre-commit hooks
pre-commit run --all-files
```
</details>

Expand Down
2 changes: 0 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ ignore:
- "tests/*"
- "docs/*"
- "examples/*"
- "setup.py"
- "**/__init__.py"
Loading
Loading