Page MenuHomeSoftware Heritage

Update SWHID resolution on n2t.net and identifiers.org
Open, NormalPublic

Description

The resolution of SWHIDs on n2t.net and identifiers.org does not work when using the new qualifiers introduced in SWHIDs v1.4
It is probably enough to update the regex used in these redirectors following what was done for Invenio for T1015 that can be found here

https://github.com/inveniosoftware/idutils/blob/cc09640ffb457bab3cfe8d0eeb4822dd521fd36d/idutils/__init__.py#L245-L249

Currently the swh prefix description used by these two resolvers can be seen here (search for swh) : https://n2t.net/e/n2t_full_prefixes.yaml

To make modification, contact support at identifiers.org selecting MIRIAM as object

https://www.ebi.ac.uk/support/

Event Timeline

rdicosmo triaged this task as Normal priority.Thu, Nov 19, 5:38 PM
rdicosmo created this task.

Request sent.

Greetings,

This message has been automatically generated in response to the creation 
of a ticket regarding:
	"Update for Software Heritage identifiers resolver", 
a summary of which appears below.

Please include the ticket identifier:

         [Support #461946]

in the subject line of all future correspondence about this issue. To do so, 
you may reply to this message.

                        Thank you,
                        support@ebi.ac.uk

#########################################################################
EMBL-EBI service announcements and news:

- https://www.facebook.com/EMBLEBI
- https://twitter.com/EmblEbi
- https://twitter.com/EmblEbiEs

Free on-line training: http://www.ebi.ac.uk/training/online/
#########################################################################
User's email address: antoine.lambert@inria.fr
Feedback topic: MIRIAM
Referrer URL: 
Web browser used: Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0
Message sent: Friday 20 November 2020 10:35
Message content:
------------------------

Hello,

Software Heritage identifiers (SWHID) can be resolved on n2t.net and identifiers.org
but the latest version of their specification (https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html) is currently not supported by the MIRIAM registry.

Please find below an update of the SWHID specification that can be found in https://n2t.net/e/n2t_full_prefixes.yaml matching latest SWHID specification.

swh:
  type: "scheme"
  name: "Software Heritage"
  alias: 
  provider: 
  provider_id: "MIR:00100873"
  sort_score: "1"
  primary: "false"
  forward: "https://archive.softwareheritage.org/swh:${ac}"
  redirect: "https://archive.softwareheritage.org/swh:$id"
  description: "Software Heritage is the universal archive of software source code."
  subject: 
  location: "France"
  synonym: "nmrCV"
  institution: "INRIA"
  prefixed: "true"
  test: "1:rev:309cf2674ee7a0749978cf8265ab91a60aea0f7d"
  probe: "https://archive.softwareheritage.org/swh:1:rev:309cf2674ee7a0749978cf8265ab91a60aea0f7d"
  pattern: "^swh:[1-9]:(cnt|dir|rel|rev|snp):[0-9a-f]+(;(origin|visit|anchor|path|lines)=\S+)*$"
  state: "0:Unknown"
  more: "https://archive.softwareheritage.org"
anlambert closed this task as Resolved.Mon, Nov 30, 10:46 AM

SWHID with context qualifiers can now be resolved using https://identifiers.org/, closing this.

rdicosmo reopened this task as Open.Mon, Nov 30, 11:44 AM

Apparently, there is still something not working in identifiers.org, here is an example:

https://identifiers.org/swh:1:cnt:4d99d2d18326621ccdd70f5ea66c2e2ac236ad8b;origin=https://gitorious.org/ocamlp3l/ocamlp3l_cvs.git;visit=swh:1:snp:d7f1b9eb7ccb596c2622c4780febaa02549830f9;anchor=swh:1:rev:2db189928c94d62a3b4757b3eec68f0a4d4113f0;path=/Examples/SimpleFarm/simplefarm.ml;lines=9-15

it currently returns:
INVALID resolution request for 'swh:1:cnt:4d99d2d18326621ccdd70f5ea66c2e2ac236ad8b/gitorious.org/ocamlp3l/ocamlp3l_cvs.git/Examples/SimpleFarm/simplefarm.ml', due to 'Resolution request 'swh:1:cnt:4d99d2d18326621ccdd70f5ea66c2e2ac236ad8b/gitorious.org/ocamlp3l/ocamlp3l_cvs.git/Examples/SimpleFarm/simplefarm.ml' is NOT ABOUT A NAMESPACE; For namespace 'swh', provided local ID 'swh:1:cnt:4d99d2d18326621ccdd70f5ea66c2e2ac236ad8b/gitorious.org/ocamlp3l/ocamlp3l_cvs.git/Examples/SimpleFarm/simplefarm.ml' DOES NOT MATCH local IDs definition pattern '^swh:[1-9]:(cnt|dir|rel|rev|snp):[0-9a-f]+(;(origin|visit|anchor|path|lines)=\S+)*$''

And on n2t the redirection of
https://n2t.net/swh:1:cnt:4d99d2d18326621ccdd70f5ea66c2e2ac236ad8b;origin=https://gitorious.org/ocamlp3l/ocamlp3l_cvs.git;visit=swh:1:snp:d7f1b9eb7ccb596c2622c4780febaa02549830f9;anchor=swh:1:rev:2db189928c94d62a3b4757b3eec68f0a4d4113f0;path=/Examples/SimpleFarm/simplefarm.ml;lines=9-15

leads to a 404 on our side.

Arf, got mistaken by the green light on the identifiers.org Web UI, I should have clicked on the link.

For the n2t redirection, one slash for the origin url gets removed leading to a 404 as https:/gitorious.org/ocamlp3l/ocamlp3l_cvs.git is not a valid URL.

I will get in touch with the identifiers.org engineer that handle my request then.