- Jul 03, 2020
-
-
Antoine Lambert authored
When Software Heritage persistent identifiers were introduced, they were not yet abbreviated as SWHIDs. Now that abbreviation is growing adoption, rename some functions and types in swh.model.identifiers for consistency: - PersistentId -> SWHID - persistent_identifier -> swhid - parse_persistent_identifier -> parse_swhid Backward compatibility with previous naming is maintained but deprecation warnings are introduced to encourage the use of the new names. Numerous variables in swh.model codebase have also been renamed accordingly. Also rework and improve documentation.
- Jul 02, 2020
-
-
Antoine R. Dumont authored
-
Antoine R. Dumont authored
- Jul 01, 2020
- Jun 30, 2020
- Jun 29, 2020
-
-
Antoine R. Dumont authored
Related to T2310
-
- Jun 24, 2020
-
-
David Douard authored
this aims at preventing constant usage of isinstance() based dispatch code when writing generic code handling model entities. For example, the "object_type" argument of JournalWriter.write_addition() has become superflous now we only pass model entities, etc. This idea comes olasd's reading of mypy doc: https://mypy.readthedocs.io/en/latest/literal_types.html#tagged-unions This comes with a refactoring of from_dict.DiskBackedContent to make it *not* inherit from model.Content: object_type being Final, it cannot be overloaded.
-
Antoine R. Dumont authored
Related to T2310
-
- Jun 23, 2020
-
-
Antoine R. Dumont authored
Related to T2310
-
- Jun 22, 2020
-
-
Antoine R. Dumont authored
-
- Jun 17, 2020
- Jun 16, 2020
-
-
Antoine R. Dumont authored
This is not used. This is broken storage wise (origin-visit-add does not deal correctly with it and it so happens there is no test around it). And finally, this will soon go away with T2310.
-
David Douard authored
And adapt the revisions_d() strategy accordingly.
-
David Douard authored
This can be None, according to the model.
-
David Douard authored
for the sake of consistency.
-
- Jun 15, 2020
-
-
David Douard authored
thus in TimestampWithTimezone.from_dict(). This is needed to help consuming existing (invalid) messages from kafka. Warning: tests added in this revision do not cover the whole normalize_timestamp() function.
- Jun 03, 2020
-
-
David Douard authored
This is a step forward having model objects, declared as frozen, immutable. This requires attrs_strict >= 0.0.7.
-
David Douard authored
the visit attribute is expected to be strictly positive.
- May 29, 2020
-
-
David Douard authored
this attribute is not an intrinsic property of a content object, so it should not be used when comparing or hashing.
- May 25, 2020
- May 20, 2020
-
-
David Douard authored
Simply add a BaseModel.anonymize() method. Default implementation returns None, meaning the object is not anonymizable. For Person, the method returns a Person whith hashed fullname (and unset name and email). For Revision and Release, the method returns an anonymized version of the object, i.e. with instance of Person replaced by anonymized ones.
-
- May 14, 2020
-
-
Stefano Zacchiroli authored
-
- May 05, 2020
- Apr 30, 2020
-
-
Reviewers: rdicosmo Reviewed By: rdicosmo Differential Revision: https://forge.softwareheritage.org/D3108
- Apr 29, 2020
-
-
Stefano Zacchiroli authored
-
vlorentz authored
Production should only use aware datetimes.
-
Stefano Zacchiroli authored
Closes T1003
-
- Apr 28, 2020
-
-
Roberto Di Cosmo authored
- merge grammars into a single one - explain better that SWHIDs are made up of core identifier + qualifiers - separate qualifier into context and fragment onex - add reference to swh-identify
-
Stefano Zacchiroli authored
-