From 42a7bad55530847ac7bb5490539fc8764f23261a Mon Sep 17 00:00:00 2001 From: Rubel Date: Tue, 29 Oct 2024 10:12:47 +0100 Subject: [PATCH] Path for pynxtools-stm from pynxtools-stm reader, for test purpose. --- src/pynxtools/testing/nomad_example.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/pynxtools/testing/nomad_example.py b/src/pynxtools/testing/nomad_example.py index b385c05ed..ae9479493 100644 --- a/src/pynxtools/testing/nomad_example.py +++ b/src/pynxtools/testing/nomad_example.py @@ -18,22 +18,29 @@ """Test for NOMAD examples in reader plugins.""" import os -from typing import Dict, Any +from typing import Any, Dict + import pytest try: - from nomad.parsing.parser import ArchiveParser - from nomad.datamodel import EntryArchive, Context - from nomad.config.models.plugins import ( ExampleUploadEntryPoint, ) + from nomad.datamodel import Context, EntryArchive + from nomad.parsing.parser import ArchiveParser except ImportError: pytest.skip( "Skipping NOMAD example tests because nomad is not installed", allow_module_level=True, ) +from pynxtools_stm.nomad.nomad_example_paths import EXAMPLE_PATHS + +# TODO Auto collect the example path from reader plugins. +PYNXTOOLS_READER_PLUGINS_NOMAD_EXAMPLES_PATH: dict[str, str] = { + "pynxtools-stm": EXAMPLE_PATHS +} + def get_file_parameter(example_path: str): """