Issue #43 - Update wrapped gp_ functions in full subpackage so that they raise exceptions when cgraphLib returns NOTOK#44
Merged
Conversation
…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
commented
Apr 30, 2026
wbkboyer
commented
Apr 30, 2026
john-boyer-phd
requested changes
Apr 30, 2026
Member
john-boyer-phd
left a comment
There was a problem hiding this comment.
Just two little tweaks on gp_Embed() and gp_TestEmbedResultIntegrity() to avoid direct comparison to NOTOK.
…sultIntegrity()`) to explicitly test against `OK`/`NONEMBEDDABLE`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #43
Dependency of
graph_algorithms:edge-addition-planarity-suite-testingPR #3Type of change
Please check only relevant options:
Changes
Added
Updated
planarity/full/planarity.pyx-Graph.gp_Embed()andGraph.gp_TestEmbedResultIntegrity()check the return code from thecgraphLibfunctions they wrap and raise exceptions if the result is neitherOKnorNONEMBEDDABLE. Also cleaned up instances where we were referring tocappcost.OK/NONEMBEDDABLE, since we already added those constants to the namespace.planarity/full/planarity.c- updated compiled.cfile forplanarity.pyx(rebuilt using Python 3.14.3, Cython 3.2.4, setuptools 82.0.1 on MacOS 26.3.1)Removed
Testing
test_all_graphs.pyandtest_table_generation_with_numInvalidOKs.pyfromgraph_algorithms:edge-addition-planarity-suite-testingand ensured no exceptions were raised on happy-path