Page MenuHomeSoftware Heritage

Add module-level docstrings.
ClosedPublic

Authored by vlorentz on Sep 23 2021, 8:22 PM.

Details

Summary

Depends on D6332.

Diff Detail

Repository
rDMOD Data model
Branch
refactor-hashes
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23957
Build 37369: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 37368: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D6333 (id=23031)

Could not rebase; Attempt merge onto df73e74b40...

Updating df73e74..7034b16
Fast-forward
 swh/model/cli.py                    |  23 +-
 swh/model/collections.py            |   7 +
 swh/model/from_disk.py              |  23 +-
 swh/model/git_objects.py            | 274 ++++++++++-
 swh/model/hypothesis_strategies.py  |   7 +-
 swh/model/identifiers.py            | 270 ++---------
 swh/model/model.py                  |  12 +
 swh/model/swhids.py                 |   9 +
 swh/model/tests/swh_model_data.py   |   2 +-
 swh/model/tests/test_identifiers.py | 913 ++++++------------------------------
 swh/model/tests/test_model.py       | 105 +----
 swh/model/tests/test_swhids.py      | 638 +++++++++++++++++++++++++
 12 files changed, 1142 insertions(+), 1141 deletions(-)
 create mode 100644 swh/model/tests/test_swhids.py
Changes applied before test
commit 7034b16c7fdb4f9daf6cdae540d6fb9bab14097b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 23 20:22:32 2021 +0200

    Add module-level docstrings.

commit 4968b74b2278a3c83e41c40bc81af6037488f045
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 23 20:01:09 2021 +0200

    Move SWHID-related tests to test_swhids.py
    
    For consistency, as the classes are now in swhids.py

commit d5fd652ca917d9eec4dcdae65bd7c11923f4c161
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 23 17:13:38 2021 +0200

    git_objects: Fix type annotations to accept the old dicts
    
    + raise warnings

commit f56becc196ed6dd4b211c97096654c4400b047ec
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 23 16:52:22 2021 +0200

    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

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

This revision is now accepted and ready to land.Sep 24 2021, 9:25 AM
ardumont added a subscriber: ardumont.

Great work.

Thanks.

Looks like we have an example on how to properly document modules now \o/

This revision was automatically updated to reflect the committed changes.