- Mar 30, 2022
-
-
Antoine R. Dumont authored
This changes the deprecated :show-nested: instruction to the :nested: one [1]. This also fixes warning about misdefined block [2] [1] https://sphinx-click.readthedocs.io/en/latest/usage/#directive-click [2] ``` 10:38:38 Warning, treated as error: 10:38:38 /var/lib/jenkins/workspace/DMOD/tests-on-diff/docs/cli.rst:14:Literal block expected; none found. 10:38:38 make: *** [../../swh-docs/Makefile.sphinx:32: sphinx/html] Error 2 10:38:38 make: Leaving directory '/var/lib/jenkins/workspace/DMOD/tests-on-diff/docs' 10:38:38 ERROR: InvocationError for command '/usr/bin/make -I ../.tox/sphinx/src/swh-docs/swh/ -C docs' (exited with code 2) ```
-
- Mar 23, 2022
-
- Mar 18, 2022
-
-
David Douard authored
these fields are computed attributes and may be removed from the backend storage. Helps writing tests.
-
- Mar 16, 2022
-
-
vlorentz authored
This will be used by swh.storage.backfill's tests.
-
vlorentz authored
This reverts commit a0f54362. This means this commit removes the 'offset' and 'negative_utc' arguments. It also removes the 'negative_utc' attribute (which is not used anymore), but keeps an 'offset' property, which is an alias to 'offset_minutes()'. This is only to keep this commit readable; the next commit will remove this alias.
-
- Feb 10, 2022
-
-
vlorentz authored
This should slightly reduce the memory used by dir/rev/rel objects
-
- Jan 26, 2022
- Jan 21, 2022
-
- Jan 17, 2022
-
-
vlorentz authored
-
- Jan 14, 2022
-
- Jan 13, 2022
-
-
vlorentz authored
'offset' becomes a property instead of an attribute and constructor argument. This also removes both from the output of `.to_dict()`. This is step 6 of https://forge.softwareheritage.org/T3752 This will break packages that still use the constructor directly, ie. swh-storage and swh-loader-git (and tests of swh-loader-core and swh-loader-svn)
-
- Jan 12, 2022
-
-
vlorentz authored
-
- Jan 07, 2022
-
- Dec 22, 2021
-
-
Nicolas Dandrimont authored
blake2s and blake2b have been provided by the stdlib hashlib since Python 3.6, and we declare 3.7 as minimum Python version supported.
-
vlorentz authored
1. Most objects do not need it so it's a waste of space 2. This means we just extend the existing format (some objects will have that key in their dict) instead of changing it (retroactively adding it to all objects)
-
vlorentz authored
This will be used to store the original manifest of 'weird' git objects, when we cannot reasonably represent them otherwise.
-
- Dec 21, 2021
-
-
vlorentz authored
-
- Dec 15, 2021
-
-
vlorentz authored
Using .now() produces data that differs between xdist processes, as files are imported after forking, and xdist requires consistent data across processes.
-
- Dec 08, 2021
-
-
vlorentz authored
It calls attr.validate() (which calls the validators), and recomputes the hash of HashableObject instances. A future commit will also make it check the raw_manifest attribute when relevant
-
vlorentz authored
It's just simpler this way
-
vlorentz authored
For the sake of completeness (a future commit may depend on it).
-
vlorentz authored
For now it is filled from 'offset' and 'negative_utc', but it will replace them in a future commit. This is to simplify and add support for more 'weird' offsets we do not currently support.
-
Antoine Lambert authored
It enables to easily check if a path exists from a root directory.
-
- Dec 07, 2021
-
-
Antoine Lambert authored
Since rDMOD8d96dfedee34203a4118e48a6208ee507511590b, directory entry names are validated in DirectoryEntry model and thus must not contain any slash characters. So update directory_entries_d hypothesis strategy to ensure such names are generated to avoid flaky tests.
-
- Dec 06, 2021
-
-
Antoine Lambert authored
Enable to compute md5 sum through the hashutil.MultiHash class. Nevertheless, md5 is not put in DEFAULT_ALGORITHMS set and must be explicitely requested by client code. Related to T2400
-
Antoine Lambert authored
-
- Dec 01, 2021
-
-
vlorentz authored
I don't know any instance of these, but there is no harm in checking them.
-
- Nov 05, 2021
-
-
vlorentz authored
1. hashes are now repr()ed as `hash_to_bytes("1234...")` instead of b"\x12\x34..."` 2. SWHID objects are now repr()ed as `CoreSWHID.from_string('swh:1:...:1234...')` instead of `CoreSWHID(scheme='swh', version='1', object_type=..., object_id=b'\x12\x34')` 3. enums are now repr()ed as `MyEnum.NAME` instead of "<MyEnum.NAME: 'value'>` Thanks to these three changes, using repr() on a model object now prints a string that can be pasted directly in a `.py` file to write a new test case.
-
- Oct 01, 2021
-
-
vlorentz authored
The previous replaced attrs-strict's type validator with our own, stricter and faster, validator. However, the strictness can be a burden in other packages; for example, swh-storage tests rely on it to insert dummy data that raises exception when accessed, and it would be hard to do while using the exact expected type. This commit reverts the strict behavior, but keeps the performance optimization, by always checking with type equality, but in case type equality fails (which would raise an error before this commit), it gives the value a 'second chance', by trying isinstance. This means that, outside tests, isinstance should not be used at all, or very rarely.
-
- Sep 28, 2021
-
-
vlorentz authored
This reimplements attrs_strict.type_validator(), using type equality instead of isinstance. This makes my checksum validation script (that mostly just instantiates model objects, computes a checksum, then discard) run twice as fast.
-
- Sep 23, 2021
-
-
vlorentz authored
-
vlorentz authored
For consistency, as the classes are now in swhids.py
-
vlorentz authored
+ raise warnings
-
vlorentz authored
1. Add a warning 2. Move identifier/manifest documentation to git_objects.py 3. Remove all imports of that module. Motivation: * SWHID classes were moved to swhids.py * manifest computation functions were moved to git_objects.py * Only reexports and trivial wrappers of model.py remain
-
vlorentz authored
-