Skip to content

Commit

Permalink
fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubelMozumder committed Dec 19, 2024
1 parent 6437590 commit 3e0f400
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 47 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies = [
[project.optional-dependencies]
dev = [
"mypy",
"ruff>=0.6",
"ruff>=0.8.3",
"pytest",
"pip-tools",
]
Expand Down
24 changes: 3 additions & 21 deletions src/pynxtools_spm/nomad/entrypoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@

from nomad.config.models.plugins import ExampleUploadEntryPoint

# sts_default_example = ExampleUploadEntryPoint(
# title="Scanning Tunneling Spectroscopy (STS)",
# category="FAIRmat Examples",
# description="""This example (with default configuration) presents the capabilities of the NOMAD platform to store standardized Scanning Tunneling Spectroscopy (sts) data.""",
# plugin_package="pynxtools_spm",
# resources=["nomad/examples/sts/STSDefaultExample/*"],
# )

sts_example_with_customization = ExampleUploadEntryPoint(
title="Scanning Tunneling Spectroscopy (STS)",
category="FAIRmat Examples",
Expand All @@ -34,13 +28,7 @@
resources=["nomad/examples/sts/STSExampleWithCustomization/*"],
)

# stm_default_example = ExampleUploadEntryPoint(
# title="Scanning Tunneling Microscopy (STM)",
# category="FAIRmat Examples",
# description="""This example (with default configuration) presents the capabilities of the NOMAD platform to store standardized Scanning Tunneling Microscopy (stm) data.""",
# plugin_package="pynxtools_spm",
# resources=["nomad/examples/stm/STMDefaultExample/*"],
# )

stm_example_with_customization = ExampleUploadEntryPoint(
title="Scanning Tunneling Microscopy (STM)",
category="FAIRmat Examples",
Expand All @@ -49,13 +37,7 @@
resources=["nomad/examples/stm/STMExampleWithCustomization/*"],
)

# afm_default_example = ExampleUploadEntryPoint(
# title="Atomic Force Microscopy (AFM)",
# category="FAIRmat Examples",
# description="""This example (with default configuration) presents the capabilities of the NOMAD platform to store standardized Atomic Force Microscopy (afm) data.""",
# plugin_package="pynxtools_spm",
# resources=["nomad/examples/afm/AFMDefaultExample/*"],
# )

afm_example_with_customization = ExampleUploadEntryPoint(
title="Atomic Force Microscopy (AFM)",
category="FAIRmat Examples",
Expand Down
26 changes: 1 addition & 25 deletions tests/test_nomad_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,22 @@
)

from pynxtools_spm.nomad.entrypoints import (
sts_default_example,
sts_example_with_customization,
stm_default_example,
stm_example_with_customization,
afm_default_example,
afm_example_with_customization,
)

from pynxtools_spm.nomad.nomad_example_paths import (
STS_DEFAULT_CONF_EXAMPLE_PATH,
STS_CUSTOMIZED_EXAMPLE_PATH,
STM_DEFAULT_CONF_EXAMPLE_PATH,
STM_CUSTOMIZED_EXAMPLE_PATH,
AFM_DEFAULT_CONF_EXAMPLE_PATH,
AFM_CUSTOMIZED_EXAMPLE_PATH,
)


@pytest.mark.parametrize(
"mainfile",
list(get_file_parameter(STS_DEFAULT_CONF_EXAMPLE_PATH))
+ list(get_file_parameter(STS_CUSTOMIZED_EXAMPLE_PATH))
+ list(get_file_parameter(STM_DEFAULT_CONF_EXAMPLE_PATH))
list(get_file_parameter(STS_CUSTOMIZED_EXAMPLE_PATH))
+ list(get_file_parameter(STM_CUSTOMIZED_EXAMPLE_PATH))
+ list(get_file_parameter(AFM_DEFAULT_CONF_EXAMPLE_PATH))
+ list(get_file_parameter(AFM_CUSTOMIZED_EXAMPLE_PATH)),
)
def test_parse_nomad_examples(mainfile):
Expand All @@ -71,31 +62,16 @@ def test_parse_nomad_examples(mainfile):
@pytest.mark.parametrize(
("entrypoint", "example_path"),
[
pytest.param(
sts_default_example,
STS_DEFAULT_CONF_EXAMPLE_PATH,
id="sts_default_example",
),
pytest.param(
sts_example_with_customization,
STS_CUSTOMIZED_EXAMPLE_PATH,
id="sts_example_with_customization",
),
pytest.param(
stm_default_example,
STM_DEFAULT_CONF_EXAMPLE_PATH,
id="stm_default_example",
),
pytest.param(
stm_example_with_customization,
STM_CUSTOMIZED_EXAMPLE_PATH,
id="stm_example_with_customization",
),
pytest.param(
afm_default_example,
AFM_DEFAULT_CONF_EXAMPLE_PATH,
id="afm_default_example",
),
pytest.param(
afm_example_with_customization,
AFM_CUSTOMIZED_EXAMPLE_PATH,
Expand Down

0 comments on commit 3e0f400

Please sign in to comment.