FAIRmat-NFDI / nyaml

https://fairmat-nfdi.github.io/nyaml
https://pypi.org/project/nyaml/
Apache License 2.0
1 stars 0 forks source link

Add `dim` keyword and add `--output-file` cli option #4

Closed domna closed 7 months ago

domna commented 7 months ago

Dim keyword

Creates a 'dimensions' element instance, and appends it to an existing element. Allows for handling numpy tensor notation of dimensions. That is,

    dimensions:
      rank: 1
      dim: (1, 3)

can be replaced by

    dim: (3,)

Output file

A new cli option has been added to specify the output file:

nyaml2nxdl my_file.yaml --output-file my_file.nxdl.xml

No checks are done for the output file name (i.e., it is not checked for matching yaml and nxdl.xml combination)