Page MenuHomeSoftware Heritage

feat: Add Hex.pm lister
Needs RevisionPublic

Authored by KShivendu on Nov 30 2022, 8:17 PM.

Details

Reviewers
vlorentz
Group Reviewers
Reviewers
Maniphest Tasks
T4687: Hex.pm lister (Erlang package manager)
Summary

Hex is the package manager for Erlang ecosystem.

All the source code files are available in .tar format which can be ingested by a dedicated loader

Related to T4687

Diff Detail

Repository
rDLS Listers
Branch
feat/hex-pm-lister
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 33061
Build 51817: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 51816: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D8907 (id=32108)

Rebasing onto f4aafe026b...

First, rewinding head to replay your work on top of it...
Applying: feat: Add Hex.pm lister
Changes applied before test
commit 716fce14c3ba640fec3a3929a3029e3e20899aed
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Thu Dec 1 00:43:09 2022 +0530

    feat: Add Hex.pm lister

See https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/867/ for more details.

You need to pass complete_qs to requests_mock to actually test the query string: https://requests-mock.readthedocs.io/en/latest/matching.html#query-strings (and then you'll need to add the sort param, because it's missing from tests).

Did you test incremental listings? the sort value looks wrong (should be updated_at instead of name), but if you change it, then pagination is unusable because it's offset-based.
Looks like this API is too badly designed to support it.

README.md
30

could you reorder the list so it's in alphabetic order? (and fix the typo in fedora's line)

setup.py
90

ditto

vlorentz requested changes to this revision.Dec 1 2022, 2:04 PM
This revision now requires changes to proceed.Dec 1 2022, 2:04 PM

but if you change it, then pagination is unusable because it's offset-based.

Exactly. That's why I went with sort=name (which changes less frequently than the latest package version release date)

Thanks for https://github.com/hexpm/hexpm/pull/1168. But there's one more issue. ?sort=updated_at actually works in DESC order only. So it will make search=updated_after:xyz ineffective on the next pages.

We need to choose one of the following options:

  • add a new query param ?order=DESC
  • replace updated_after with updated_before

order sounds best. Do you want to do it?

order sounds best. Do you want to do it?

Sure. Thanks!

Created these in Hex.pm official github repo: