aboutcode-org / aboutcode-org/purldb

Collect endpoint sorting ability and default ordering.

未關閉
#508 3 則留言 0 個 reaction 已指派 1 人 已被 @JonoYang 認領 在 GitHub 檢視
enhancement high priority
主要語言
HTML
星號
67
分支
69
平均合併
8 天 8 小時
30 天內合併 PR
1

描述

In general, when multiple package entries are found in the PurlDB, we decided to use the most recent version for "package enriching" or data display in ScanCode.io and DejaCode.

When using the `packages` endpoint, one can use the `sort=-version` filter for ordering, but this is not available on the `collect` endpoint.

I think we should:
1. Add the ability to provide the `sort` parameter to the `collect` endpoint
2. Set a default `order_by` on the `collect` endpoint package QuerySet, to avoid returning a random order by the results. I would suggest always sorting by the most recent version, ie: `-version`, to be coherent with the data we care to display first.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。