Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

(auto)generate up-to-date documentation

未关闭
#2,398 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
文档
描述清晰度
需要澄清
活跃度
停滞
技术栈
fastapi, python

调研方向

首先,查看链接的 staging /docs 端点上的现有 FastAPI 文档,以及概念验证中展示的 kernelci.api.models 模块。比较当前如何表示 kci 命令、API 端点和 Node 子类,然后确定生成的文档必须覆盖这三个方面中的哪些内容。完成的标准是:已生成约定的文档,并且用户和开发者都可以使用。

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

描述

documentation techdebt

As mentioned in other issues (such as #2040 and #2092), the new system lacks documentation for both users and developers.

A first step in solving this problem could be to look at auto-generation for items easily documented in the code itself. this includes:

  • kci commands
  • API endpoints
    • fastapi already provides some kind of endpoint/schema documentation, but it's incomplete and barely usable; we could, however, have a look at how this works and get some inspiration there
  • Node types & formats
    • Partly provided by fastapi (see above) but only documents the top-level Node model, not any of its sub-classes
    • We could create a script which would leverage pydantic's schema() creation facilities, see the following PoC for an example:
import kernelci, inspect
from kernelci.api.models import *

def iskcimodel(model):
    if (inspect.isclass(model) and
        model.__module__ == "kernelci.api.models" and
        hasattr(model, 'schema')):
        return True
    return False

for name, myclass in inspect.getmembers(kernelci.api.models, iskcimodel):
    print(f"{name} -> {myclass.schema()}")
主要语言
Python
星标
120
派生
110
平均合并
8 小时 1 分钟
30 天内合并 PR
13

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

kernelci/kernelci-core 的其他 Issue

查看 kernelci/kernelci-core 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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