Page MenuHomeSoftware Heritage

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

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

Diff Detail

Repository
rDMOD Data Model
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

zack created this revision.Tue, Oct 1, 4:21 PM
olasd added a subscriber: olasd.Tue, Oct 1, 5:43 PM

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
11

I guess this is not a false positive. :)

zack updated this revision to Diff 6919.Tue, Oct 1, 5:59 PM
  • 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.Tue, Oct 1, 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...)

olasd accepted this revision.Tue, Oct 1, 6:02 PM
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.Tue, Oct 1, 6:02 PM