Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2043710
explain the API
alexlib Mar 15, 2026
17214bb
created doc page with explanation and differences in native vs compil…
alexlib Mar 15, 2026
8360ec5
Update docs workflow and build artifacts
alexlib Mar 15, 2026
d91c308
Potential fix for pull request finding
alexlib Mar 15, 2026
8fe2e68
major shift/rename/move
alexlib Mar 17, 2026
df01c30
Merge branch 'integrate_pyptv' of https://github.com/alexlib/openptv-…
alexlib Mar 17, 2026
10012a6
updating api
alexlib Mar 18, 2026
cbbac56
Update pyptv pointer
alexlib Mar 18, 2026
4d01bc4
Update pyptv pointer
alexlib Mar 18, 2026
df6bfb2
Update pyptv backend shim
alexlib Mar 18, 2026
17bbf5e
Flatten pyptv into subfolder
alexlib Mar 18, 2026
b7049b8
Normalize package layout and test tree
alexlib Mar 18, 2026
9431c95
updating api
alexlib Mar 18, 2026
a4a299c
updated api
alexlib Mar 18, 2026
86b13bf
Reorganize pyptv imports and test data layout
alexlib Mar 18, 2026
4c48ec6
Consolidate test fixtures under testing_folder
alexlib Mar 18, 2026
bf6a4dd
removed symlinks
alexlib Mar 18, 2026
e032909
moved all the test folders to one directory
alexlib Mar 18, 2026
bfa9e47
updated path to testing_folder
alexlib Mar 18, 2026
75faca5
updated path in tests/pyptv
alexlib Mar 18, 2026
47cd323
should remove temporary files after tests
alexlib Mar 18, 2026
412e332
updated optv installation by default
alexlib Mar 18, 2026
37b8fb0
added .backend
alexlib Mar 20, 2026
370f4f7
updated versioning system
alexlib Mar 20, 2026
7001a08
updated engine selection
alexlib Mar 20, 2026
dc82e19
updated calibration parameters, but still tests do not pass well
alexlib Mar 20, 2026
76d9d27
updated backend compatibility
alexlib Mar 20, 2026
c5bc2fd
updating compatability
alexlib Mar 20, 2026
5ecbf8d
improving compatibility
alexlib Mar 20, 2026
e12d029
updated targets in tests
alexlib Mar 20, 2026
8fa0adf
updated tests pass
alexlib Mar 20, 2026
a3de54b
improving compatibility
alexlib Mar 20, 2026
0eb6af8
tests should use testing_folder
alexlib Mar 20, 2026
3e4598d
fixed compatibility
alexlib Mar 20, 2026
2ce5206
added time test
alexlib Mar 20, 2026
facaeda
updated more of optv - see native_backend_unification.md
alexlib Mar 20, 2026
512b76c
adjusting to optv
alexlib Mar 20, 2026
dd87e1d
should align with optv
alexlib Mar 20, 2026
685a166
trying to fix
alexlib Mar 20, 2026
5da454c
fixing tests
alexlib Mar 20, 2026
a8d297c
more tests pass. working on optv
alexlib Mar 20, 2026
4998562
most tests pass
alexlib Mar 20, 2026
3772e1a
small %d bug
alexlib Mar 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
110 changes: 110 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Publish Python Package to PyPI

# This workflow uses GitHub's OIDC trusted publishing to authenticate with PyPI.
# For this to work, you must configure trusted publishers on PyPI/TestPyPI:
# 1. Go to https://test.pypi.org/ or https://pypi.org/
# 2. Navigate to your project settings → Publishing
# 3. Add a new publisher with these details:
# - Owner: alexlib
# - Repository: openptv-python
# - Workflow: publish-to-pypi.yml
# - Environment: testpypi (for TestPyPI) or pypi (for PyPI)
#
# TROUBLESHOOTING:
# If you see "invalid-publisher" error, it means the trusted publisher is not configured
# correctly on PyPI/TestPyPI. The configuration MUST match these exact values:
# - Repository owner: alexlib
# - Repository name: openptv-python
# - Workflow filename: publish-to-pypi.yml (must be exact match)
# - Environment name: testpypi or pypi (must match exactly)
#
# For detailed setup instructions, see DEPLOYMENT.md

on:
release:
types: [published]
workflow_dispatch:
inputs:
deploy_target:
description: 'Deploy to PyPI or TestPyPI'
required: true
default: 'testpypi'
type: choice
options:
- pypi
- testpypi

jobs:
build:
name: Build distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine

- name: Build package
run: python -m build

- name: Check distribution
run: twine check dist/*

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish to PyPI
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_target == 'pypi')
needs: [build]
runs-on: ubuntu-latest
environment:
name: pypi # This must match the environment name in PyPI's trusted publisher config
url: https://pypi.org/p/openptv-python
permissions:
id-token: write # Required for trusted publishing via OIDC

steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

publish-to-testpypi:
name: Publish to TestPyPI
if: github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_target == 'testpypi'
needs: [build]
runs-on: ubuntu-latest
environment:
name: testpypi # This must match the environment name in TestPyPI's trusted publisher config
url: https://test.pypi.org/p/openptv-python
permissions:
id-token: write # Required for trusted publishing via OIDC

steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

24 changes: 24 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Python application

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run tests
run: |
make unit-tests
65 changes: 65 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version.py
# Sphinx automatic generation of API
docs/README.md
docs/_api/
docs/_generated/

# Combined environments
ci/combined-environment-*.yml
Expand Down Expand Up @@ -473,3 +474,67 @@ $RECYCLE.BIN/
.cruft.json
/.tmp
/tmp

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
*.pyc

# C extensions
*.so

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

# 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/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/


tests/testing_folder/test_cavity/res/*
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
PROJECT := openptv_python
CONDA := conda
CONDAFLAGS :=
UV := uv
UVFLAGS := --extra dev --upgrade
COV_REPORT := html
PYTHON ?= python

Expand All @@ -15,11 +17,16 @@ unit-tests:
type-check:
$(PYTHON) -m mypy .

env-update: uv-env-update

conda-env-update:
$(CONDA) install -y -c conda-forge conda-merge
$(CONDA) run conda-merge environment.yml ci/environment-ci.yml > ci/combined-environment-ci.yml
$(CONDA) env update $(CONDAFLAGS) -f ci/combined-environment-ci.yml

uv-env-update:
$(UV) sync $(UVFLAGS)

docker-build:
docker build -t $(PROJECT) .

Expand All @@ -30,6 +37,6 @@ template-update:
pre-commit run --all-files cruft -c .pre-commit-config-cruft.yaml

docs-build:
cp README.md docs/. && cd docs && rm -fr _api && make clean && make html
cp README.md docs/. && $(PYTHON) docs/render_native_stress_demo_include.py && cd docs && rm -fr _api && make clean && make html

# DO NOT EDIT ABOVE THIS LINE, ADD COMMANDS BELOW
Loading
Loading