Skip to content

Commit

Permalink
MNT #1056 documentation builds now
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jun 13, 2022
1 parent b5df68e commit 9e026cb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
40 changes: 19 additions & 21 deletions nxdlTypes.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -451,20 +451,20 @@
<xs:documentation>any valid NeXus field or attribute type</xs:documentation>
</xs:annotation>
<xs:union memberTypes="
nxdl:ISO8601
nxdl:NX_BINARY
nxdl:NX_BOOLEAN
nxdl:NX_CCOMPLEX
nxdl:NX_CHAR
nxdl:NX_COMPLEX
nxdl:NX_DATE_TIME
nxdl:NX_FLOAT
nxdl:NX_INT
nxdl:NX_UINT
nxdl:NX_POSINT
nxdl:NX_NUMBER
nxdl:NX_DATE_TIME
nxdl:NX_BOOLEAN
nxdl:NX_BINARY
nxdl:ISO8601
nxdl:NX_CCOMPLEX
nxdl:NX_PCOMPLEX
nxdl:NX_COMPLEX
nxdl:NX_POSINT
nxdl:NX_QUATERNION
nxdl:NX_UINT
"/>
</xs:simpleType>

Expand Down Expand Up @@ -523,17 +523,18 @@
" />
</xs:simpleType>

<xs:simpleType name="list_of_doubles">
<xs:list itemType='xs:double' />
</xs:simpleType>

<xs:simpleType name="NX_CCOMPLEX">
<xs:annotation>
<xs:documentation>
Compound type cartesian representation of complex numbers (real and
imaginary parts) in NeXus.
</xs:documentation>
</xs:annotation>
<xs:restriction>
<xs:simpleType>
<xs:list itemType='xs:double'/>
</xs:simpleType>
<xs:restriction base="nxdl:list_of_doubles">
<xs:length value='2' />
</xs:restriction>
</xs:simpleType>
Expand All @@ -545,17 +546,17 @@
and phase *in radian*) in NeXus.
</xs:documentation>
</xs:annotation>
<xs:restriction>
<xs:simpleType>
<xs:list itemType='xs:double'/>
</xs:simpleType>
<xs:restriction base="nxdl:list_of_doubles">
<xs:length value='2' />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="NX_COMPLEX">
<xs:annotation>
<xs:documentation>Compound type representaion of complex numbers (real and imaginary parts) in NeXus</xs:documentation>
<xs:documentation>
Compound type representation of complex numbers (either
cartesian or polar form) in NeXus.
</xs:documentation>
</xs:annotation>
<xs:union memberTypes="
nxdl:NX_CCOMPLEX
Expand All @@ -569,10 +570,7 @@
Compound type representation of quaternion numbers (real,i,j,k) in NeXus.
</xs:documentation>
</xs:annotation>
<xs:restriction>
<xs:simpleType>
<xs:list itemType='xs:double'/>
</xs:simpleType>
<xs:restriction base="nxdl:list_of_doubles">
<xs:length value='4' />
</xs:restriction>
</xs:simpleType>
Expand Down
3 changes: 2 additions & 1 deletion utils/dev_units2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
from units2rst import worker


sys.argv.append("../nxdlTypes.xsd")
# sys.argv.append("../nxdlTypes.xsd")
sys.argv.append("nxdlTypes.xsd")
worker('anyUnitsAttr')
2 changes: 2 additions & 0 deletions utils/units2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def worker(nodeMatchString, section = 'units'):
# get the definition of each type of units
for node in node_list:
node_name = node.get('name')
if node_name is None:
continue
if 'nxdl:' + node_name in members:
words = node.xpath('xs:annotation/xs:documentation', namespaces=ns)[0]
examples = []
Expand Down

0 comments on commit 9e026cb

Please sign in to comment.