Page MenuHomeSoftware Heritage

identifiers: Add resolving of new SWHID contextual information
ClosedPublic

Authored by anlambert on May 15 2020, 4:55 PM.

Details

Summary

Update the built browse urls from new SWHID contextual info:

  • visit : the snapshot in which the object has been found
  • anchor: an ancestor of the object in the SWH graph defining browsing scope
  • path: path of the object from its root directory

Closes T2342
Closes T2408

Diff Detail

Repository
rDWAPPS Web applications
Branch
swhid-resolver-update
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12405
Build 18820: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 18819: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D3157 (id=11217)

Could not rebase; Attempt merge onto 3bbc62e227...

Updating 3bbc62e2..0549fa49
Fast-forward
 swh/web/browse/snapshot_context.py           |  44 ++---
 swh/web/browse/utils.py                      |  38 +++--
 swh/web/browse/views/content.py              |  30 ++--
 swh/web/browse/views/directory.py            |  45 +++--
 swh/web/browse/views/origin.py               |  33 +++-
 swh/web/browse/views/release.py              |  21 ++-
 swh/web/browse/views/revision.py             |  52 +++---
 swh/web/browse/views/snapshot.py             |   2 +-
 swh/web/common/identifiers.py                | 123 ++++++++++----
 swh/web/common/service.py                    |  35 ++++
 swh/web/tests/browse/views/test_directory.py |  17 +-
 swh/web/tests/browse/views/test_origin.py    | 136 ++++++++++++---
 swh/web/tests/browse/views/test_release.py   |  83 +++++----
 swh/web/tests/browse/views/test_revision.py  | 242 +++++++++++++++------------
 swh/web/tests/common/test_identifiers.py     | 151 ++++++++++++++++-
 swh/web/tests/common/test_service.py         |  21 +++
 16 files changed, 782 insertions(+), 291 deletions(-)
Changes applied before test
commit 0549fa4901f15e5fa4d6396f6cb696b8d3a36c56
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue May 12 19:02:51 2020 +0200

    identifiers: Add resolving of new SWHID contextual information
    
    Update the built browse urls from new SWHID contextual info:
    
      * visit : the snapshot in which the object has been found
    
      * anchor: an ancestor of the object in the SWH graph defining browsing scope
    
      * path: path of the object from its root directory
    
    Closes T2342
    Closes T2408

commit 88fde952d6f5cbe16766e3211654b65a723a850c
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Apr 3 19:40:04 2020 +0200

    browse: Add snapshot related query parameters in numerous object views
    
    It enables to browse archived objects scoped to a given origin visit, possibly
    on a given branch, release or revision.
    
    Closes T2359
    Related to T2342

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

ardumont added a subscriber: ardumont.

Looks fine to me

a couple of remarks here and there ;)

swh/web/common/identifiers.py
77

Maybe add a docstring to explain what is its intended use.

swh/web/tests/common/test_identifiers.py
497

maybe explicit in its method name that this checks results ;)

568

lol, a lot of code for just the url assertions ;)
must have a hell lots of stuff in there now.

This revision is now accepted and ready to land.May 15 2020, 5:51 PM

Update: Rebase and fix some corner case issues.

Build is green

Patch application report for D3157 (id=11435)

Could not rebase; Attempt merge onto 3f9f08482c...

Updating 3f9f0848..6bd1bc95
Fast-forward
 swh/web/browse/snapshot_context.py             |  44 +++--
 swh/web/browse/utils.py                        |  41 +++--
 swh/web/browse/views/content.py                |  68 ++++---
 swh/web/browse/views/directory.py              |  69 ++++---
 swh/web/browse/views/origin.py                 |  33 +++-
 swh/web/browse/views/release.py                |  21 ++-
 swh/web/browse/views/revision.py               |  67 ++++---
 swh/web/browse/views/snapshot.py               |   2 +-
 swh/web/common/identifiers.py                  | 129 ++++++++++---
 swh/web/common/service.py                      |  35 ++++
 swh/web/tests/browse/views/test_content.py     | 109 +++++++++++
 swh/web/tests/browse/views/test_directory.py   | 127 ++++++++++++-
 swh/web/tests/browse/views/test_identifiers.py |  48 ++++-
 swh/web/tests/browse/views/test_origin.py      | 136 +++++++++++---
 swh/web/tests/browse/views/test_release.py     |  83 ++++++---
 swh/web/tests/browse/views/test_revision.py    | 244 ++++++++++++++-----------
 swh/web/tests/common/test_identifiers.py       | 151 ++++++++++++++-
 swh/web/tests/common/test_service.py           |  21 +++
 18 files changed, 1106 insertions(+), 322 deletions(-)
Changes applied before test
commit 6bd1bc95755b3b0621edb478dc9c60b8435173a2
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue May 12 19:02:51 2020 +0200

    identifiers: Add resolving of new SWHID contextual information
    
    Update the built browse urls from new SWHID contextual info:
    
      * visit : the snapshot in which the object has been found
    
      * anchor: an ancestor of the object in the SWH graph defining browsing scope
    
      * path: path of the object from its root directory
    
    Closes T2342
    Closes T2408

commit 904ed9d99b9f5c4c9522fda72310785fc5357430
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Jun 4 14:08:49 2020 +0200

    browse/content: Fix content path when not provided as query parameter
    
    Closes T2427

commit 312db80743a7961b70cd31d581543e24eed4769b
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon May 25 15:45:10 2020 +0200

    browse/revision: Fix revision id in snapshot context
    
    Closes T2417

commit 1d477dface8adc18ddf37ac48e370b7fdcd5426a
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Apr 3 19:40:04 2020 +0200

    browse: Add snapshot related query parameters in numerous object views
    
    It enables to browse archived objects scoped to a given origin visit, possibly
    on a given branch, release or revision.
    
    Related to T2342
    Related to T2427
    
    Closes T2359

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

Build is green

Patch application report for D3157 (id=11435)

Could not rebase; Attempt merge onto 3f9f08482c...

Updating 3f9f0848..6bd1bc95
Fast-forward
 swh/web/browse/snapshot_context.py             |  44 +++--
 swh/web/browse/utils.py                        |  41 +++--
 swh/web/browse/views/content.py                |  68 ++++---
 swh/web/browse/views/directory.py              |  69 ++++---
 swh/web/browse/views/origin.py                 |  33 +++-
 swh/web/browse/views/release.py                |  21 ++-
 swh/web/browse/views/revision.py               |  67 ++++---
 swh/web/browse/views/snapshot.py               |   2 +-
 swh/web/common/identifiers.py                  | 129 ++++++++++---
 swh/web/common/service.py                      |  35 ++++
 swh/web/tests/browse/views/test_content.py     | 109 +++++++++++
 swh/web/tests/browse/views/test_directory.py   | 127 ++++++++++++-
 swh/web/tests/browse/views/test_identifiers.py |  48 ++++-
 swh/web/tests/browse/views/test_origin.py      | 136 +++++++++++---
 swh/web/tests/browse/views/test_release.py     |  83 ++++++---
 swh/web/tests/browse/views/test_revision.py    | 244 ++++++++++++++-----------
 swh/web/tests/common/test_identifiers.py       | 151 ++++++++++++++-
 swh/web/tests/common/test_service.py           |  21 +++
 18 files changed, 1106 insertions(+), 322 deletions(-)
Changes applied before test
commit 6bd1bc95755b3b0621edb478dc9c60b8435173a2
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue May 12 19:02:51 2020 +0200

    identifiers: Add resolving of new SWHID contextual information
    
    Update the built browse urls from new SWHID contextual info:
    
      * visit : the snapshot in which the object has been found
    
      * anchor: an ancestor of the object in the SWH graph defining browsing scope
    
      * path: path of the object from its root directory
    
    Closes T2342
    Closes T2408

commit 904ed9d99b9f5c4c9522fda72310785fc5357430
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Jun 4 14:08:49 2020 +0200

    browse/content: Fix content path when not provided as query parameter
    
    Closes T2427

commit 312db80743a7961b70cd31d581543e24eed4769b
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon May 25 15:45:10 2020 +0200

    browse/revision: Fix revision id in snapshot context
    
    Closes T2417

commit 1d477dface8adc18ddf37ac48e370b7fdcd5426a
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Apr 3 19:40:04 2020 +0200

    browse: Add snapshot related query parameters in numerous object views
    
    It enables to browse archived objects scoped to a given origin visit, possibly
    on a given branch, release or revision.
    
    Related to T2342
    Related to T2427
    
    Closes T2359

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

Build is green

Patch application report for D3157 (id=11450)

Could not rebase; Attempt merge onto 3f9f08482c...

Updating 3f9f0848..00684632
Fast-forward
 swh/web/browse/snapshot_context.py             |  44 +++--
 swh/web/browse/utils.py                        |  41 +++--
 swh/web/browse/views/content.py                |  68 ++++---
 swh/web/browse/views/directory.py              |  69 ++++---
 swh/web/browse/views/origin.py                 |  33 +++-
 swh/web/browse/views/release.py                |  21 ++-
 swh/web/browse/views/revision.py               |  67 ++++---
 swh/web/browse/views/snapshot.py               |   2 +-
 swh/web/common/identifiers.py                  | 132 ++++++++++---
 swh/web/common/service.py                      |  35 ++++
 swh/web/tests/browse/views/test_content.py     | 109 +++++++++++
 swh/web/tests/browse/views/test_directory.py   | 127 ++++++++++++-
 swh/web/tests/browse/views/test_identifiers.py |  48 ++++-
 swh/web/tests/browse/views/test_origin.py      | 136 +++++++++++---
 swh/web/tests/browse/views/test_release.py     |  83 ++++++---
 swh/web/tests/browse/views/test_revision.py    | 244 ++++++++++++++-----------
 swh/web/tests/common/test_identifiers.py       | 149 ++++++++++++++-
 swh/web/tests/common/test_service.py           |  21 +++
 18 files changed, 1107 insertions(+), 322 deletions(-)
Changes applied before test
commit 006846325df043f810d9d0a2e2184d1bf315eb24
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue May 12 19:02:51 2020 +0200

    identifiers: Add resolving of new SWHID contextual information
    
    Update the built browse urls from new SWHID contextual info:
    
      * visit : the snapshot in which the object has been found
    
      * anchor: an ancestor of the object in the SWH graph defining browsing scope
    
      * path: path of the object from its root directory
    
    Closes T2342
    Closes T2408

commit 904ed9d99b9f5c4c9522fda72310785fc5357430
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Jun 4 14:08:49 2020 +0200

    browse/content: Fix content path when not provided as query parameter
    
    Closes T2427

commit 312db80743a7961b70cd31d581543e24eed4769b
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon May 25 15:45:10 2020 +0200

    browse/revision: Fix revision id in snapshot context
    
    Closes T2417

commit 1d477dface8adc18ddf37ac48e370b7fdcd5426a
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Apr 3 19:40:04 2020 +0200

    browse: Add snapshot related query parameters in numerous object views
    
    It enables to browse archived objects scoped to a given origin visit, possibly
    on a given branch, release or revision.
    
    Related to T2342
    Related to T2427
    
    Closes T2359

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