Repository navigation
Fix front.dag against id-keyed meshed DAG.graph; run module doctests in CI - #48
Merged
Merged
Conversation
…in CI meshed re-keyed DAG.graph by func_id strings, so the parents/children of a var node in dag.graph are no longer FuncNode instances and _node_replacements_for_var_node_crudification raised "must be a FuncNode". Find the producing and consuming func nodes from dag.func_nodes (out and bind) instead, which works with both the old and new graph keying. CI collected only tests/ (testpaths), so the front/dag.py doctests and front/tests never ran. testpaths now includes front, with --doctest-modules and the examples/scrap ignores in addopts, so a bare pytest runs everything. Closes #47 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #47
What
front/dag.py: the producer and consumers of a var node are now found fromdag.func_nodes(fn.out == var_node,var_node in fn.bind.values()) instead ofparents/childrenoverdag.graph. Since DAG.graph keyed by func_id; name alias gaps meshed#87,dag.graphis keyed byfunc_idstrings, so those lookups returned strings and_validate_is_func_noderaisedParent (foo) of var_node='foo_output' must be a FuncNode. The new lookups do not depend on how meshed keys its graph. Small doctests added for the two helpers.pyproject.toml:testpaths = ["tests", "front"]plusaddopts = --doctest-modules --ignore=front/examples --ignore=front/scrap. The wads CI already passes--doctest-modules, buttestpathsrestricted collection totests/, so module doctests andfront/tests/never ran in CI (20 items collected). Now 97..claude/CLAUDE.md: test instructions updated (a barepytestnow runs everything).Tests
All 97 pass locally (CI-equivalent invocation and bare
pytest); no other doctest failures surfaced, so no follow-up was needed.🤖 Generated with Claude Code
https://claude.ai/code/session_01WbXPoGdRqSs54sWhBnyaFS