Skip to content

Issue #37 - Update planarity/c/graphLib/ contents + corresponding .pxd definition files + .pyx Cython source files in preparation for EAPS 4.0.2 release#38

Open
wbkboyer wants to merge 1 commit intomasterfrom
Issue37-graphLibBump
Open

Issue #37 - Update planarity/c/graphLib/ contents + corresponding .pxd definition files + .pyx Cython source files in preparation for EAPS 4.0.2 release#38
wbkboyer wants to merge 1 commit intomasterfrom
Issue37-graphLibBump

Conversation

@wbkboyer
Copy link
Copy Markdown
Member

@wbkboyer wbkboyer commented Mar 27, 2026

Contributes to #37

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/c/graphLib/ - Updated to reflect c/graphLib/ of current EAPS HEAD of master
  • planarity/classic/
    • cplanarity.pxd - gp_IsArc() now takes the graphP as well as the vertex index
    • planarity.pyx - updated calls to gp_IsArc() with the first parameter being the graphP associated with the Cython PGraph object.
    • planarity.c - rebuilt on MacOS Tahoe 26.3.1 using Cython 3.2.4 with clang 22.1.1
  • planarity/full/
    • cg6IterationDefs.pxd - updated function names to reflect changes to the graphLib
    • cgraphLib.pxd - updated function and macro names and parameterization to reflect changes to the graphLib
    • g6IterationUtils.pyx - updated G6(Read|Write)Iterator Cython classes so that method names match the C graphLib function names. Note also that we no longer end iteration before freeing (i.e. removed redundant behaviour in the graphLib).
    • graph.pyx - Updated Graph Cython class so that method names match the C graphLib function/macro names (taking care to ensure the right macros are being used due to the distinction of Principal Vertices vs. Virtual Vertices vs. Any Type Vertices), and updated the arguments passed down to the C layer. Also refined error messages.
    • g6IterationUtils.c and graph.c - rebuilt on MacOS Tahoe 26.3.1 using Cython 3.2.4 with clang 22.1.1

Removed

  • N/A

Testing

  • Outline manual or automated tests performed and how it relates to the particular feature added or functionality changed
    • Tested that classic scripts all still produce expected output
    • Ran pytest tests/
    • Updated (currently private) EAPS testing Python script repo to leverage the wrapper to ensure test_all_graphs.py and edge_deletion_analysis.py both produce the same OK/NONEMBEDDABLE results for N=6,10.
      • NOTE: One test I did not perform was to replace the files fixed to resolve EAPS Issue #105 with their versions as of the prior commit (89ca75) to reproduce the pre-fix numInvalidOKs counts for $K_{3,3}$ search.
      • NOTE: Haven't uploaded the updated package to TestPyPI and installed into virtual environment to run the aforementioned Python scripts; once the 4.0.2 release is cut, this more comprehensive testing will be done!
  • Upload logs or provide relevant snippets of terminal output to demo functionality
Testing classic subpackage functionality

Running examples/ scripts:

(.buildenv) wbkboyer@Wandas-MacBook-Pro git % python planarity/examples/ascii.py 
----1----
| | |   |
| | -3--|
| |  ||||
| -4--|||
|  |  |||
---2---||
 |     ||
 ---5----
         

(.buildenv) wbkboyer@Wandas-MacBook-Pro git % python planarity/examples/graph_formats.py 
False
False
False
False
(.buildenv) wbkboyer@Wandas-MacBook-Pro git % python planarity/examples/kuratowski.py 
False
[('c', 'd'), ('c', 'b'), ('c', 'e'), ('c', 'a'), ('b', 'a'), ('b', 'e'), ('b', 'd'), ('a', 'd'), ('a', 'e'), ('d', 'e')]
True
[]
(.buildenv) wbkboyer@Wandas-MacBook-Pro git % python planarity/examples/networkx_draw.py 
Ignoring fixed y limits to fulfill fixed data aspect with adjustable data limits.
(.buildenv) wbkboyer@Wandas-MacBook-Pro git % python planarity/examples/networkx_interface.py 
False
[(0, 3), (0, 2), (0, 4), (0, 1), (3, 1), (3, 2), (3, 4), (2, 1), (2, 4), (4, 1)]
(.buildenv) wbkboyer@Wandas-MacBook-Pro git % python planarity/examples/pgraph_class.py 
[0, 1, 2, 3, 4]
{1: 0, 2: 1, 3: 2, 4: 3, 5: 4}
[(0, 4), (0, 3), (0, 2), (0, 1), (1, 4), (1, 3), (1, 2), (2, 4), (2, 3), (3, 4)]
False
[(0, 3), (0, 2), (0, 4), (0, 1), (1, 3), (1, 4), (1, 2), (2, 4), (2, 3), (3, 4)]
----1----
|  |    |
|  --5--|
|   || ||
--4--| ||
 ||  | ||
 |--2--||
 |    |||
 ---3----
         

(.buildenv) wbkboyer@Wandas-MacBook-Pro git % python planarity/examples/write_adjlist.py 
{1: 'd', 2: 'b', 3: 'c', 4: 'e', 5: 'a'}

pytest results:

(.buildenv) wbkboyer@Wandas-MacBook-Pro git % pytest -v planarity/tests
============================================================================================== test session starts ===============================================================================================
platform darwin -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 -- /Users/wbkboyer/git/planarity/.buildenv/bin/python3.14
cachedir: .pytest_cache
rootdir: /Users/wbkboyer/git/planarity
configfile: pyproject.toml
collected 19 items                                                                                                                                                                                               

planarity/tests/test_planarity.py::TestPlanarity::test_is_planar_edgelist_input PASSED                                                                                                                     [  5%]
planarity/tests/test_planarity.py::TestPlanarity::test_is_planar_edgelist_input_function PASSED                                                                                                            [ 10%]
planarity/tests/test_planarity.py::TestPlanarity::test_is_planar_adj_input PASSED                                                                                                                          [ 15%]
planarity/tests/test_planarity.py::TestPlanarity::test_is_planar_adj_input_function PASSED                                                                                                                 [ 21%]
planarity/tests/test_planarity.py::TestPlanarity::test_is_planar_adj_symmetric PASSED                                                                                                                      [ 26%]
planarity/tests/test_planarity.py::TestPlanarity::test_is_planar_adj_set PASSED                                                                                                                            [ 31%]
planarity/tests/test_planarity.py::TestPlanarity::test_is_planar_adj_list PASSED                                                                                                                           [ 36%]
planarity/tests/test_planarity.py::TestPlanarity::test_goldner_harary PASSED                                                                                                                               [ 42%]
planarity/tests/test_planarity.py::TestPlanarity::test_kuratowski_k5 PASSED                                                                                                                                [ 47%]
planarity/tests/test_planarity.py::TestPlanarity::test_kuratowski_k5_function PASSED                                                                                                                       [ 52%]
planarity/tests/test_planarity.py::TestPlanarity::test_no_kuratowski_k5m PASSED                                                                                                                            [ 57%]
planarity/tests/test_planarity.py::TestPlanarity::test_draw_text PASSED                                                                                                                                    [ 63%]
planarity/tests/test_planarity.py::TestPlanarity::test_write_adjlist PASSED                                                                                                                                [ 68%]
planarity/tests/test_planarity_networkx.py::TestPlanarityNetworkX::test_is_planar PASSED                                                                                                                   [ 73%]
planarity/tests/test_planarity_networkx.py::TestPlanarityNetworkX::test_is_planar_unions PASSED                                                                                                            [ 78%]
planarity/tests/test_planarity_networkx.py::TestPlanarityNetworkX::test_goldner_harary PASSED                                                                                                              [ 84%]
planarity/tests/test_planarity_networkx.py::TestPlanarityNetworkX::test_kuratowski_k5 PASSED                                                                                                               [ 89%]
planarity/tests/test_planarity_networkx.py::TestPlanarityNetworkX::test_kuratowski_k5m PASSED                                                                                                              [ 94%]
planarity/tests/test_planarity_networkx.py::TestPlanarityNetworkX::test_networkx_graph PASSED                                                                                                              [100%]

=============================================================================================== 19 passed in 0.07s ===============================================================================================

Zip files of tables vs. prior version of graphLib:

tables.zip
tables-old.zip

…D of master.

Tested that classic scripts all still produce expected output, ran pytest, and updated (currently private) EAPS testing Python script repo to leverage the wrapper to ensure test_all_graphs.py and edge_deletion_analysis.py both produce the same OK/NONEMBEDDABLE results for N=6,10.
@wbkboyer wbkboyer requested a review from john-boyer-phd March 27, 2026 01:02
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.

Fix defect that K_{3,3} search doesn't find a K_{3,3} homeomorph in the 6-vertex 13-edge graph with G6 encoding of EV~w

1 participant