refactor: replace networkx with graphlib in sort_definitions - #1
Open
bananaplain wants to merge 1 commit into
Open
bananaplain wants to merge 1 commit into
bananaplain wants to merge 1 commit into
Conversation
bananaplain
force-pushed
the
refactor/replace-networkx-with-graphlib
branch
2 times, most recently
from
September 29, 2026 07:29
3e54b21 to
e494573
Compare
networkx breaks on Python 3.14.1 and was only used to sort concept definitions and reject cycles. graphlib from the stdlib does both, and graph.py lists the cycles with Johnson's algorithm, written from the paper without recursion. The cycle error shows every definition on each cycle, capped at ten. sort_definitions and graph.py get direct tests.
bananaplain
force-pushed
the
refactor/replace-networkx-with-graphlib
branch
from
September 29, 2026 08:03
e494573 to
9cd8f66
Compare
NejcS
approved these changes
Sep 29, 2026
NejcS
left a comment
There was a problem hiding this comment.
Implementation code and tests look good.
This branch has not been deployed
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.
networkx was only used to sort concept definitions and reject cycles. graphlib from the stdlib does both.
The one behavioural change is that cycle error now lists every concept definition on one cycle instead of just printing the first two of the cycle.
sort_definitionsgets its first direct tests.