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

sort by:
Revision Author Date Message Commit Date
36349b9 Updated backport on buster-swh from debian/2.4.0-1_swh1 (unstable-swh) 13 April 2021, 13:32:29 UTC
ba7bac3 Merge tag 'debian/2.4.0-1_swh1' into debian/buster-swh 13 April 2021, 13:32:28 UTC
13c5695 Updated debian changelog for version 2.4.0 13 April 2021, 13:31:22 UTC
07e6f54 Update upstream source from tag 'debian/upstream/2.4.0' Update to upstream version '2.4.0' with Debian dir e87ccb4fa17d1fa370c7d13de36ba753221112db 13 April 2021, 13:31:21 UTC
c0e9822 New upstream version 2.4.0 13 April 2021, 13:31:21 UTC
74b024f identifiers: Fix parsing of SWHID qualifier value containing '=' According to the SWHID specification, it is not forbidden for a qualifier value to contain a '=' character (for instance in origin URL). So update parsing code to handle that special case. 13 April 2021, 12:02:33 UTC
15d5bab identifiers: Fix some invalid ValidationError template string formats Some ValidationError exceptions could not be serialized to string due to these format errors. Related to T3234 13 April 2021, 10:43:55 UTC
f2dba17 docs: Ask readers to install swh.model[cli] to fully use swh-identify Otherwise, they will get an error asking them to install Click (or Dulwich if Click installed and they use -t snapshot) 12 April 2021, 11:18:58 UTC
27a05d6 tox: Check swh-identify can run even if Dulwich isn't installed 12 April 2021, 11:18:58 UTC
c62f13f swh-identify: Hide tracebacks if Click or Dulwich is not installed And show nice human-readable errors instead 09 April 2021, 13:14:52 UTC
eeedac7 Remove accidental dependency of 'swh-identify' on swh-core Was added in be8f1a559d8209710a08ca48d93b7f513fa1c42f 08 April 2021, 14:16:42 UTC
9523be0 Model test data: add Release with no author/date Some releases don't have authors and date fields, this case should be checked in the tests. 26 March 2021, 11:05:51 UTC
ad0f2fc Updated backport on buster-swh from debian/2.3.0-1_swh1 (unstable-swh) 19 March 2021, 16:18:56 UTC
5f5d4f9 Merge tag 'debian/2.3.0-1_swh1' into debian/buster-swh 19 March 2021, 16:18:56 UTC
fb90825 Updated debian changelog for version 2.3.0 19 March 2021, 16:17:48 UTC
dc1ae42 Update upstream source from tag 'debian/upstream/2.3.0' Update to upstream version '2.3.0' with Debian dir 226b10fe808b4f706ee02cac31636de44440044f 19 March 2021, 16:17:48 UTC
7f124d8 New upstream version 2.3.0 19 March 2021, 16:17:47 UTC
af5e461 Truncate RawExtrinsicMetadata.discovery_date to a second This truncation is already enshrined at the identifier level. Truncate the object itself as well, to reduce the possibility multiple different metadata objects with the same identifier. 18 March 2021, 09:57:02 UTC
fff6c8b Updated backport on buster-swh from debian/2.2.0-1_swh1 (unstable-swh) 15 March 2021, 09:36:37 UTC
92c141a Merge tag 'debian/2.2.0-1_swh1' into debian/buster-swh 15 March 2021, 09:36:37 UTC
2250107 Updated debian changelog for version 2.2.0 15 March 2021, 09:35:25 UTC
377d1df New upstream version 2.2.0 15 March 2021, 09:35:24 UTC
95a9570 Update upstream source from tag 'debian/upstream/2.2.0' Update to upstream version '2.2.0' with Debian dir 15ac67e7278dc66e127e288ac4589a3d1bc460fb 15 March 2021, 09:35:24 UTC
975e989 model: Add a swhid() method to RawExtrinsicMetadata. All other hashable objects but ExtId have one. It will be used by swh-deposit. 12 March 2021, 12:58:37 UTC
51eb539 Updated backport on buster-swh from debian/2.1.0-1_swh1 (unstable-swh) 11 March 2021, 13:22:58 UTC
3af651f Merge tag 'debian/2.1.0-1_swh1' into debian/buster-swh 11 March 2021, 13:22:57 UTC
7826f5a Updated debian changelog for version 2.1.0 11 March 2021, 13:21:40 UTC
c217bb1 Update upstream source from tag 'debian/upstream/2.1.0' Update to upstream version '2.1.0' with Debian dir 6b5419fe87be223d70c9630dfdc5de683ccac7f3 11 March 2021, 13:21:39 UTC
da9fc11 New upstream version 2.1.0 11 March 2021, 13:21:39 UTC
71be461 Add an ExtID object this object aims at being able to keep in the SWH Archive an SWHID <-> External object ID map, e.g. to be able to keep track of Mercurial ids so the Mercurial loader can be made more efficient. Related to T2849. 10 March 2021, 09:39:28 UTC
fca3658 Fix MetadataAuthority.from_dict() was modifying the dict given as argument. 08 March 2021, 15:15:08 UTC
86059ff Updated backport on buster-swh from debian/2.0.0-1_swh1 (unstable-swh) 05 March 2021, 09:15:51 UTC
5efcc5b Merge tag 'debian/2.0.0-1_swh1' into debian/buster-swh 05 March 2021, 09:15:51 UTC
10e7002 Updated debian changelog for version 2.0.0 05 March 2021, 09:14:35 UTC
41cb402 Update upstream source from tag 'debian/upstream/2.0.0' Update to upstream version '2.0.0' with Debian dir 40768420e535abdbc97e85502bba4b26414a1ea8 05 March 2021, 09:14:34 UTC
d66a180 New upstream version 2.0.0 05 March 2021, 09:14:33 UTC
2185f93 model: Remove override of RawExtrinsicMetadata.unique_key(), so it now returns the hash. 04 March 2021, 14:22:13 UTC
48c556d Updated backport on buster-swh from debian/1.0.1-1_swh1 (unstable-swh) 04 March 2021, 14:12:20 UTC
fccdd9b Merge tag 'debian/1.0.1-1_swh1' into debian/buster-swh 04 March 2021, 14:12:20 UTC
7a691b3 Updated debian changelog for version 1.0.1 04 March 2021, 14:11:09 UTC
87a5e63 Update upstream source from tag 'debian/upstream/1.0.1' Update to upstream version '1.0.1' with Debian dir 1d3154e2d3c122633977ccf26667b87beed97a02 04 March 2021, 14:11:08 UTC
ae3b03f New upstream version 1.0.1 04 March 2021, 14:11:08 UTC
4386330 identifiers: Properly define the behavior of raw_extrinsic_metadata on negative timestamps. The rounding algorithm wasn't specified 04 March 2021, 10:19:33 UTC
3ce4125 identifiers: Change the manifest format of raw_extrinsic_metadata to use integer instead of ISO8601 Serializing as ISO8601 makes the hash brittle, because the database may change the timezone silently and/or lose precision in the microseconds. As we do not need precise timestamp, using an integer is good enough, and is consistant with the git format. The manifest also does not need to contain a timezone, as it only represents the timezone of the system that fetched this metadata, which is useless data. 04 March 2021, 10:19:33 UTC
fc808e1 model: Add 'id' field to RawExtrinsicMetadata So that they can be properly deduplicated and referenced. 04 March 2021, 10:17:44 UTC
f6eab95 identifiers: Add raw_extrinsic_metadata_identifier This will be used to compute an intrisic identifier for RawExtrinsicMetadata; which can be used for deduplication and refering to it like any other sha1_git instead of needed to use a tuple of its fields. 04 March 2021, 10:17:44 UTC
bf4ab43 identifiers: Remove the deprecated SWHID class Other packages don't use it anymore. 03 March 2021, 09:44:48 UTC
1e924e8 cli: stop using the deprecated SWHID class 03 March 2021, 09:44:27 UTC
ff33f60 Updated backport on buster-swh from debian/1.0.0-1_swh1 (unstable-swh) 02 March 2021, 08:19:54 UTC
2460762 Merge tag 'debian/1.0.0-1_swh1' into debian/buster-swh 02 March 2021, 08:19:53 UTC
294c57c Updated debian changelog for version 1.0.0 02 March 2021, 08:18:42 UTC
fa6d992 Update upstream source from tag 'debian/upstream/1.0.0' Update to upstream version '1.0.0' with Debian dir b4105a4c2fba097e2c03fbbbcfecf5612e3885d6 02 March 2021, 08:18:41 UTC
9cb4fa4 New upstream version 1.0.0 02 March 2021, 08:18:40 UTC
8e01199 Add CoreSWHID.to_extended() This is a useful shorthand when generating SWHIDs in tests. 01 March 2021, 09:06:58 UTC
31a8a0f RawExtrinsicMetadata: Use CoreSWHID instead of SWHID for contexts SWHID is deprecated; and CoreSWHID does not support qualifiers at all, so RawExtrinsicMetadata no longer needs to check there are no qualifiers. 01 March 2021, 09:06:58 UTC
752fb81 RawExtrinsicMetadata: Use ExtendedSWHID as target and remove type ExtendedSWHID can identify either a software artifact or an origin, so we no longer need Union[SWHID, str]. Therefore, we no longer need the 'type' attribute, as it was only used to tell when the target is a SWHID and when it's an origin URL. 01 March 2021, 09:06:58 UTC
256bca2 Add a swhid() method to all hashable objects. It can be handy as a shortcut to build SWHID objects. 01 March 2021, 09:06:58 UTC
8e8e86f Updated backport on buster-swh from debian/0.13.0-1_swh1 (unstable-swh) 25 February 2021, 17:00:37 UTC
4960489 Merge tag 'debian/0.13.0-1_swh1' into debian/buster-swh 25 February 2021, 17:00:37 UTC
a4a64ad Updated debian changelog for version 0.13.0 25 February 2021, 16:59:26 UTC
b7b0ea5 Update upstream source from tag 'debian/upstream/0.13.0' Update to upstream version '0.13.0' with Debian dir 381261712ed7fa0561d14badf821880c2b4fc275 25 February 2021, 16:59:25 UTC
e4fd96f New upstream version 0.13.0 25 February 2021, 16:59:25 UTC
24b653e Add test for all qualifiers' converters and validators 23 February 2021, 12:48:49 UTC
069b56a Escape semicolon in origin qualifiers. 23 February 2021, 12:48:39 UTC
710fb42 Add test checking SWHID_QUALIFIERS matches the attributes of QualifiedSWHID. 23 February 2021, 12:48:39 UTC
7dead5d Fix qualifier parsing and add tests * Quote/unquote path * Fix line parsing and serializing to properly handle None * Fix error raised by check_visit/check_anchor 23 February 2021, 12:48:39 UTC
172eadb Deduplicate parsing/unparsing tests of the new SWHID classes They were all very similar and only differ in what 'edge' cases they accept 23 February 2021, 12:48:29 UTC
9bcc884 Deduplicate code between CoreSWHID, QualifiedSWHID, and ExtendedSWHID by making them all derive from an abstract class. 23 February 2021, 12:26:27 UTC
d4b20dc Add new class ExtendedSWHID as an alternative to SWHID/QualifiedSWHID Following the discussion on T3034, we decided to replace SWHID with two or three classes: * QualifiedSWHID to replace the existing SWHID (standard types + qualifiers) * CoreSWHID, for "core SWHID" only (standard types + no qualifiers) * ExtendedSWHID for internal use in Software Heritage (extra types + no qualifiers) This commit adds the last one. It also removes "ori" as a valid object type for CoreSWHID and QualifiedSWHID, as it now only belongs in ExtendedSWHID. 23 February 2021, 12:26:22 UTC
9923765 Use dict instead of temporary SWHID when parsing {Core,Qualified}SWHID. It is cleaner, avoids warnings, and will be needed when introducing ExtendedSWHID in a future commit. 19 February 2021, 13:20:58 UTC
8e91759 QualifiedSWHID: Replace the 'qualifiers' dict with statically defined attributes And store their parsed values (CoreSWHID, tuple of ints, etc.) instead of string. 19 February 2021, 12:49:11 UTC
eba8d84 Add new class CoreSWHID as an alternative to SWHID/QualifiedSWHID Following the discussion on T3034, we decided to replace SWHID with two or three classes: * QualifiedSWHID to replace the existing SWHID (standard types + qualifiers) * CoreSWHID, for "core SWHID" only (standard types + no qualifiers) * ExtendedSWHID for internal use in Software Heritage (extra types + no qualifiers) This commit adds the second one 19 February 2021, 12:48:27 UTC
690b7f8 Add new class QualifiedSWHID to replace SWHID, and deprecate the latter. Following the discussion on T3034, we decided to replace SWHID with two or three classes: * QualifiedSWHID to replace the existing SWHID (standard types + qualifiers) * CoreSWHID, for "core SWHID" only (standard types + no qualifiers) * ExtendedSWHID for internal use in Software Heritage (extra types + no qualifiers) Since migrating from SWHID will break existing code, this commit uses the opportunity to modernize it a little, ie.: * `keyword`-only constructor, to get rid of the hacky default values for `object_type` and `object_id` * enum instead of strings for the object type * `bytes` instead of an hex string for the object id * rename `metadata` to `qualifiers` 19 February 2021, 12:47:25 UTC
758eb88 tests: Clean hashutil._blake2_hash_cache after mocking blake2 functions. Depending on the order in which tests are run, these tests may insert lambdas with mocked blake2 functions in their closure to be inserted in hashutil._blake2_hash_cache; causing all future tests to fail. While this does not happen with the default order of tests, it does when using pytest-xdist. 19 February 2021, 09:48:42 UTC
0c16581 Make explicit Python 3 dependency 02 February 2021, 12:52:16 UTC
1bfdf71 Update persistent identifiers doc with pip install info 29 January 2021, 23:53:27 UTC
7163128 Updated backport on buster-swh from debian/0.12.0-1_swh1 (unstable-swh) 26 January 2021, 16:28:55 UTC
9d3b528 Merge tag 'debian/0.12.0-1_swh1' into debian/buster-swh 26 January 2021, 16:28:54 UTC
584b754 Updated debian changelog for version 0.12.0 26 January 2021, 16:27:16 UTC
13ed4dc Update upstream source from tag 'debian/upstream/0.12.0' Update to upstream version '0.12.0' with Debian dir fa312d034805923e43055018f760bb74d93020fa 26 January 2021, 16:27:15 UTC
4e3bc4e New upstream version 0.12.0 26 January 2021, 16:27:14 UTC
cad940d Add swh-journal's model-related test data set in swh-model so it's kept up to date when evolutions are made in the model and thus preventing swh-journal and swh-model to be unecessarly coupled. Related to T2970. 26 January 2021, 15:43:13 UTC
5cc2ec5 Updated backport on buster-swh from debian/0.11.0-1_swh1 (unstable-swh) 20 January 2021, 14:36:12 UTC
0ecbb34 Merge tag 'debian/0.11.0-1_swh1' into debian/buster-swh 20 January 2021, 14:36:10 UTC
568c5c5 Updated debian changelog for version 0.11.0 20 January 2021, 14:34:54 UTC
1d8ca54 Update upstream source from tag 'debian/upstream/0.11.0' Update to upstream version '0.11.0' with Debian dir ad60fcf7e9e7237e4c2e6dd0680004d3379e7ab9 20 January 2021, 14:34:53 UTC
3f1b16b New upstream version 0.11.0 20 January 2021, 14:34:52 UTC
9af451f model: Allow new status values not_found and failed to OriginVisitStatus Related to T2961 20 January 2021, 13:00:33 UTC
07e124c Updated backport on buster-swh from debian/0.10.0-1_swh1 (unstable-swh) 14 January 2021, 13:17:15 UTC
e987923 Merge tag 'debian/0.10.0-1_swh1' into debian/buster-swh 14 January 2021, 13:17:15 UTC
88e5ec9 Updated debian changelog for version 0.10.0 14 January 2021, 13:16:10 UTC
1c8cdb1 New upstream version 0.10.0 14 January 2021, 13:16:09 UTC
7b0d520 Update upstream source from tag 'debian/upstream/0.10.0' Update to upstream version '0.10.0' with Debian dir 3349854b23ac224df660256b72722b90d897af10 14 January 2021, 13:16:09 UTC
1ca92a5 Add an optional type field on OriginVisitStatus object The optional nature of the type will allow to avoid migrating the (db) data model right now then we can have this type field in kafka messages in the origin-visit-status topic Related to T2443 13 January 2021, 10:14:28 UTC
1d0c321 test_identifiers: Reorder SWHID tests. They were mixed in with snapshot tests. 12 January 2021, 11:24:35 UTC
731d10d test_identifiers: Make sure that {directory,revision,release,snapshot}_identifier() doesn't just return a value from the dict. For example, before this commit, you could replace the code of revision_identifier() with this: def release_identifier(release): return release.get("id", b"") and all tests would still pass. 12 January 2021, 11:17:30 UTC
18fde50 Add missing slots=True for Directory. 04 January 2021, 14:48:26 UTC
5746850 SWHID parsing: simplify and deduplicate validation logic Before this change there was a lot of overlap between parse_swhid() and the attrs-based validators in the SWHID class. Also, the validation implementation in parse_swhid() was done by hand. With this change the coarse-grained validation done by parse_swhid() is now delegated to a regex. The semantic validation of SWHIDs is left to attrs validators. The regex is also exposed as a module attribute, to be used by client code that want to syntactically validate SWHIDs without necessarily instantiate SWHID classes (we have several other modules doing that already, and they are using slightly different hand-made regexs, which isn't great). As part of this change we also clean up the use of ValidationError exceptions, systematically passing the problematic parts of SWHID as arguments, and uniform error messages. This change also brings some speed up in SWHID parsing. On a benchmark parsing ~30 M valid SWHIDs, the previous implementation took ~3:06 minutes, the new one ~2:50 minutes, or a ~9% speedup. Closes T2788 30 December 2020, 12:22:47 UTC
76b744e model: Make all classes slotted. Unfortunately, sphinx (actually, autodoc) only picks up attributes if they fall in any of these cases: 1. are enum variants 2. are in slots 3. are in __dict__ 4. have an annotation 5. are found using its custom parser (see get_object_members in sphinx/ext/autodoc/importer.py) In theory, option 5 should work for us; unfortunately, autodoc only asks the parser the list of members with a comment. And it's not easy to adapt it to ask the parser for all members, because said parser (sphinx/pycode/parser.py) does not return the class qualname (aka. namespace) for members without comments. So, as I don't want to change the interface of sphinx.pycode.parser, this commit switches to relying on option 3, by adding __slots__ for all attr classes. Additionally, this might have some performance/memory improvement (though I did not check) and will further avoid mutation of these objects. 15 December 2020, 13:10:04 UTC
9f7be3e Updated backport on buster-swh from debian/0.9.0-1_swh1 (unstable-swh) 17 November 2020, 09:17:20 UTC
back to top