- Apr 17, 2020
-
-
Stefano Zacchiroli authored
and user required=True to check that, as it is the preferred way
-
Stefano Zacchiroli authored
-
- Apr 10, 2020
-
-
Antoine R. Dumont authored
This also adapts the hypothesis strategies, using the plural form origin_visit_statuses. That plural form is acceptable because in our context, the statuses are countable. Related to T2310
-
- Apr 08, 2020
-
-
David Douard authored
- blackify all the python files, - enable black in pre-commit, - add a black tox environment.
-
- Apr 02, 2020
-
-
Antoine Lambert authored
Fix keyword parameters transmission to snapshots_d strategy. Ensure max_size constraint is respected when fixing snapshot aliases.
-
- Apr 01, 2020
-
-
David Douard authored
With support for str representation of date. Mostly for testing purpose.
-
David Douard authored
instead of a reference to an Origin entity.
-
David Douard authored
for each entity model `Model`, provide a `models_d` strategy that produces dicts suitable for using as argument for the `Model.from_dict` factory method, and reimplement the `models` generator using this former hypothesis generator. This is needed to help writing low level tests for model entities.
-
David Douard authored
- add a validator for negative_utc (can be True iff offset is 0), - update the timestamps_with_timezone hypothesis strategy, - add low-level tests for it.
-
David Douard authored
-
- Mar 31, 2020
-
-
Antoine R. Dumont authored
(pairing with @vlorentz) Related to T2310
-
- Mar 12, 2020
-
-
David Douard authored
These are expected to be bytes, not str.
-
- Mar 11, 2020
-
-
David Douard authored
this does not work in the general case since there is no (recursive) convertion of objects used as model object initialization. We can only check when using the from_dict() factory.
-
David Douard authored
for better clarity on the code author's intention.
-
- Mar 04, 2020
-
- Mar 02, 2020
-
-
Nicolas Dandrimont authored
This lets us generate Content objects directly from a bytestring, with the proper set of hashes auto-generated from the contents.
-
- Feb 27, 2020
- Feb 24, 2020
-
-
vlorentz authored
It just makes more sense that way. eg. before this change, all leafs would be equal to each other.
-
vlorentz authored
They will be used by loaders, so they can deal only with model objects, instead of having to do the same conversion themselves. This removes the `data` and `save_path` arguments of `from_file` and `from_disk`, as data loading is always deferred from now on. To access it, users are now expected to either open the data files themselves, or us `.to_model().with_data()`.
-
- Feb 21, 2020
-
-
vlorentz authored
Regular files were created, as the 'mode' argument of os.mknod was missing. However, creating devices requires root; so we can't reasonably do that in tests. Instead, we're using /dev/null instead of creating one. And while we're at it, let's also use /dev/zero (which, if not handled properly, will result in an infinite read).
-
vlorentz authored
It should be cheap enough to do it, and it makes tests easier.
-
vlorentz authored
-
vlorentz authored
It will be useful to loaders, as they currently load the entire content in memory before deciding to skip it.
-
- Feb 14, 2020
-
-
vlorentz authored
Can be useful to deduplicate code in swh-storage.
-
- Feb 05, 2020
-
- Jan 30, 2020
-
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
Related to P589
-
- Jan 29, 2020
-
-
David Douard authored
This allows for example to type: curl -s https://archive.softwareheritage.org/browse/content/sha1_git:64582b78792cd6c2d67d35da5a11bb80886a6409/raw/ | swh identify swh:1:cnt:64582b78792cd6c2d67d35da5a11bb80886a6409 -
-
- Nov 29, 2019
-
-
Antoine Lambert authored
Add support to automatically compute identifier in the following object models: Directory, Release, Revision, Snapshot. If the identifier is not provided as parameter, it will be computed when the model is initialized.
-
Antoine Lambert authored
-
- Oct 30, 2019
-
- Oct 29, 2019
-
-
David Douard authored
currently provides mainly 2 generators: - gen_origins() - gen_contents()
-
David Douard authored
we do not really need them to be mutable, plus we gain their instances now being hashable, so we can add them in set() for example.
-
- Oct 20, 2019
-
-
Stefano Zacchiroli authored
-
Stefano Zacchiroli authored
-
- Oct 18, 2019
-
-
Nicolas Dandrimont authored
-
Nicolas Dandrimont authored
-
- Oct 04, 2019
-
-
... from test_persistent_identifier. Closes T1986
-
- Oct 01, 2019
-
-
Stefano Zacchiroli authored
-