Skip to content

new python wrapper#75

Merged
nbassler merged 9 commits into
mainfrom
64-python-ctypes-bindings
Mar 29, 2026
Merged

new python wrapper#75
nbassler merged 9 commits into
mainfrom
64-python-ctypes-bindings

Conversation

@nbassler
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 28, 2026 23:56
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.41%. Comparing base (a678cf7) to head (052ead4).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #75      +/-   ##
==========================================
+ Coverage   58.07%   58.41%   +0.33%     
==========================================
  Files          31       32       +1     
  Lines        2359     2366       +7     
  Branches      290      290              
==========================================
+ Hits         1370     1382      +12     
+ Misses        982      977       -5     
  Partials        7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Python wrapper around libdedx using ctypes, supported by a new shared-library build target and CI coverage for the Python smoke tests.

Changes:

  • Introduce a pure-Python ctypes binding (python/libdedx.py) plus type stubs and pytest smoke tests.
  • Update CMake to build/install both static and shared dedx libraries (shared needed for dynamic consumers like Python).
  • Add/extend CI and dev-environment configuration for running Python tests, and adjust install smoke test runtime environment.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
tests/install_smoke_test.cmake Runs the installed consumer with an environment override for runtime library lookup.
python/tests/test_libdedx.py Adds basic smoke tests for the Python binding.
python/tests/conftest.py Auto-detects the built shared library path for local/CI test runs.
python/test.py Removes the old ad-hoc Python test script.
python/pyproject.toml Adds packaging metadata for installing the Python binding via setuptools.
python/libdedx.pyi Adds typing stubs for the Python API.
python/libdedx.py Implements the new ctypes wrapper API around C wrapper functions.
python/libdedx.c Removes the old CPython extension implementation.
python/README Removes the old Python binding README/instructions.
python/CMakeLists.txt Removes old CMake-based extension build logic.
libdedx/CMakeLists.txt Builds a shared library target alongside the static library (via an object library).
.vscode/settings.json Adds Python-specific VS Code settings for analysis/testing.
.vscode/extensions.json Updates recommended VS Code extensions (adds Python).
.gitignore Ignores Python venv/cache/build artifacts.
.github/workflows/python.yml Adds a dedicated Python workflow that builds and runs Python tests.
.github/workflows/ci.yml Adds a Python test job to the main CI workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/pyproject.toml
Comment thread libdedx/CMakeLists.txt Outdated
Comment thread libdedx/CMakeLists.txt Outdated
Comment thread .github/workflows/python.yml Outdated
Comment thread python/libdedx.py Outdated
Comment thread python/pyproject.toml Outdated
Comment thread tests/install_smoke_test.cmake Outdated
Comment thread .github/workflows/python.yml Outdated
Comment thread .vscode/settings.json Outdated
Comment thread python/tests/conftest.py
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/libdedx/_api.py
Comment thread python/libdedx/_api.py
Comment thread python/pyproject.toml Outdated
Comment thread .github/workflows/python.yml Outdated
Comment thread tests/test_version.c
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 19 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/libdedx/_api.py
Comment thread .vscode/settings.json Outdated
Comment thread python/pyproject.toml Outdated
nbassler and others added 2 commits March 29, 2026 03:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@nbassler nbassler linked an issue Mar 29, 2026 that may be closed by this pull request
41 tasks
@nbassler nbassler merged commit d2ac876 into main Mar 29, 2026
17 checks passed
@nbassler nbassler deleted the 64-python-ctypes-bindings branch March 29, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modernize repository

2 participants