Page MenuHomeSoftware Heritage

lister.docs: add a lister template for the new API
AbandonedPublic

Authored by ardumont on Jan 22 2021, 3:53 PM.

Details

Reviewers
tenma
Group Reviewers
Reviewers
Summary

Companion template to the lister development instructions.

Diff Detail

Event Timeline

Build is green

Patch application report for D4927 (id=17534)

Rebasing onto ff232f0d91...

First, rewinding head to replay your work on top of it...
Applying: lister.docs: add a lister template for the new API
Changes applied before test
commit 094712642715c1821dfc9cddb9f768ef6c33a33f
Author: tenma <tenma+swh@mailbox.org>
Date:   Fri Jan 22 15:50:34 2021 +0100

    lister.docs: add a lister template for the new API

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

tenma requested review of this revision.Jan 22 2021, 3:59 PM

thanks. I think however, given its purpose, this example code should be heavily commented: each constant (eg. MyPageType) and each method should be commented (not docstrings but comments exaplaining what the method/variable is used for).

Add implementation instructions to the template

Build is green

Patch application report for D4927 (id=17622)

Rebasing onto aefb260f76...

First, rewinding head to replay your work on top of it...
Applying: lister.docs: add a lister template for the new API
Changes applied before test
commit e133dcc6174d0b4756cf7ccb5b3341b45f16486e
Author: tenma <tenma+swh@mailbox.org>
Date:   Fri Jan 22 15:50:34 2021 +0100

    lister.docs: add a lister template for the new API

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

Looks good to me.

I'd rename My to Forge but i won't push too much ;)

Note that you could also:

  • add a similar template for the "stateless" lister case (in another module alongside this one). [1]
  • Add references to actual listers using this pattern (github class:GitHubLister using the right sphinx way, bitbucket, gitlab, ...)
  • For the stateless one, add also references (e.g. class:GGitLister, ...)

(in another diff if you so prefer)

[1] It is even shorter shorter than this one (only get_pages, get_origin_from_pages to implement iirc).

docs/new_lister_template.py
38

from "My" dedicated forge.

:)

This revision is now accepted and ready to land.Jan 27 2021, 10:06 AM
docs/new_lister_template.py
38

Rather "My software source" (more general). ;)

Build is green

Patch application report for D4927 (id=17992)

Rebasing onto 5b4dc289b7...

First, rewinding head to replay your work on top of it...
Applying: lister.docs: add a lister template for the new API
Changes applied before test
commit d105606f54553c64456b4297e7afda27ff489081
Author: tenma <tenma+swh@mailbox.org>
Date:   Fri Jan 22 15:50:34 2021 +0100

    lister.docs: add a lister template for the new API

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

ardumont edited reviewers, added: tenma; removed: ardumont.
This revision now requires review to proceed.Mar 4 2021, 10:50 AM

This got landed through another diff [1] already.

[1] D5069