Skip to content

Commit 2664b5e

Browse files
fix: include package data; fix test coverage (#2)
* fix: package data included * chore: uv lock update * fix: coverage * fix: fix files in coverage * fix: coverage report
1 parent 7830f07 commit 2664b5e

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
- name: Run Tests With Coverage
116116
run: |
117117
# run with coverage to not execute tests twice
118-
uv run coverage run -m pytest -v -p no:warnings --junitxml=report.xml
118+
uv run -m pytest -v -p no:warnings --junitxml=report.xml --cov=genai_monitor
119119
uv run coverage report
120120
uv run coverage xml
121121

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description = "Observability for Generative AI"
55
readme = "README.md"
66
requires-python = ">=3.10"
77
dependencies = [
8+
"setuptools>=61.0",
89
"sqlalchemy>=2.0.35",
910
"sqlalchemy-mixins>=2.0.5",
1011
"loguru>=0.7.2",
@@ -32,6 +33,12 @@ litellm = [
3233
"litellm>=1.60.2",
3334
]
3435

36+
[tool.setuptools]
37+
include-package-data = true
38+
39+
[tool.setuptools.package-data]
40+
"genai_monitor.registration" = ["data/*.json"]
41+
3542
[tool.uv]
3643
dev-dependencies = [
3744
# Development tools
@@ -54,6 +61,7 @@ dev-dependencies = [
5461
"litellm>=1.60.2",
5562
]
5663

64+
5765
[tool.ruff]
5866
exclude = [".venv"]
5967
extend-include = ["*.ipynb"]

src/genai_monitor/auto/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from genai_monitor.utils.auto_mode_configuration import load_config
99
from genai_monitor.utils.user_registration import register_user
1010

11-
config = load_config(os.getenv("GENAI_EVAL_DB_URL", "sqlite:///genai_eval.db"))
11+
config = load_config(os.getenv("GENAI_MONITOR_DB_URL", "sqlite:///genai_monitor.db"))
1212
logger.debug(f"Loaded configuration from database: {config}")
1313

1414
container = get_container()

src/genai_monitor/static/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
EMPTY_MODEL_HASH: Literal["<EMPTY>"] = "<EMPTY>"
88

99
DEFAULT_GENAI_MONITOR_CONFIG_PATH = get_absolute_path(
10-
relative_path=".genai_eval_config.yaml", relative_to=os.path.abspath(__file__)
10+
relative_path=".genai_monitor_config.yaml", relative_to=os.path.abspath(__file__)
1111
)
1212
DEFAULT_PERSISTENCY_PATH: str = ".binaries/"
1313
DEFAULT_DB_VERSION: str = "1.0.0"

src/genai_monitor/utils/auto_mode_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _get_database_version() -> str:
3636
Returns:
3737
str: The current database version.
3838
"""
39-
return os.getenv("GENAI_EVAL_DB_VERSION", DEFAULT_DB_VERSION)
39+
return os.getenv("GENAI_MONITOR_DB_VERSION", DEFAULT_DB_VERSION)
4040

4141

4242
# pylint: disable=W0102

uv.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)