Page MenuHomeSoftware Heritage

[WIP] Add an ExtID object
Needs ReviewPublic

Authored by douardda on Tue, Jan 5, 5:16 PM.

Details

Summary

This needs tests

Related to T2849.

Diff Detail

Event Timeline

Build is green

Patch application report for D4807 (id=17038)

Rebasing onto 18fde50472...

Current branch diff-target is up to date.
Changes applied before test
commit 0366dc68e38b20933809142638db1cf73992cf2f
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Jan 4 12:33:04 2021 +0100

    Add an ExtID object

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

vlorentz added inline comments.
swh/model/model.py
563

Not an enum?

swh/model/model.py
564–565

What about a SWHID instead?

add a unique_key method to ExtID and some tests

Build has FAILED

Patch application report for D4807 (id=17091)

Rebasing onto 18fde50472...

Current branch diff-target is up to date.
Changes applied before test
commit 0268627e43054049f8363ecb6497ee7516233416
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Jan 4 12:33:04 2021 +0100

    Add an ExtID object

Link to build: https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/192/
See console output for more information: https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/192/console

swh/model/model.py
563

Not sure yet if we want an enum for this. So I started simple...

564–565

we do not (want) to support generic SWHID (with context), plus swhid is a textual representation that will need string manipulations / (en|de)coding, etc. so the idea was to stick, in the data model, to stricly what we need.

swh/model/model.py
564–565

we do not (want) to support generic SWHID (with context)

neither does raw_extrinsic_metadata, there's a validator to check it has no context.

fix hypothesis strategies tests

Build has FAILED

Patch application report for D4807 (id=17095)

Rebasing onto 18fde50472...

Current branch diff-target is up to date.
Changes applied before test
commit 0268627e43054049f8363ecb6497ee7516233416
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Jan 4 12:33:04 2021 +0100

    Add an ExtID object

Link to build: https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/193/
See console output for more information: https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/193/console

same but with all files commited

Build is green

Patch application report for D4807 (id=17096)

Rebasing onto 18fde50472...

Current branch diff-target is up to date.
Changes applied before test
commit 10ade43f14328c09d931e0ce10df25f6e9231f6a
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Jan 4 12:33:04 2021 +0100

    Add an ExtID object

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