Skip to content

Commit

Permalink
format base classes and applications in accordance to existing NIAC v…
Browse files Browse the repository at this point in the history
…ersion

# Conflicts:
#	applications/NXarpes.nxdl.xml
#	applications/nyaml/NXarpes.yaml
#	base_classes/NXaperture.nxdl.xml
#	base_classes/NXbeam.nxdl.xml
#	base_classes/NXdata.nxdl.xml
#	base_classes/NXdetector.nxdl.xml
#	base_classes/NXentry.nxdl.xml
#	base_classes/NXenvironment.nxdl.xml
#	base_classes/NXinstrument.nxdl.xml
#	base_classes/NXmonochromator.nxdl.xml
#	base_classes/NXsample.nxdl.xml
#	base_classes/NXsample_component.nxdl.xml
#	base_classes/NXsensor.nxdl.xml
#	base_classes/NXsource.nxdl.xml
#	base_classes/NXsubentry.nxdl.xml
#	base_classes/NXtransformations.nxdl.xml
#	base_classes/NXuser.nxdl.xml
#	base_classes/nyaml/NXaperture.yaml
#	base_classes/nyaml/NXbeam.yaml
#	base_classes/nyaml/NXdata.yaml
#	base_classes/nyaml/NXdetector.yaml
#	base_classes/nyaml/NXentry.yaml
#	base_classes/nyaml/NXenvironment.yaml
#	base_classes/nyaml/NXinstrument.yaml
#	base_classes/nyaml/NXmonochromator.yaml
#	base_classes/nyaml/NXprocess.yaml
#	base_classes/nyaml/NXroot.yaml
#	base_classes/nyaml/NXsample.yaml
#	base_classes/nyaml/NXsample_component.yaml
#	base_classes/nyaml/NXsensor.yaml
#	base_classes/nyaml/NXsource.yaml
#	base_classes/nyaml/NXsubentry.yaml
#	base_classes/nyaml/NXtransformations.yaml
#	base_classes/nyaml/NXuser.yaml
  • Loading branch information
lukaspie committed Sep 23, 2024
1 parent d5289a0 commit f451b0b
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 95 deletions.
21 changes: 2 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ test ::

clean ::
$(RM) -rf $(BUILD_DIR)
$(RM) -rf $(BASE_CLASS_DIR)/$(NYAML_SUBDIR)
$(RM) -rf $(APPDEF_DIR)/$(NYAML_SUBDIR)
$(RM) -rf $(CONTRIB_DIR)/$(NYAML_SUBDIR)

prepare ::
$(PYTHON) -m dev_tools manual --prepare --build-root $(BUILD_DIR)
Expand Down Expand Up @@ -97,24 +94,10 @@ all ::
@echo "HTML built: `ls -lAFgh $(BUILD_DIR)/manual/build/html/index.html`"
@echo "PDF built: `ls -lAFgh $(BUILD_DIR)/manual/build/latex/nexus.pdf`"

$(BASE_CLASS_DIR)/%.nxdl.xml : $(BASE_CLASS_DIR)/$(NYAML_SUBDIR)/%.yaml
nyaml2nxdl $< --output-file $@

$(CONTRIB_DIR)/%.nxdl.xml : $(CONTRIB_DIR)/$(NYAML_SUBDIR)/%.yaml
nyaml2nxdl $< --output-file $@

$(APPDEF_DIR)/%.nxdl.xml : $(APPDEF_DIR)/$(NYAML_SUBDIR)/%.yaml
nyaml2nxdl $< --output-file $@

nxdl: $(YBC_NXDL_TARGETS) $(YCONTRIB_NXDL_TARGETS) $(YAPPDEF_NXDL_TARGETS)

nyaml:
$(MAKE) -f nyaml.mk


# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2008-2024 NeXus International Advisory Committee (NIAC)
# Copyright (C) 2008-2022 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand All @@ -130,4 +113,4 @@ nyaml:
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# For further information, see http://www.nexusformat.org
# For further information, see http://www.nexusformat.org
136 changes: 60 additions & 76 deletions base_classes/NXroot.nxdl.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl"?>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl" ?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
Expand All @@ -21,58 +21,54 @@
#
# For further information, see http://www.nexusformat.org
-->
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXroot" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<doc>
Definition of the root NeXus group.
</doc>
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" category="base"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"
name="NXroot"
type="group" extends="NXobject">
<doc>Definition of the root NeXus group.</doc>
<attribute name="NX_class">
<doc>
The root of any NeXus data file is an ``NXroot`` class
(no other choice is allowed for a valid NeXus data file).
This attribute cements that definition.
The root of any NeXus data file is an ``NXroot`` class
(no other choice is allowed for a valid NeXus data file).
This attribute cements that definition.
</doc>
<enumeration>
<item value="NXroot"/>
<item value="NXroot"></item>
</enumeration>
</attribute>
<attribute name="file_time" type="NX_DATE_TIME">
<doc>
Date and time file was originally created
</doc>
<doc>Date and time file was originally created</doc>
</attribute>
<attribute name="file_name">
<doc>
File name of original NeXus file
</doc>
<doc>File name of original NeXus file</doc>
</attribute>
<attribute name="file_update_time" type="NX_DATE_TIME">
<doc>
Date and time of last file change at close
</doc>
<doc>Date and time of last file change at close</doc>
</attribute>
<attribute name="NeXus_repository">
<doc>
A repository containing the application definitions
used for creating this file.
If the NeXus_version attribute contains a commit distance and hash
this should refer to this repository.
A repository containing the application definitions
used for creating this file.
If the NeXus_version attribute contains a commit distance and hash
this should refer to this repository.
</doc>
</attribute>
<attribute name="NeXus_version">
<doc>
Version of NeXus definitions used in writing the file.
This may either be a date based version tag of the form `vYYYY.MM`
or a version tag with a commit distance and source control (e.g., git) hash of
the form `vYYYY.MM.post1.dev&lt;commit-distance&gt;.g&lt;git-hash&gt;`.
It may contain an additional `.dYYYYMMDD` timestamp appendix
for dirty repositories.
If the version contains a commit distance and hash the
NeXus_repository attribute should be written with the
repository url containing this version.
Only used when the NAPI or pynxtools has written the file.
Note that this is different from the version of the
base class or application definition version number.
Version of NeXus definitions used in writing the file.
This may either be a date based version tag of the form `vYYYY.MM`
or a version tag with a commit distance and source control (e.g., git) hash of
the form `vYYYY.MM.post1.dev&lt;commit-distance&gt;.g&lt;git-hash&gt;`.
It may contain an additional `.dYYYYMMDD` timestamp appendix
for dirty repositories.
If the version contains a commit distance and hash the
NeXus_repository attribute should be written with the
repository url containing this version.

Only used when the NAPI or pynxtools has written the file.
Note that this is different from the version of the
base class or application definition version number.
</doc>
</attribute>
<attribute name="partial">
Expand All @@ -84,61 +80,49 @@
</doc>
</attribute>
<attribute name="HDF_version">
<doc>
Version of HDF (version 4) library used in writing the file
</doc>
<doc>Version of HDF (version 4) library used in writing the file</doc>
</attribute>
<attribute name="HDF5_Version">
<doc>
Version of HDF5 library used in writing the file.
Note this attribute is spelled with uppercase "V",
different than other version attributes.
Version of HDF5 library used in writing the file.

Note this attribute is spelled with uppercase "V",
different than other version attributes.
</doc>
</attribute>
<attribute name="XML_version">
<doc>
Version of XML support library used in writing the XML file
</doc>
<doc>Version of XML support library used in writing the XML file</doc>
</attribute>
<attribute name="h5py_version">
<doc>
Version of h5py Python package used in writing the file
</doc>
<doc>Version of h5py Python package used in writing the file</doc>
</attribute>
<attribute name="creator">
<doc>
facility or program where file originated
</doc>
<doc>facility or program where file originated</doc>
</attribute>
<attribute name="creator_version">
<doc>
Version of facility or program used in writing the file
</doc>
<doc>Version of facility or program used in writing the file</doc>
</attribute>
<group type="NXentry" minOccurs="1">
<doc>
entries
</doc>
<group type="NXentry" minOccurs="1" >
<doc>entries</doc>
</group>
<attribute name="default">
<doc>
.. index:: find the default plottable data
.. index:: plotting
.. index:: default attribute value
Declares which :ref:`NXentry` group contains
the data to be shown by default.
It is used to resolve ambiguity when
more than one :ref:`NXentry` group exists.
The value :ref:`names &lt;validItemName&gt;` the default :ref:`NXentry` group. The
value must be the name of a child of the current group. The child must be a
NeXus group or a link to a NeXus group.
It is recommended (as of NIAC2014) to use this attribute
to help define the path to the default dataset to be plotted.
See https://www.nexusformat.org/2014_How_to_find_default_data.html
for a summary of the discussion.
.. index:: find the default plottable data
.. index:: plotting
.. index:: default attribute value

Declares which :ref:`NXentry` group contains
the data to be shown by default.
It is used to resolve ambiguity when
more than one :ref:`NXentry` group exists.
The value :ref:`names &lt;validItemName>` the default :ref:`NXentry` group. The
value must be the name of a child of the current group. The child must be a
NeXus group or a link to a NeXus group.

It is recommended (as of NIAC2014) to use this attribute
to help define the path to the default dataset to be plotted.
See https://www.nexusformat.org/2014_How_to_find_default_data.html
for a summary of the discussion.
</doc>
</attribute>
</definition>
</definition>

0 comments on commit f451b0b

Please sign in to comment.