Page MenuHomeSoftware Heritage

identifiers: Rename some functions and types related to SWHIDs
ClosedPublic

Authored by anlambert on Jul 3 2020, 2:22 PM.

Details

Summary

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.

Diff Detail

Repository
rDMOD Data model
Branch
pid-to-swhid
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13316
Build 20347: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 20346: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D3412 (id=12095)

Rebasing onto 8863b5c186...

Current branch diff-target is up to date.
Changes applied before test
commit 1ff05161e795a71bf823f55c7d043cf9eaaa1d01
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Jul 3 12:18:38 2020 +0200

    identifiers: Rename some functions and types related to SWHIDs
    
    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.

See https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/99/ for more details.

ardumont added a subscriber: ardumont.

Looks good.

This revision is now accepted and ready to land.Jul 3 2020, 2:29 PM