Extension of Python REST API (repo index, metrics, content filters)
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 49
- 派生
- 88
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 31
描述
Lightwell UI lists Python packages, versions, and repository counts through content-sources-backend. That backend reads Pulp Postgres directly (Tangy). We need Pulp HTTP APIs so the path is UI → backend → Pulp REST, not SQL.
Today GET …/content/python/packages/ is one row per file (wheel + sdist). It cannot paginate distinct package names or return versions per package.
{pk} is the repository UUID. Latest complete repository version is implied.
| UI path | Pulp |
|---|---|
| PackageList | New GET …/repositories/python/python/{pk}/packages/ — one row per name_normalized, paginate, name_normalized__istartswith |
| PackageVersions | Extend existing GET …/content/python/packages/ with collapse_builds=true and serializer field base_version (still use packagetype=sdist) |
| PackageGet | Existing content list (name + version + packagetype=sdist); add base_version on the serializer. Omit collapse_builds. |
| RepoMetrics | New GET …/repositories/python/python/{pk}/metrics/ — package_count, version_count, build_count |
collapse_builds=true (default false): strip trailing \.[a-zA-Z]+-\d+$ from version, one row per (name_normalized, base_version).
PackageList rows: name, name_normalized, versions[], latest_releases[] (version, created_at, release). Same version keys in both lists. Pulp-native shape, not Tangy DTOs.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
Start by tracing the existing GET …/content/python/packages/ endpoint and its serializer, then locate the repository package and metrics API entry points described in the issue. Done means the new and extended Pulp REST responses support the specified pagination, filters, collapse behavior, fields, and package/version/build counts without relying on Tangy DTOs.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- postgresql, python
- 领域
- api, backend
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 52/100