Skip to content

Commit

Permalink
Refactor app
Browse files Browse the repository at this point in the history
  • Loading branch information
ka-sarthak committed Aug 14, 2024
1 parent 82d18a3 commit 77f6566
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ skip = [".github/*"]

[project.entry-points.'nomad.plugin']
polymerization_schema = "nomad_polymerization_reactions.schema_packages:polymerization"
myapp = "nomad_polymerization_reactions.apps:myapp"
polymerization_app = "nomad_polymerization_reactions.apps:polymerization"
13 changes: 7 additions & 6 deletions src/nomad_polymerization_reactions/apps/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from nomad.config.models.plugins import AppEntryPoint

from nomad_polymerization_reactions.apps.polymerization_reaction_app import (
polymerization_reaction_app,
)
from nomad_polymerization_reactions.apps import polymerization

myapp = AppEntryPoint(
polymerization = AppEntryPoint(
name='Polymerization Reactions',
description='This app allows you to search **polymerization reactions** within NOMAD. The filter menu on the left and the shown default columns are specifically designed for polymerization reaction exploration. The dashboard directly shows useful interactive statistics about the data.', # noqa: E501
app=polymerization_reaction_app,
description="""This app allows you to search **polymerization reactions** within
NOMAD. The filter menu on the left and the shown default columns are specifically
designed for polymerization reaction exploration. The dashboard directly shows
useful interactive statistics about the data.""",
app=polymerization.app,
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yaml

polymerization_reaction_app = yaml.safe_load(
app = yaml.safe_load(
"""
label: Polymerization Reaction
path: polymerization
Expand Down
4 changes: 2 additions & 2 deletions tests/apps/test_app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
def test_importing_app():
# this will raise an exception if pydantic model validation fails for th app
from nomad_polymerization_reactions.apps import polymerization_reaction_app # noqa: F401, I001
# this will raise an exception if pydantic model validation fails for the app
from nomad_polymerization_reactions.apps.polymerization import app # noqa: F401, I001

0 comments on commit 77f6566

Please sign in to comment.