Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Install dependencies
run: |
pip install -U pip # upgrade pip
pip install '.[develop]'
pip install '.[develop]' './lstm_ewts'
- name: Echo dependency versions
run: |
pip freeze
Expand Down
2 changes: 1 addition & 1 deletion lstm/bmi_lstm.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

from . import nextgen_cuda_lstm
from .base import BmiBase
from .logger import configure_logging, MODULE_NAME
from lstm_ewts import configure_logging, MODULE_NAME
from .model_state import State, StateFacade, Var

import logging
Expand Down
230 changes: 0 additions & 230 deletions lstm/logger.py

This file was deleted.

13 changes: 13 additions & 0 deletions lstm_ewts/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[build-system]
requires = ["setuptools>=70"]
build-backend = "setuptools.build_meta"

[project]
name = "lstm-ewts"
version = "0.1.0"
description = "EWTS helper package for LSTM"
requires-python = ">=3.8"

[tool.setuptools.packages.find]
where = ["src"]
include = ["lstm_ewts*"]
34 changes: 34 additions & 0 deletions lstm_ewts/src/lstm_ewts/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
Error Warning and Trapping System (EWTS) Package API

This package provides a centralized, named logging configuration for the
Error, Warning, and Trapping System used throughout the codebase.

EWTS configures a single, shared logger in the Python logging framework,
identified by a fixed module name. All modules that participate in EWTS
logging retrieve this logger by name via the standard logging API.

Logging configuration should be performed once at application startup by
calling configure_logging(). The configuration function is idempotent:
subsequent calls have no effect and will not reconfigure handlers or levels.

The logger name is exposed to allow any module to obtain the configured
logger without importing internal implementation details.

Typical usage:

At application startup:
from lstm_ewts import configure_logging
configure_logging()

Within other modules:
import logging
from lstm_ewts import MODULE_NAME

LOG = logging.getLogger(MODULE_NAME)
"""

from .constants import MODULE_NAME
from .config import configure_logging

__all__ = ["MODULE_NAME", "configure_logging"]
Loading