diff --git a/.cspell/custom-dictionary.txt b/.cspell/custom-dictionary.txt index 252e486..3dfe7a8 100644 --- a/.cspell/custom-dictionary.txt +++ b/.cspell/custom-dictionary.txt @@ -24,9 +24,11 @@ kernelspec Laurenz linenums Lukas +mainfile ndarray nxdl nxdls +orcid Pielsticker pymdownx pynxtools diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..3b1d51e --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,41 @@ +cff-version: 1.2.0 +title: 'pynxtools-igor: A pynxtools reader plugin for Wavemetrics Igor Pro data' +version: 0.1.0 +message: + If you use this software, please cite it using the + metadata from this file. +type: software +authors: + - given-names: Florian + family-names: Dobener + orcid: 'https://orcid.org/0000-0003-1987-6224' + - given-names: Laurenz + family-names: Rettig + orcid: 'https://orcid.org/0000-0002-0725-6696' + - given-names: Lukas + family-names: Pielsticker + orcid: 'https://orcid.org/0000-0001-9361-8333' + +doi: TODO +repository-code: 'https://github.com/FAIRmat-NFDI/pynxtools-igor' +url: TODO +keywords: + - Wavemetrics + - Igor Pro + - NOMAD + - pynxtools + - NeXus +abstract: + pynxtools-igor is a free, and open-source data software for converting data stored + with Wavemetrics [Igor Pro](https://www.wavemetrics.com/) into the [NeXus](https://www.nexusformat.org/) + format. It is implemented as a plugin for [pynxtools](https://github.com/FAIRmat-NFDI/pynxtools) and + allows to read, translate, and standardize data from Igor Pro binary waves and packed experiment files. + Depending on the domain of data, pynxtools allows to ensure compliance with various NeXus application + definitions. + + pynxtools-igor is developed both as a standalone reader and as a tool within NOMAD, an open-source data + management platform for materials science ((https://nomad-lab.eu/nomad-lab/). + + The work is funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - 460197019 (FAIRmat) + (https://gepris.dfg.de/gepris/projekt/460197019?language=en). +license: Apache-2.0 \ No newline at end of file diff --git a/tests/test_nomad_examples.py b/tests/test_nomad_examples.py new file mode 100644 index 0000000..b45679d --- /dev/null +++ b/tests/test_nomad_examples.py @@ -0,0 +1,74 @@ +# +# Copyright The NOMAD Authors. +# +# This file is part of NOMAD. See https://nomad-lab.eu for further info. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +"""Test for NOMAD examples in igor reader plugin.""" + +import os +import pytest + +try: + import nomad +except ImportError: + pytest.skip( + "Skipping NOMAD example tests because nomad is not installed", + allow_module_level=True, + ) + +from pynxtools.testing.nomad_example import ( + get_file_parameter, + parse_nomad_examples, + example_upload_entry_point_valid, +) + +from pynxtools_igor.nomad.entrypoints import igor_example + + +EXAMPLE_PATH = os.path.join( + os.path.dirname(__file__), + "..", + "src", + "pynxtools_igor", + "nomad", + "examples", +) + + +@pytest.mark.parametrize( + "mainfile", + get_file_parameter(EXAMPLE_PATH), +) +def test_parse_nomad_examples(mainfile): + """Test if NOMAD examples work.""" + archive_dict = parse_nomad_examples(mainfile) + + +@pytest.mark.parametrize( + ("entrypoint", "example_path"), + [ + pytest.param( + igor_example, + EXAMPLE_PATH, + id="igor_example", + ), + ], +) +def test_example_upload_entry_point_valid(entrypoint, example_path): + """Test if NOMAD ExampleUploadEntryPoint works.""" + example_upload_entry_point_valid( + entrypoint=entrypoint, + example_path=example_path, + )