FAIRmat-NFDI / nexus_definitions

Definitions of the NeXus Standard File Structure and Contents
https://manual.nexusformat.org/
Other
5 stars 8 forks source link

nyaml2nxdl: xref in app-def level docstring #118

Closed lukaspie closed 7 months ago

lukaspie commented 8 months ago

If the docstring at the main definition level is not a single string, but a list of strings (e.g., with an xref element), nyaml2nxdl throws an AssertionError.

Expected behavior:

(NXelectronanalyser.yaml)
category: base
doc: Subclass of NXinstrument to describe a photoelectron analyser.
- |
  Subclass of NXinstrument to describe a photoelectron analyser.
- |
  xref:
    spec: ISO 18115-1:2023
    term: 12.59
    url: https://www.iso.org/obp/ui/en/#iso:std:iso:18115:-1:ed-3:v1:en:term:12.59
type: group
NXelectronanalyser(NXobject):

should be converted to:

<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXelectronanalyser" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
  <doc>
       Subclass of NXinstrument to describe a photoelectron analyser.

           This concept is related to term `12.59`_ of the ISO 18115-1:2023 standard.
       .. _12.59: https://www.iso.org/obp/ui/en/#iso:std:iso:18115:-1:ed-3:v1:en:term:12.59
lukaspie commented 7 months ago

Closed as this was a duplicate of #119