• Re: [gentoo-dev] metadata.xml upstream docs as reference to scientific

    From Ulrich Mueller@21:1/5 to All on Fri Sep 15 12:20:01 2023
    On Fri, 15 Sep 2023, Alexander Neuwirth wrote:

    I am looking for a way to link scientific publications to
    ebuilds/packages. The easiest, but hacky way right now is to use the
    |<doc lang="doi">https://doi.org/...</doc>|. Integration with |epkginfo|/|equery meta| works nicely out of the box. However,
    currently |pkgcheck| and/or the XML format complains about repeated
    |lang| entries and does not allow long |lang| attributes (i.e. |lang="inspirehep"| fails understandably).

    Please don't do this. The lang attribute is of type xs:language [1]
    so it must be a valid BCP 47 language tag.

    As a matter of fact, "doi" happens to be a valid tag for the Dogri
    language [2], but this isn't helpful either.

    [1] https://gitweb.gentoo.org/data/xml-schema.git/tree/metadata.xsd?id=db829cfdb40ae0a0034848cce38ee741a7c8d68c#n257
    [2] https://www.loc.gov/standards/iso639-2/php/langcodes_name.php?code_ID=117

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ulrich Mueller@21:1/5 to All on Sun Sep 17 17:20:01 2023
    On Sun, 17 Sep 2023, Alexander Neuwirth wrote:

    Thanks. Instead of using the lang entry I can imagine these other
    approaches:

    1. doi/arxiv/... links could also easily be plugged in custom upstream
    remote ids, but that also feels a bit wrong since all other [upstream
    remote ids](https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Upstream_remote-id_types)
    are repos/source code providers.

    GLEP 68 rather abstractly says that the remote-id elements should point
    to "package identification trackers", and its predecessor GLEP 46
    explains that this means the upstream source. So this doesn't look like
    a good fit.

    2. Adding something specific to GLEP 68, like `<upstream><reference type="doi"> https...`. However that seems like a bit too much work for
    adding something that only a small subset of users (science) cares
    about. Also integration of parsing with existing tools is an extra
    overhead.

    This would require maintenance of another list of types. Looks like the semantic is implicit in the URL, so is a type really needed?

    A simpler change would be to lift the uniqueness restriction for the
    doc element, i.e. allow it multiple times for the same language.

    3. Put them also into `HOMEPAGE` of the ebuilds. Again bit of a wrong
    place, but with the (minor) advantage of having possibly different/new references per version.

    This wouldn't require any changes.

    Is any of these three superior/preferable?

    It depends on how many packages in the Gentoo repository are expected to
    use the feature.

    If the answer is less than ten, then IMHO using HOMEPAGE is a reasonable choice. If it would be at least an order of magnitude more, then we could
    think about updating GLEP 68 (e.g. lift uniqueness of doc).

    Ulrich

    -----BEGIN PGP SIGNATURE-----

    iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmUHGLMPHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4uZBIH/jglEvi2hg5vwIOhi25u9zZJJWDmFXHq+lf7 Ql62ZjEh1XAKDOUZp8hc6HdBbz5zWYcrWKM5NswYIirnZYD8mDpaNIkzbLVvbM2o vFge8RYLKxxWmRd3rrZA6BqtdJNROVwzPypXftgZi/uR7ORJFng+hcdLUKoHxc0M Co65LN3x/01CW+tbikr/MRpfhXvepRoyqt+b60TNYI3WKLaFYIgHLT3KFfUGUbtY izgry0J1mrGuCWRqkIkf1OhTLcSqQSUR3sOCFZV2cy4VqdTMKDRAibycu02LX32p SbjQazTW7DRWXYXQKBIUMJwDhLwfWABPP5B9onMAd5wO3eqXi9o=
    =zx99
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ulrich Mueller@21:1/5 to All on Sun Sep 17 23:00:02 2023
    On Sun, 17 Sep 2023, Florian Schmaus wrote:

    <upstream>
    <reference uri='doi:10.17487/rfc6120'/>
    </upstream>

    sounds perfectly fine.

    Don't use an attribute if you can put the information in the (otherwise
    empty) element. Especially, when other elements like <doc> already do it
    that way.

    It would require (minor) adjustments to the schema and DTD.

    Also an update of GLEP 68, in the first place.

    -----BEGIN PGP SIGNATURE-----

    iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmUHZ8IPHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4uQIMIAKbhdl0fBZXO+xwdMOv5olZ5/UL6G056ZgGJ HROnPfFYyDyb5+SJHEkq6gJPD371sV7q17WMCPF+rY0OS+5oZX1J1RMqh7LsIKJb 5yK73w2YFKvmEl7ief1dxkDnlEor4MhFn75jpcYui+g3KaePtHSKHRwPOgx5lGF9 PpxDeuWnhUePzACg68UtxJnftKiySF+ss+VutBhIgCc9HgIqeRs9ZEblbPjfhMjE 19rGL/2HKQSvlgUAOZSsjDwNc4cR4xGTCReebHb0d6GVKkNDuTQ3anKqKPVsuoNv ZT8HZes5rhydUltoWIWbB5KzRAHeAj2zadZVi1KgJ6P027PYq5s=
    =OMD1
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)