-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add citation and nomad example tests
- Loading branch information
Showing
3 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,11 @@ kernelspec | |
Laurenz | ||
linenums | ||
Lukas | ||
mainfile | ||
ndarray | ||
nxdl | ||
nxdls | ||
orcid | ||
Pielsticker | ||
pymdownx | ||
pynxtools | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
) |