Document the streaming-first graph-handling design principle

未关闭 适合新手
#191 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
documentation

调研方向

先阅读 docs/graphs/index.rst 中的“Memory characteristics”和“The NetworkX boundary”小节,以及 docs/tutorial.rst:111 附近提到流式处理的内容。在 docs/flpq.rst 中“Package structure”旁边添加“Graph handling: streaming-first”小节,然后从 docs/graphs/index.rst 添加一个交叉引用,并删除重复的边界说明文字。完成标准是:该小节已存在,交叉引用能够解析,且文档构建时没有失效引用。

由索引模型根据 Issue 内容生成。

描述

documentation task

Motivation

The streaming design is currently only described locally in docs/graphs/index.rst ("Format conversion" → "Memory characteristics" / "The NetworkX boundary") and passed by in docs/tutorial.rst:111. There is no global statement of the principle. This task adds it, using the pragmatic reading agreed in discussion (see the companion strict-reading discussion issue for the gaps this reading deliberately leaves as the in-memory boundary).

The principle (pragmatic reading — to be documented)

Graph handling is streaming-first. The primary way to read, convert, validate, and write graph data is over an edge stream — a lazy iterator of (u, label, v) tuples — keeping memory O(1) in the number of edges. Materializing a networkx.MultiDiGraph (O(V+E)) is allowed only when strictly necessary: (a) the RDF source (no streaming parser); (b) an operation whose contract is to produce or consume an in-memory graph object — the generators, the adjacency utilities, and the graph_from_*/graph_to_* loaders (the "NetworkX boundary"); (c) a consumer that needs the graph as a whole (e.g. an FLPQ solver). Where a function needs only a projection of the graph (e.g. the set of edge labels), it should take the narrowest input that suffices, not the full graph.

Placement

  • docs/flpq.rst — a new "Graph handling: streaming-first" section next to "Package structure" (the page that "records the design decisions"). States the rule once.
  • docs/graphs/index.rst — keeps the concrete per-format memory characteristics (it already has "Memory characteristics" and "The NetworkX boundary"); add a cross-reference up to the principle and align the boundary wording so it is described in one place.

Plan

  • S1. Add the "Graph handling: streaming-first" section to docs/flpq.rst with the principle text above.
  • S2. Cross-reference from docs/graphs/index.rst ("The NetworkX boundary" / "Memory characteristics") to the new section; align wording so the boundary is described once (no duplication).
  • S3. Build the docs (quality gate) to confirm no broken references.

Documentation-only task (no .py changed): skips code gates, still follows one-task-per-branch + code review.

Related

  • #189 — stream the graph/ validation (the first enforcement of the principle on the data pipeline).
  • Companion discussion issue — the strict-reading audit of the transform/generator layer.
主要语言
Python
星标
13
派生
16
平均合并
1 天 15 小时
30 天内合并 PR
7

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FormalLanguageConstrainedPathQuerying/FLPQ_Data 的其他 Issue

查看 FormalLanguageConstrainedPathQuerying/FLPQ_Data 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。