Skip to content

fix(bindings) : Python examples not working#47

Merged
Meow404 merged 6 commits intomainfrom
stephen/fix/python-examples
Apr 2, 2026
Merged

fix(bindings) : Python examples not working#47
Meow404 merged 6 commits intomainfrom
stephen/fix/python-examples

Conversation

@Meow404
Copy link
Copy Markdown
Collaborator

@Meow404 Meow404 commented Mar 10, 2026

Fixes #46

Includes:

  • Fixes for python examples
  • Smoke tests for python bindings

This change is Reviewable

@Meow404 Meow404 requested a review from xuanhien070594 March 10, 2026 04:20
@Meow404 Meow404 force-pushed the stephen/fix/python-examples branch 9 times, most recently from da522f2 to 33096b0 Compare March 12, 2026 14:26
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 12, 2026

LCOV of commit f8df04e during C3 Coverage #132

Summary coverage rate:
  lines......: 92.7% (1806 of 1948 lines)
  functions..: 80.0% (160 of 200 functions)
  branches...: 48.6% (1495 of 3074 branches)

Files changed coverage rate:
                                            |Lines       |Functions  |Branches    
  Filename                                  |Rate     Num|Rate    Num|Rate     Num
  ================================================================================
  core/c3.cc                                | 7.7%    284|2695%    21|    -      0

@Meow404 Meow404 force-pushed the stephen/fix/python-examples branch from f857f1b to 0d5e191 Compare March 12, 2026 17:27
@Meow404
Copy link
Copy Markdown
Collaborator Author

Meow404 commented Mar 12, 2026

@xuanhien070594 sorry for the delay, setting up CI took sometime. Should be good to review now.

@Meow404 Meow404 self-assigned this Mar 18, 2026
@xuanhien070594
Copy link
Copy Markdown
Contributor

.cirrus.yml line 16 at r1 (raw file):

    - export CXX=clang++-15
    - apt update && apt install -y python3-venv
    - python3 -m venv .venv --system-site-packages

Do we need to pin down python version?

@xuanhien070594
Copy link
Copy Markdown
Contributor

bindings/pyc3/test/test_c3.py line 145 at r1 (raw file):

def _data_path(relative):

we already have _data_path function from above right?

@xuanhien070594
Copy link
Copy Markdown
Contributor

bindings/pyc3/test_c3_smoke.py line 46 at r1 (raw file):

    # Accessors
    _ = lcs.A(), lcs.B(), lcs.D(), lcs.d()
    _ = lcs.E(), lcs.F(), lcs.H(), lcs.c()

These two lines look interesting. What do they serve?

@xuanhien070594
Copy link
Copy Markdown
Contributor

bindings/pyc3/test_c3_smoke.py line 46 at r1 (raw file):

Previously, xuanhien070594 (Hien Bui) wrote…

These two lines look interesting. What do they serve?

Nvm, you just want to check whether or not calling lcs.A() fails, right?

@xuanhien070594
Copy link
Copy Markdown
Contributor

bindings/pyc3/test/test_multibody.py line 8 at r1 (raw file):

def _data_path(relative):

This function is not used anywhere in this file.

@xuanhien070594
Copy link
Copy Markdown
Contributor

bindings/pyc3/test/test_systems.py line 21 at r1 (raw file):

def _data_path(relative):

This function is also not used anywhere.

Copy link
Copy Markdown
Contributor

@xuanhien070594 xuanhien070594 left a comment

Choose a reason for hiding this comment

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

@xuanhien070594 reviewed 16 files and all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on Meow404).

Copy link
Copy Markdown
Collaborator Author

@Meow404 Meow404 left a comment

Choose a reason for hiding this comment

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

@Meow404 made 5 comments.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on xuanhien070594).


.cirrus.yml line 16 at r1 (raw file):

Previously, xuanhien070594 (Hien Bui) wrote…

Do we need to pin down python version?

I'm using the system python version. Are you referring to these or the python package versions?


bindings/pyc3/test_c3_smoke.py line 46 at r1 (raw file):

Previously, xuanhien070594 (Hien Bui) wrote…

Nvm, you just want to check whether or not calling lcs.A() fails, right?

Yes that's right!


bindings/pyc3/test/test_c3.py line 145 at r1 (raw file):

Previously, xuanhien070594 (Hien Bui) wrote…

we already have _data_path function from above right?

Done.


bindings/pyc3/test/test_multibody.py line 8 at r1 (raw file):

Previously, xuanhien070594 (Hien Bui) wrote…

This function is not used anywhere in this file.

Done.


bindings/pyc3/test/test_systems.py line 21 at r1 (raw file):

Previously, xuanhien070594 (Hien Bui) wrote…

This function is also not used anywhere.

Done.

@xuanhien070594
Copy link
Copy Markdown
Contributor

.cirrus.yml line 16 at r1 (raw file):

Previously, Meow404 (Thomas Stephen Felix) wrote…

I'm using the system python version. Are you referring to these or the python package versions?

I mean the system python version on cirrus CI. I'm not sure which version we are using, but if it is too old, it might not be compatible to newer Drake in the future.

@Meow404
Copy link
Copy Markdown
Collaborator Author

Meow404 commented Apr 1, 2026

I removed test_c3_smoke its an artifact, all the functionalities are covered under test_c3

xuanhien070594
xuanhien070594 previously approved these changes Apr 1, 2026
Copy link
Copy Markdown
Contributor

@xuanhien070594 xuanhien070594 left a comment

Choose a reason for hiding this comment

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

:lgtm:

@xuanhien070594 reviewed 4 files and all commit messages, made 1 comment, and resolved 4 discussions.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Meow404).

@Meow404
Copy link
Copy Markdown
Collaborator Author

Meow404 commented Apr 1, 2026

@xuanhien070594 Ill need to add a few more tests after rebase.

@Meow404 Meow404 force-pushed the stephen/fix/python-examples branch from c5412b5 to f8df04e Compare April 1, 2026 18:12
@Meow404 Meow404 requested a review from xuanhien070594 April 1, 2026 19:31
Copy link
Copy Markdown
Contributor

@xuanhien070594 xuanhien070594 left a comment

Choose a reason for hiding this comment

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

:lgtm:

@xuanhien070594 reviewed 9 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on Meow404).

@Meow404 Meow404 merged commit 8b795cd into main Apr 2, 2026
4 of 5 checks passed
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.

Python examples are not working

2 participants