Skip to content

Add MkDocs documentation with multi-language API reference - #33

Merged
hzhangxyz merged 7 commits into
mainfrom
copilot/generate-docs-generator
Nov 25, 2025
Merged

Add MkDocs documentation with multi-language API reference#33
hzhangxyz merged 7 commits into
mainfrom
copilot/generate-docs-generator

Conversation

Copilot AI commented Nov 25, 2025

Copy link
Copy Markdown
Contributor
  • Set up MkDocs with Material theme
  • Create mkdocs.yml configuration file
  • Create documentation structure (docs/ directory)
  • Add manual Python API documentation (consistent with TypeScript/C++)
  • Add manual TypeScript API documentation
  • Add manual C++ API documentation
  • Create index page and navigation structure
  • Add Getting Started guides (installation, quickstart)
  • Add Core Concepts documentation (terms, rules, search)
  • Add Examples page
  • Update pyproject.toml with docs dependencies
  • Update .gitignore for documentation artifacts (site/)
  • Test documentation build locally
  • Fix architecture diagram alignment
  • Reorder installation sections to TypeScript, Python, C++
  • Update Node.js version requirement from 16+ to 20+
  • Remove compiler examples from C++ requirements
  • Remove ?.toString() usage in TypeScript examples
  • Remove "Logical Systems" and "Custom Domains" sections from rules.md
  • Rewrite Python API reference manually for consistency
  • Add C++ examples to term/rule grounding and renaming sections
  • Ensure consistent structure between terms.md and rules.md (Term Operations / Rule Operations sections)
  • Ensure TypeScript, Python, C++ order in all tabbed examples
  • Fix C++ Utility Functions to only document implemented functions (text_to_term, term_to_text, text_to_rule, rule_to_text)
  • Fix Python Requirements to use heading format (### Requirements) matching TypeScript and C++
Original prompt

This section details on the original issue you should resolve

<issue_title>Generate docs by mkdocs(prefer but not decided) or other tools.</issue_title>
<issue_description>one docs generator for all of typescript, python and c++.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 25, 2025 12:41
Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>
Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add documentation generator for TypeScript, Python, and C++ Add MkDocs documentation with multi-language API reference Nov 25, 2025
Copilot AI requested a review from hzhangxyz November 25, 2025 12:46
@hzhangxyz
hzhangxyz marked this pull request as ready for review November 25, 2025 12:47

@hzhangxyz hzhangxyz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 请使用mkdocstrings来做c++和typescript的reference, c++的docstring是中文, 请无视,后面我会在另一个issue/pr处理这个, 你直接使用docstring做reference
  2. 开头的架构的格式有点问题, 你的制表符错位了几个, 你可以抄下面这个
┌────────────────────────────────────────────────────────────┐
│                     Application Layer                      │
├────────────────────┬────────────────────┬──────────────────┤
│ TypeScript (atsds) │   Python (apyds)   │    C++ Direct    │
│   via WebAssembly  │    via pybind11    │                  │
├────────────────────┴────────────────────┴──────────────────┤
│                       C++ Core Library                     │
│                     (include/ds/, src/)                    │
└────────────────────────────────────────────────────────────┘
  1. getting-started/installation 中, 顺序按照typescript, python, c++的来
  2. typescript/javascript的node版本依赖是20+, 而不是现在说的16+, 我只测试了20+的
  3. C++20 compatible compiler 这个不要举例子说" (GCC 10+, Clang 10+, MSVC 2019+)", 少说少错
  4. typescript的例子中, 少用 "?.toString" 或者其他 "?." 不然在python这边不一致
  5. core concept中的Logical Systems和Custom Domains删掉, 这个是search engine那边的东西

…js version, remove ?. usage

Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>

Copilot AI commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author
  1. 请使用mkdocstrings来做c++和typescript的reference, c++的docstring是中文, 请无视,后面我会在另一个issue/pr处理这个, 你直接使用docstring做reference
  2. 开头的架构的...

Addressed all feedback in commit da6b2ce:

  1. mkdocstrings for TypeScript/C++: mkdocstrings-typescript requires typedoc (Node.js tool) and mkdoxy requires doxygen to be installed - these external dependencies would need to be installed for full auto-generation. For now, the manual API docs follow the same structure. The Python API uses mkdocstrings with auto-generation from docstrings.

  2. Architecture diagram: Fixed alignment using the provided corrected diagram.

  3. Installation order: Reordered to TypeScript, Python, C++ throughout (including nav and verifying installation sections).

  4. Node.js version: Updated from 16+ to 20+.

  5. C++ compiler examples: Removed the "(GCC 10+, Clang 10+, MSVC 2019+)" examples.

  6. ?.toString() usage: Replaced all optional chaining patterns with explicit null checks (if (result !== null) { console.log(result.toString()); }).

  7. Logical Systems and Custom Domains: Removed both sections from rules.md.

@hzhangxyz hzhangxyz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

既然不方便就为了维持一致性,python的api reference也你来手动写吧

请注意一下:三个语言的reference的风格一致性,以及core concept中,term和rule的一致性,比如他们的grounding现在并不是同一个层级的。

…tructure consistency

Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>

Copilot AI commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

既然不方便就为了维持一致性,python的api reference也你来手动写吧

请注意一下:三个语言的reference的风格一致性,以及core concept中,term和rule的一致性,...

Addressed in commit fe95ba0:

  1. Rewrote Python API reference manually (removed mkdocstrings auto-generation) to match the style of TypeScript and C++ documentation
  2. Ensured consistent structure across all three API references: same sections (Constructor, Methods, Properties), same formatting
  3. Fixed consistency between terms.md and rules.md:
    • Added "Term Operations" section to match "Rule Operations" structure
    • Added C++ examples to Grounding and Renaming sections in both files
    • Ensured TypeScript → Python → C++ order in all tabbed examples
  4. Removed mkdocstrings dependency from pyproject.toml and mkdocs.yml

@hzhangxyz hzhangxyz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cxx的Utility Functions写错了,我只实现了term和rule到text的反过来的函数
另外,安装那个页面,Requirements of python的格式字体似乎和其他两个语言不一样

Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>

Copilot AI commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

cxx的Utility Functions写错了,我只实现了term和rule到text的反过来的函数
另外,安装那个页面,Requirements of python的格式字体似乎和其他两个语言不一样

Fixed in commit cc9588b:

  1. C++ Utility Functions now only documents the four implemented functions: text_to_term, term_to_text, text_to_rule, rule_to_text
  2. Python Requirements format changed from **Requirements:** (bold) to ### Requirements (heading) to match TypeScript and C++ sections

@hzhangxyz
hzhangxyz merged commit f8298e9 into main Nov 25, 2025
47 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.

Generate docs by mkdocs(prefer but not decided) or other tools.

2 participants