Skip to content

Commit 0eff1a1

Browse files
committed
remove installation manual for cnxvalidate
1 parent 201543a commit 0eff1a1

File tree

3 files changed

+8
-81
lines changed

3 files changed

+8
-81
lines changed

docs/how-tos/pynxtools/validate-nexus-files-other-tools.md

Lines changed: 2 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -38,86 +38,11 @@ In case you are interested in testing these tools, we encourage you to follow th
3838
??? info "A note on operating systems"
3939
Note that installation on Windows can be tricky because cmake can sometimes not find the libxml2 library. Though, if you solve this, this may work on Windows. Therefore, we recommend to use Linux.
4040

41-
The tool `cnxvalidate` is written in C and has to be built from source (e.g., by using `cmake`).
42-
43-
#### Install `cmake`, `HDF5` & `xml2` libraries
44-
45-
Install all dependencies required to install `cnxvalidate` via `cmake`:
46-
47-
```console
48-
sudo apt-get update
49-
sudo apt-get install git
50-
sudo apt-get install build-essential
51-
sudo add-apt-repository universe
52-
sudo apt-get install libhdf5-serial-dev
53-
sudo apt-get -y install pkg-config
54-
sudo apt upgrade -y
55-
sudo apt-get -y install cmake
56-
sudo apt-get install libxml2-dev
57-
```
58-
59-
#### Clone the Github repository
60-
61-
Clone the GitHub repository:
62-
63-
```console
64-
git clone https://github.com/nexusformat/cnxvalidate.git
65-
```
66-
67-
Enter the cloned repository via the command
68-
69-
```console
70-
cd cnxvalidate
71-
```
72-
73-
Create a new directory called `build` and enter it:
74-
75-
```console
76-
mkdir -p build && cd build
77-
```
78-
79-
Use `cmake` to configure and compile all functionalities of the software, especially external libraries such as the `xml2` and `hdf5` libraries.
80-
81-
```console
82-
cmake ../
83-
```
84-
85-
Install `cnxvalidate` after it was successfully build
86-
87-
```console
88-
cd build
89-
make
90-
```
91-
92-
Now, the executable is located at:
93-
94-
```console
95-
/.../cnxvalidate/build/nxvalidate
96-
```
97-
98-
You will also need to have a local copy of the NeXus definitions that you can point `cnxvalidate` to with the `-l` option.
99-
100-
101-
!!! info "Getting the NeXus definitions"
102-
Download a set of NeXus definitions (choose only one).
103-
104-
For the NIAC NeXus definitions:
105-
106-
```console
107-
git clone https://github.com/nexusformat/definitions.git
108-
```
109-
110-
For the FAIRmat NeXus definitions, clone the repository:
111-
112-
```console
113-
git clone https://github.com/FAIRmat-NFDI/nexus_definitions.git definitions/
114-
```
115-
116-
Now you have a folder called "definitions". The path to this definitions folder is used in the `-l` option of `cnxvalidate` to tell the program which NeXus definitions shall be used.
41+
The tool `cnxvalidate` is written in C and has to be built from source (e.g., by using `cmake`). You can find instructions in the [README](https://github.com/nexusformat/cnxvalidate#building-nxvalidate) of the GitHub repository.
11742

11843
### Usage
11944

120-
After installation, you can invoke the help call from the command line:
45+
After installation, you can invoke the help call for the executable (called `nxvalidate`) from the command line:
12146

12247
=== "Source"
12348
```console

docs/learn/nexus/nexus-rules.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ A python implementation of this process can be found in [this function](https://
5656
5757
Aside from these general rules, there are a number of special rules for NeXus names that need to be considered:
5858
59-
- There is a set of reserved words (like `BLUESKY_`, `DECTRIS_`, `IDF_`, etc.) that are reserved for certain projects and communities. These are prefixes (typically written as uppercase + underscore) that cannot be overwritten by namefitting. For the full list, see [Rules for Storing Data Items in NeXus Files](https://manual.nexusformat.org/datarules.html), section "Reserved prefixes".
59+
- There is a set of prefixes (like `BLUESKY_`, `DECTRIS_`, `IDF_`, etc.) that are reserved for certain projects and communities. These prefixes (typically written as uppercase + underscore cannot be overwritten by namefitting.
6060
61-
- There is also a set of reserved suffixes that are used to give additional information for a group or field. For the full list, see [Rules for Storing Data Items in NeXus Files](https://manual.nexusformat.org/datarules.html), section "Reserved suffixes".
61+
- There is also a set of reserved suffixes that are used to give additional information for a group or field. These can only be used if the original field is present as well. As an example, the field `temperature_set` - which uses the suffix `_set`, reserved for setpoint of field values - can only be present if the field `temperature` is present as well.
6262
6363
- Additionally to namefitting, data annotation can use further information. For example, in case of NXdata, the axes listed among the `@axes` shall fit to any instances of `AXISNAME` and data objects listed in `@signal` or `@auxiliary_signals` shall fit to instances of `DATA`. Such rules are typically given in the base classes (e.g., see [here](https://manual.nexusformat.org/classes/base_classes/NXdata.html#index-0) for NXdata). Any tool that makes use of the base classes should implement these special rules in its validation procedure. As an example, pynxtools has a special [function for handling NXdata](https://github.com/FAIRmat-NFDI/pynxtools/blob/474fe823112b8ee1e7b42ac80bb7408fdde22bd5/src/pynxtools/dataconverter/validation.py#L220).
6464
65+
For the full list of these respective rules, see [Rules for Storing Data Items in NeXus Files](https://manual.nexusformat.org/datarules.html).
66+
6567
## Concept name inheritance
6668
6769
Note that NeXus also supports inheritance of concepts. The same rules as for instance names on the data level apply here for the inherited concept names. That is, the name of a concept must match in concept name and `nameType` to inherit from another concept. As an example, if we define a field with name `userID` and `nameType="partial"` in a base class and then use this base class in an application definition, the concept `user` and `nameType="specified"` would inherit its property. Contrarily, the concept `my_user` would not inherit from `userID`.

docs/learn/pynxtools/nexus-validation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Validation is a processing step during which the structure, concepts, and annotations of data in a file are checked for conformance with a specific version of the NeXus definitions. The processing yields a list of deviations between the actual formatting of individual data instances and their expected formatting. These deviations are typically categorized based on their severity. In effect, boolean or more nuanced conclusions can be drawn how closely the content of the file follows the definitions.
66

7-
The validity of NeXus files is fundamental to ensure FAIR data. Without specific requirements, it is not possible to understand the data. What type of experiment? What Laser Wavelength? Which voltage? What data is represented in a table? What is the unit of a value? Which ISO norm does this refer to? Where was this measured? Which year was this measured?
7+
The validity of NeXus files is fundamental to ensure FAIR data. Validation ensures that key contextual information - such as the type of experiment, laser wavelength, applied voltage, structure of tabular data, units of measurement, referenced standards, measurement location, and acquisition time - matches the expected definitions and formats.
88

9-
The NeXus application definitions define the minimum set of terms/concepts that must be reported for a given experiment (i.e., the required terms that you must add to the NeXus file in order to be compliant with that application definition). Application definitions may also define terms that are optional in the NeXus data file. NeXus files are considered valid if they comply with the respective NeXus application definition.
9+
The NeXus application definitions define the minimum set of terms/concepts that must be reported for a given experiment (i.e., the required terms that you must add to the NeXus file in order to be compliant with that application definition). Application definitions may also define terms that are optional in the NeXus data file. Entries in NeXus files (which are instances of the [`NXentry`](https://manual.nexusformat.org/classes/base_classes/NXentry.html) base class) should report which definition they implement (under [`NXentry/definition`](https://manual.nexusformat.org/classes/base_classes/NXentry.html#nxentry-definition-field)). These entries are considered valid if they comply with the respective NeXus application definit Such an entry is valid if all required concepts of the respective application definition are present and if all instance data within the entry adheres to the format and constraints defined in the application definition.
1010

1111
## Approach
1212

0 commit comments

Comments
 (0)