https://github.com/SoftwareHeritage/swh-model

sort by:
Revision Author Date Message Commit Date
2549a1b New upstream version 6.4.1 31 August 2022, 08:31:26 UTC
9ce6feb Add support for old dicts in RawExtrinsicMetadata.from_dict Format was changed in 752fb81d86fb15e3d8d39ac1420afb8b5b21adfd. 30 August 2022, 16:58:48 UTC
810feab New upstream version 6.4.0 12 August 2022, 09:01:39 UTC
b185355 Fix typo in docstring 08 August 2022, 12:45:39 UTC
d76bfca model: Allow unresolved branches when computing Snapshot hash This is needed by swh-scrubber when recomputing the hash of such snapshots. 08 August 2022, 12:38:34 UTC
0be753d Add parameter 'ignore_unresolved' to snapshot_git_object It allows building a snapshot manifest despite some branches being unresolved (instead of raising an error). This feature was removed in 57ae405d312879bec19107d29a20c2c290d7861d but in the end, Snapshot.compute_hash() will need to use it so that swh-scrubber does not crash when checksum such snapshots. 08 August 2022, 12:38:34 UTC
79ed550 hypothesis_strategies: Avoid generating timestamps which overflow datetime.datetime.fromtimestamp 04 August 2022, 12:53:30 UTC
c37bf9a Fix mypy error on attr >= 22.1.0 04 August 2022, 12:53:25 UTC
6f9b77e New upstream version 6.3.1 20 July 2022, 09:39:37 UTC
b872718 hypothesis_strategies: Prevent generation of invalid 'microseconds' values hypothesis.strategies.integers() is inclusive, but microseconds values greater or equal to 1 million are rejected by the model 19 July 2022, 11:36:35 UTC
234e502 New upstream version 6.3.0 12 July 2022, 08:50:48 UTC
d298c58 hypothesis_strategies: Add kwargs to composite strategies, to replace default sub-strategies This allows callers to pass different (typically, stricter) strategies to hypothesis instead of filtering the output; which makes example generation faster. 11 July 2022, 16:55:01 UTC
0f7a1cb model: Add Directory.from_possibly_duplicated_entries factory It will be used by swh.storage.backfiller (so indirectly, swh.scrubber) to load directories from the postgresql database, whose schema accidentally allowed directories with duplicate entries -- without corrupting the shape of the directory too much. 06 July 2022, 09:46:22 UTC
4073b82 hashutil: Add type annotations to conversion functions 04 July 2022, 09:42:24 UTC
47795c1 add strict asyncio_mode in pytest.ini 09 May 2022, 10:13:51 UTC
fe4ebb2 Dedup `format_git_object_from_headers` We can use `format_git_object_from_parts` inside it. 01 May 2022, 15:37:36 UTC
fa2dd9d New upstream version 6.2.0 27 April 2022, 16:39:58 UTC
08c69e6 Add missing `content_git_object` This would be useful for the IPFS bridge, and seems good to complete the API in any sense. 27 April 2022, 16:14:23 UTC
2c0701c Bump mypy to v0.942 26 April 2022, 11:40:38 UTC
f82a217 pre-commit: Remove codespell commit-msg hook That hook can be frustrating as it can discard a long commit message if it finds a typo in it so better removing it. 21 April 2022, 11:39:46 UTC
d250328 New upstream version 6.1.0 11 April 2022, 10:47:56 UTC
85f36f8 Add a SWH_MODEL_OBJECT_TYPES map {cls.objet_type: cls} in model.py it's a piece of information used several times in the swh stack. 11 April 2022, 08:47:46 UTC
9231cd0 Add .git-blame-ignore-revs file with automatic reformatting commits 08 April 2022, 13:15:31 UTC
4c39334 python: Reformat code with black 22.3.0 Related to T3922 08 April 2022, 13:15:09 UTC
953c403 pre-commit, tox: Bump black from 19.10b0 to 22.3.0 black is considered stable since release 22.1.0 and the version we are currently using is quite outdated and not compatible with click 8.1.0, so it is time to bump it to its latest stable release. Please note that E501 pycodestyle warning related to line length is replaced by B950 one from flake8-bugbear as recommended by black. https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length Related to T3922 08 April 2022, 13:13:46 UTC
e3f288f New upstream version 6.0.1 01 April 2022, 08:25:23 UTC
ba7af74 model/cli: Format click docstring 31 March 2022, 16:34:14 UTC
fb61d50 cli: Indent sphinx docstring with 3 leading spaces (not 4) 30 March 2022, 11:29:35 UTC
cd08c5a cli: Indent sphinx docstring 30 March 2022, 10:59:33 UTC
71e4277 Drop \b from docstring Hypothesis: This makes the documentation build fail. 30 March 2022, 10:24:59 UTC
d78d123 docs/cli: Fix misindented instructions 30 March 2022, 09:29:47 UTC
12257c1 docs/cli: Align and fix cli documentation 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) ``` 30 March 2022, 08:56:58 UTC
29bbf65 New upstream version 6.0.0 23 March 2022, 10:06:04 UTC
dbce3cc Add support for None as author or committer of a Revision committer=None happens on some malformed commits generated by old dgit versions ; and it is possible for author=None to happen for the same reason. 23 March 2022, 09:56:50 UTC
f6ad1ed pytest: Exclude build directory for tests discovery Due to test modules being copied in subdirectories of the build directory by setuptools, it makes pytest fail by raising ImportPathMismatchError exceptions when invoked from root directory of the module. So ignore the build folder to discover tests. 22 March 2022, 10:14:32 UTC
bc3831f Exclude name and email attributes from People comparison these fields are computed attributes and may be removed from the backend storage. Helps writing tests. 18 March 2022, 09:42:10 UTC
dc5485e Add objects with non-None raw_manifest to TEST_OBJECTS This will be used by swh.storage.backfill's tests. 16 March 2022, 11:19:11 UTC
20a889e New upstream version 5.0.0 16 March 2022, 09:38:25 UTC
5359c43 Remove deprecated property 'TimestampWithTimezone.offset' 16 March 2022, 09:29:42 UTC
07c7b4f Revert "Restore 'offset' and 'negative_utc' arguments and make them optional" This reverts commit a0f5436273ef6f5b62a388ae131ed5afa7287d00. 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. 16 March 2022, 09:29:42 UTC
118c8a4 docs: Explain we prefer dir SWHIDs over rev/rel. 10 February 2022, 16:14:04 UTC
bd38e6f pre-commit: Bump hooks and add new one to check commit message spelling To install the new hook: $ pre-commit install -t commit-msg 10 February 2022, 16:02:56 UTC
839e0dc Add missing __slots__ to HashableObjectWithManifest This should slightly reduce the memory used by dir/rev/rel objects 10 February 2022, 11:13:30 UTC
a0674ad Fix crash in check_entries. 26 January 2022, 11:16:50 UTC
7364adc Fix f-string 26 January 2022, 11:07:46 UTC
be4deb6 New upstream version 4.4.0 21 January 2022, 13:12:24 UTC
a654060 Add method 'TimestampWithTimezone.offset_minutes' A future commit will remove the 'offset' attribute, and rename 'offset_bytes' to 'offset'. Modules using the `.offset` attribute will need to switch to this new method to keep working. 21 January 2022, 11:53:12 UTC
f43f9ac model: Add support for more edge cases in _parse_offset_bytes 17 January 2022, 16:33:38 UTC
e1c3fe8 Fix extlink errors Sphinx >=4.4.0 raises warnings (which are errors for us) when using warnings instead of an extlink role defined in the configuration 17 January 2022, 16:26:17 UTC
db855bf New upstream version 4.3.0 14 January 2022, 14:13:46 UTC
a0f5436 Restore 'offset' and 'negative_utc' arguments and make them optional This allows keeping compatibility with existing users of the TimestampWithTimezone constructor 14 January 2022, 12:44:59 UTC
be894c6 TimestampWithTimezone: Make 'offset_bytes' required and remove 'negative_utc'. '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) 13 January 2022, 11:17:48 UTC
dbf185c Fix TimestampWithTimezone.from_dict() on datetimes before 1970 with non-integer seconds 12 January 2022, 13:41:38 UTC
94b00d6 docs: Add anchors to important sections of persistent-identifiers.rst swh-deposit needs to link to some of them. 11 January 2022, 13:27:05 UTC
a8806fb New upstream version 4.2.0 10 January 2022, 14:59:17 UTC
56460e1 git_objects: Use raw offset_bytes to format dates, and remove format_offset() This is needed when recomputing the manifest of git objects with weird offsets. 07 January 2022, 12:57:52 UTC
a0b08bc New upstream version 4.1.0 22 December 2021, 15:01:39 UTC
c6ec4d8 hashutil: drop all pre-3.6 blake2 workarounds blake2s and blake2b have been provided by the stdlib hashlib since Python 3.6, and we declare 3.7 as minimum Python version supported. 22 December 2021, 14:46:01 UTC
948bb65 New upstream version 4.0.0 22 December 2021, 12:28:53 UTC
9d517c1 hypothesis_strategies: Generate raw_manifest 22 December 2021, 12:20:53 UTC
2abbf73 model: Exclude 'raw_manifest' from dictionaries when it is null 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) 22 December 2021, 12:20:52 UTC
f6144a1 model: Add a raw_manifest attribute This will be used to store the original manifest of 'weird' git objects, when we cannot reasonably represent them otherwise. 22 December 2021, 12:20:52 UTC
9e1e14a data-model: Remove mention of modification timestamps We don't store those 21 December 2021, 14:15:18 UTC
e342397 hypothesis_strategies: Generate only consistent directory entry permissions. 21 December 2021, 13:38:47 UTC
9d1d4a3 docs: Update the data model description Revision and release do not generally allow 'arbitrary' metadata; and it was missing ExtIDs and REMD 17 December 2021, 13:56:40 UTC
abb089d Pin mypy and drop type annotations which makes mypy unhappy This also drops spurious copyright headers to those files if present. Related to T3812 16 December 2021, 14:56:37 UTC
9b21d2d test_model: Fix compatibility with pytest-xdist Using .now() produces data that differs between xdist processes, as files are imported after forking, and xdist requires consistent data across processes. 15 December 2021, 13:01:20 UTC
3a41bdf New upstream version 3.2.0 15 December 2021, 12:39:35 UTC
59ed64b model: Add a check() method to model objects 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 08 December 2021, 15:24:44 UTC
5eb6539 model: Deduplicate calls to hashlib. It's just simpler this way 08 December 2021, 15:20:56 UTC
2d0105b model: Add support for None to the type checker For the sake of completeness (a future commit may depend on it). 08 December 2021, 15:17:40 UTC
c322904 Add attribute TimestampWithTimezone.offset_bytes, to store raw Git offsets 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. 08 December 2021, 14:46:29 UTC
52d6e0a hypothesis_strategies: Ensure to generate valid directory entry name (again) 08 December 2021, 14:46:09 UTC
4803d78 Revert "hypothesis_strategies: Ensure to generate valid directory entry name" This reverts commit c525484e473720ffcde89534d3ba89093bc8b016. 08 December 2021, 14:46:09 UTC
f6e0a28 from_disk: Implement Directory.__contains__ It enables to easily check if a path exists from a root directory. 08 December 2021, 13:42:02 UTC
c525484 hypothesis_strategies: Ensure to generate valid directory entry name 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. 07 December 2021, 10:34:39 UTC
af9cd2c New upstream version 3.1.0 06 December 2021, 18:51:46 UTC
37364c2 hashutil: Add support for md5 sum 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 06 December 2021, 18:26:31 UTC
243520d test_hashutil: Port tests from unittest to pytest 06 December 2021, 18:26:31 UTC
8d96dfe model: Validate Directory entry names I don't know any instance of these, but there is no harm in checking them. 01 December 2021, 17:20:47 UTC
2ffe5db Give model and swhid objects a nicer repr() 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. 05 November 2021, 10:28:53 UTC
916627e type_validator: Re-allow subclasses 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. 01 October 2021, 12:31:41 UTC
99eb654 New upstream version 3.0.0 28 September 2021, 14:05:17 UTC
734b081 model: Replace attrs-strict with stricter validation 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. 28 September 2021, 09:51:15 UTC
e30eb7d persistent-identifiers.rst: Update references to manifest formats 24 September 2021, 10:08:47 UTC
7034b16 Add module-level docstrings. 23 September 2021, 18:22:32 UTC
4968b74 Move SWHID-related tests to test_swhids.py For consistency, as the classes are now in swhids.py 23 September 2021, 18:01:09 UTC
d5fd652 git_objects: Fix type annotations to accept the old dicts + raise warnings 23 September 2021, 15:13:38 UTC
f56becc Deprecate identifiers.py 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 23 September 2021, 14:52:31 UTC
df73e74 test_identifiers.py: Make sha1_git literals more consistent. 23 September 2021, 12:42:26 UTC
510df60 Remove identifier_to_bytes and identifier_to_hex They are not used anywhere. 23 September 2021, 12:42:26 UTC
9e8a547 Move manifest computation functions from identifiers.py to git_objects.py Since they are used by the vault for non-identifier-related stuff, I think it makes sense to move them to a new module. identifiers.py is now an empty shell, as all its features were moved to other modules and it only contains reexports and backward-compat functions. Therefore, it should be considered deprecated from now on. 23 September 2021, 12:42:26 UTC
57ae405 Refactor identifiers & model to make *_git_object() functions work on model classes instead of dicts Since we now use these classes everywhere, computing hashes required using to_dict() just to compute identifiers, which can be a performance bottleneck in code computing many checksums. 23 September 2021, 12:42:10 UTC
6a72f88 test_identifiers.py: Fix/update malformed data dicts A future commit will make identifier computation use the attrs classes, which are strict about what they accept. 23 September 2021, 09:08:36 UTC
9ec6832 Move SWHID classes and functions from identifiers.py to swhids.py identifiers.py initially worked only on bare sha1_git. I chose to add the SWHID classes in that module because of the name, but the SWHID code didn't actually interact with the other functions in the module, so it now feels out of place to me. 23 September 2021, 09:08:36 UTC
0dd33cd Add bazaar as supported revision type We're about to have a Bazaar loader 23 September 2021, 08:56:38 UTC
8a6faa5 New upstream version 2.9.0 16 September 2021, 12:24:47 UTC
b6f5e30 HashableObject: Add type annotation for 'id' attribute This class is a mixin that only works with classes that define this attribute, so it makes sense to declare it. It also allows generic functions (that take a HashableObject parameter) to access it without 'type: ignore'. 16 September 2021, 12:09:15 UTC
e879497 Run Black 16 September 2021, 12:07:41 UTC
4f04c39 New upstream version 2.8.0 27 July 2021, 14:26:09 UTC
back to top