Skip to content

Issue #52 - More updates to planarity package resulting from upcoming EAPS 5.0 changes#53

Merged
john-boyer-phd merged 1 commit into
masterfrom
Issue52-MoreEAPS50Changes
May 28, 2026
Merged

Issue #52 - More updates to planarity package resulting from upcoming EAPS 5.0 changes#53
john-boyer-phd merged 1 commit into
masterfrom
Issue52-MoreEAPS50Changes

Conversation

@wbkboyer
Copy link
Copy Markdown
Member

Resolves #52

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

Merged EAPS graphLib updates into planarity/c/graphLib resulting from EAPS PR #217 and EAPS PR #221, and made sure all functions/methods are declared and defined in the correct order in:

  • cgraphLib.pxd,
  • cplanarity.pxd (no changes to planarity/classic/planarity.pyx needed),
  • graphLib.pxd,
  • graphLib.pyx,
  • graph.pyx

Added gp_DynamicAddEdge() to cgraphLib.pxd, surfaced in graphLib.pxd and wrapped in graphLib.pyx, then added to Graph in graph.pyx.

  • NOTE gp_DynamicAddEdge() is not called in the EAPS testing layer at this time, so direct validation has not yet been performed.

Changed order of g6_EndReached() in g6ReadIterationUtils.pyx, since this was left out of #50

Testing

  • Outline manual or automated tests performed and how it relates to the particular feature added or functionality changed
    • With .venv activated, ran pip install . to install planarity and then ran python examples/full/test_quiet_mode.py to verify
  • Upload logs or provide relevant snippets of terminal output to demo functionality
Local install and ran test_quiet_mode.py
(.venv) wbkboyer@Wandas-MacBook-Pro planarity % pip install .
Processing ./.
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: planarity
  Building wheel for planarity (pyproject.toml) ... done
  Created wheel for planarity: filename=planarity-0.7.16-cp314-cp314-macosx_10_15_universal2.whl size=577823 sha256=2f5816f36443bc6c3972d1adce1cb101078f7c574ddfba13fdb8a0416e56116e
  Stored in directory: /private/var/folders/t1/2kcfnw2902x6gjpfcq7l1r800000gn/T/pip-ephem-wheel-cache-iyzts0f1/wheels/f6/1f/0d/a5e38904ca67ef2dba8c48031ec1d06d406fd3d0fd23e39f0c
Successfully built planarity
Installing collected packages: planarity
  Attempting uninstall: planarity
    Found existing installation: planarity 0.7.16
    Uninstalling planarity-0.7.16:
      Successfully uninstalled planarity-0.7.16
Successfully installed planarity-0.7.16
(.venv) wbkboyer@Wandas-MacBook-Pro planarity % python examples/full/test_quiet_mode.py                              
Trying to init reader with nonexistent file 'DOES_NOT_EXIST.g6'.
	gp_ErroMessage() MUST NOT appear before stacktrace, as  quietModeFlag is TRUE:
-------------------------
-------------------------
Traceback (most recent call last):
  File "/Users/wbkboyer/git/planarity/examples/full/test_quiet_mode.py", line 52, in <module>
    reader.g6_InitReaderWithFileName(filename)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "planarity/full/g6IterationUtils.pyx", line 47, in planarity.full.g6IterationUtils.G6ReadIterator.g6_InitReaderWithFileName
    raise RuntimeError(
RuntimeError: Unable to initialize reader with filename, as g6_InitReaderWithFileName() in EAPS graphLib failed.

==================================================

Trying to init reader with nonexistent file 'DOES_NOT_EXIST.g6'.
	gp_ErroMessage() MUST appear before stacktrace, as quietModeFlag is FALSE:
-------------------------
Unable to initialize reader with filename, as we failed to allocate the inputContainer.
-------------------------
Traceback (most recent call last):
  File "/Users/wbkboyer/git/planarity/examples/full/test_quiet_mode.py", line 69, in <module>
    reader.g6_InitReaderWithFileName(filename)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "planarity/full/g6IterationUtils.pyx", line 47, in planarity.full.g6IterationUtils.G6ReadIterator.g6_InitReaderWithFileName
    raise RuntimeError(
RuntimeError: Unable to initialize reader with filename, as g6_InitReaderWithFileName() in EAPS graphLib failed.
(.venv) wbkboyer@Wandas-MacBook-Pro planarity % 
Details

…from [EAPS PR #217](graph-algorithms/edge-addition-planarity-suite#217) and [EAPS PR #221](graph-algorithms/edge-addition-planarity-suite#221), and made sure all functions/methods are declared and defined in the correct order in:

* `cgraphLib.pxd`,
* `cplanarity.pxd` (no changes to `planarity/classic/planarity.pyx` needed),
* `graphLib.pxd`,
* `graphLib.pyx`,
* `graph.pyx`

Added `gp_DynamicAddEdge()` to `cgraphLib.pxd`, surfaced in `graphLib.pxd` and wrapped in `graphLib.pyx`, then added to `Graph` in `graph.pyx`. NOTE that this is not called in the EAPS testing layer at this time, so direct validation has not yet been performed.

Changed order of `g6_EndReached()` in `g6ReadIterationUtils.pyx`, since this was left out of #50
@wbkboyer wbkboyer requested a review from john-boyer-phd May 28, 2026 00:58
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.

Good to go!

@john-boyer-phd john-boyer-phd merged commit c9bc67b into master May 28, 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.

Merge further changes from EAPS graphLib for 5.0 release

2 participants