Page MenuHomeSoftware Heritage

swh identify: add support to compute snapshot PIDs of on-disk git repo
ClosedPublic

Authored by zack on Oct 1 2019, 4:21 PM.

Diff Detail

Repository
rDMOD Data model
Branch
feature/identify-snapshots
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8063
Build 11624: tox-on-jenkinsJenkins
Build 11623: arc lint + arc unit

Event Timeline

Would it be possible to make that extra dependency on dulwich optional, e.g. only installed when requesting swh.model[identify]?

Apart from that the implementation looks fine to me.

mypy.ini
10

I guess this is not a false positive. :)

  • setup.py: move CLI dependencies to a dedicated swh-model[cli] subpackage
  • mypi.ini: remove left-over "false positive" comment from dulwich exclude
zack marked an inline comment as done.Oct 1 2019, 6:01 PM
In D2056#47634, @olasd wrote:

Would it be possible to make that extra dependency on dulwich optional, e.g. only installed when requesting swh.model[identify]?

Good one. How about swh.model[cli] instead though?

That is what I've now implemented in this iteration of the diff.
(It's the first time I fiddle with a setup.py sub-package, so watch out as I might've forgotten to update some parts...)

In D2056#47656, @zack wrote:
In D2056#47634, @olasd wrote:

Would it be possible to make that extra dependency on dulwich optional, e.g. only installed when requesting swh.model[identify]?

Good one. How about swh.model[cli] instead though?

Even better.

That is what I've now implemented in this iteration of the diff.
(It's the first time I fiddle with a setup.py sub-package, so watch out as I might've forgotten to update some parts...)

I think this is fine.

This revision is now accepted and ready to land.Oct 1 2019, 6:02 PM