Skip to content

Issue #43 - Update wrapped gp_ functions in full subpackage so that they raise exceptions when cgraphLib returns NOTOK#44

Merged
john-boyer-phd merged 2 commits into
masterfrom
Issue43-RaiseOnNOTOK
May 4, 2026
Merged

Issue #43 - Update wrapped gp_ functions in full subpackage so that they raise exceptions when cgraphLib returns NOTOK#44
john-boyer-phd merged 2 commits into
masterfrom
Issue43-RaiseOnNOTOK

Conversation

@wbkboyer
Copy link
Copy Markdown
Member

@wbkboyer wbkboyer commented Apr 30, 2026

Resolves #43

Dependency of graph_algorithms:edge-addition-planarity-suite-testing PR #3

Type of change

Please check only relevant options:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Changes

Added

  • N/A

Updated

  • planarity/full/planarity.pyx - Graph.gp_Embed() and Graph.gp_TestEmbedResultIntegrity() check the return code from the cgraphLib functions they wrap and raise exceptions if the result is neither OK nor NONEMBEDDABLE. Also cleaned up instances where we were referring to cappcost.OK/NONEMBEDDABLE, since we already added those constants to the namespace.
  • planarity/full/planarity.c - updated compiled .c file for planarity.pyx (rebuilt using Python 3.14.3, Cython 3.2.4, setuptools 82.0.1 on MacOS 26.3.1)

Removed

  • N/A

Testing

…he return code from the cgraphLib functions they wrap and raise exceptions if NOTOK.

Also cleaned up instances where we were referring to cappcost.OK/NONEMBEDDABLE, since we already added those constants to the namespace.
@wbkboyer wbkboyer requested a review from john-boyer-phd April 30, 2026 22:56
Comment thread planarity/full/graph.pyx Outdated
Comment thread planarity/full/graph.pyx Outdated
Copy link
Copy Markdown
Member

@john-boyer-phd john-boyer-phd left a comment

Choose a reason for hiding this comment

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

Just two little tweaks on gp_Embed() and gp_TestEmbedResultIntegrity() to avoid direct comparison to NOTOK.

Comment thread planarity/full/graph.pyx Outdated
Comment thread planarity/full/graph.pyx Outdated
…sultIntegrity()`) to explicitly test against `OK`/`NONEMBEDDABLE`
@wbkboyer wbkboyer requested a review from john-boyer-phd April 30, 2026 23:56
Copy link
Copy Markdown
Member

@john-boyer-phd john-boyer-phd left a comment

Choose a reason for hiding this comment

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

Looks great!

@john-boyer-phd john-boyer-phd merged commit c9c5ffa into master May 4, 2026
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.

Make sure all wrapped gp_ functions in full subpackage raise exceptions for NOTOK

2 participants