Page MenuHomeSoftware Heritage

Make origin_visit_upsert parse date strings.
ClosedPublic

Authored by vlorentz on Jun 5 2019, 11:34 AM.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz created this revision.Jun 5 2019, 11:34 AM
douardda requested changes to this revision.Jun 5 2019, 1:48 PM
douardda added a subscriber: douardda.
douardda added inline comments.
swh/storage/tests/test_storage.py
1678

for this kind of test, I prefer to be able to read the input data litterally. Otherwise the reader need to pay way much more attention to get what self.date_visit is (what type) and pay extra attention to the presence of the str() call.

It's much easier to read as:

'date': '2019-01-15 10 15:35:27 CET'
This revision now requires changes to proceed.Jun 5 2019, 1:48 PM
vlorentz added inline comments.Jun 5 2019, 2:07 PM
swh/storage/tests/test_storage.py
1678

What if I add a comment instead?

douardda added inline comments.Jun 5 2019, 2:16 PM
swh/storage/tests/test_storage.py
1678

I prefer a literal string, but I would accept your diff with a comment. As you prefer.

vlorentz updated this revision to Diff 5092.Jun 5 2019, 2:19 PM
  • rebase
  • use a literal string
vlorentz marked 2 inline comments as done.Jun 5 2019, 2:19 PM
douardda accepted this revision.Jun 5 2019, 2:30 PM
This revision is now accepted and ready to land.Jun 5 2019, 2:30 PM
vlorentz updated this revision to Diff 5094.Jun 5 2019, 2:31 PM
  • rebase
This revision was landed with ongoing or failed builds.Jun 5 2019, 2:31 PM
This revision was automatically updated to reflect the committed changes.
Harbormaster failed remote builds in B6041: Diff 5094!