Skip to content

Fix front.dag against id-keyed meshed DAG.graph; run module doctests in CI - #48

Merged
thorwhalen merged 1 commit into
masterfrom
fix/dag-func-id-and-doctests-in-ci
Oct 20, 2026
Merged

thorwhalen merged 1 commit into
masterfrom
fix/dag-func-id-and-doctests-in-ci

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

Closes #47

What

  • front/dag.py: the producer and consumers of a var node are now found from dag.func_nodes (fn.out == var_node, var_node in fn.bind.values()) instead of parents/children over dag.graph. Since DAG.graph keyed by func_id; name alias gaps meshed#87, dag.graph is keyed by func_id strings, so those lookups returned strings and _validate_is_func_node raised Parent (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"] plus addopts = --doctest-modules --ignore=front/examples --ignore=front/scrap. The wads CI already passes --doctest-modules, but testpaths restricted collection to tests/, so module doctests and front/tests/ never ran in CI (20 items collected). Now 97.
  • .claude/CLAUDE.md: test instructions updated (a bare pytest now 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

…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>
@thorwhalen
thorwhalen merged commit ae255f1 into master Oct 20, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the fix/dag-func-id-and-doctests-in-ci branch October 20, 2026 16:37
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.

front.dag is broken against meshed >= the DAG.graph func_id change (doctests not run in CI)

1 participant