Skip to content

Commit

Permalink
export fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Darshan808 committed Jan 11, 2025
1 parent 74eea6c commit 9f94617
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jupyter_server_nbmodel/event_logger.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from jupyter_events import EventLogger
import pathlib

JUPYTER_SERVER_EVENTS_URI = "https://events.jupyter.org/jupyter_server_nbmodel"
DEFAULT_EVENTS_SCHEMA_PATH = pathlib.Path(__file__).parent / "event_schemas"
_JUPYTER_SERVER_EVENTS_URI = "https://events.jupyter.org/jupyter_server_nbmodel"
_DEFAULT_EVENTS_SCHEMA_PATH = pathlib.Path(__file__).parent / "event_schemas"

class _EventLogger:
_event_logger = None
Expand All @@ -16,8 +16,8 @@ def init_event_logger(cls) -> EventLogger:
"https://events.jupyter.org/jupyter_server_nbmodel/cell_execution/v1",
]
for schema_id in schema_ids:
rel_schema_path = schema_id.replace(JUPYTER_SERVER_EVENTS_URI + "/", "") + ".yaml"
schema_path = DEFAULT_EVENTS_SCHEMA_PATH / rel_schema_path
rel_schema_path = schema_id.replace(_JUPYTER_SERVER_EVENTS_URI + "/", "") + ".yaml"
schema_path = _DEFAULT_EVENTS_SCHEMA_PATH / rel_schema_path
cls._event_logger.register_event_schema(schema_path)
return cls._event_logger

Expand Down

0 comments on commit 9f94617

Please sign in to comment.