Skip to content
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ mimic*.db
# Configuration files
config.json
*config*.json
m3_pipeline.json

# Operating System specific files
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
hooks:
- id: pytest
name: pytest
entry: pytest
entry: uv run pytest
language: system # Assumes pytest is installed in your environment (via pip install .[dev])
types: [python] # Run on changes to Python files
pass_filenames: false # Pytest typically runs on the whole suite
Expand Down
Empty file added py.typed
Empty file.
49 changes: 45 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ maintainers = [
{ name = "Rafi Al Attrach", email = "[email protected]" },
{ name = "Pedro Moreira", email = "[email protected]" },
{ name = "Rajna Fani", email = "[email protected]" },
{name = "Provost Simon", email = "[email protected]" },
]
readme = "README.md"
license = "MIT"
Expand Down Expand Up @@ -50,21 +51,27 @@ dependencies = [
"cryptography>=41.0.0", # Cryptographic operations for JWT
"python-jose[cryptography]>=3.3.0", # Additional JWT support with crypto
"httpx>=0.24.0", # Modern HTTP client for OAuth2 token validation
"pyaml>=25.7.0",
"beartype>=0.21.0",
"thefuzz>=0.22.1",
"rich-pyfiglet>=0.1.4",
"click==8.1.8",
]

[project.dependency-groups]
[dependency-groups]
dev = [
"ruff>=0.4.0",
"pre-commit>=3.0.0",
"pytest>=7.4.0",
"pytest-asyncio>=0.23.0",
"pytest-mock>=3.10.0",
"aiohttp>=3.8.0", # For MCP client testing
"aiohttp>=3.8.0",
"pytest-cov>=6.2.1",
]

[project.scripts]
m3 = "m3.cli:app"
m3-mcp-server = "m3.mcp_server:main"
m3 = "m3.cli:main_cli"
m3-mcp-server = "m3.core.__main__:main"

[project.urls]
Homepage = "https://github.com/rafiattrach/m3"
Expand All @@ -90,6 +97,8 @@ select = [
"I", # isort (import sorting)
"UP", # pyupgrade (modernize syntax)
"RUF",# Ruff-specific rules
"B", # flake8-bugbear
"C4", # simplify comprehensions
]

ignore = [
Expand All @@ -109,3 +118,35 @@ asyncio_default_fixture_loop_scope = "function"
filterwarnings = [
"ignore::DeprecationWarning:jupyter_client.*",
]

[tool.coverage.paths]
source = [
"src/m3",
]

[tool.coverage.run]
branch = true
omit = [
"src/m3/**/base.py",
"src/m3/**/__init__.py",
"src/m3/**/configurations/*.yaml",
"tests/**",
]

[tool.coverage.report]
exclude_also = [
"def __repr__",
"if self\\.debug",

"raise AssertionError",
"raise NotImplementedError",

"if 0:",
"if __name__ == .__main__.:",

"@(abc\\.)?abstractmethod",
]
ignore_errors = true

[tool.coverage.html]
directory = "coverage_html_report"
32 changes: 28 additions & 4 deletions src/m3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
"""
MIMIC-IV + MCP + Models (M3): Local MIMIC-IV querying with LLMs via Model Context Protocol
"""

__version__ = "0.2.0"

from .cli import M3CLI
from .core.config import M3Config
from .core.utils.exceptions import (
AuthenticationError,
M3BuildError,
M3ConfigError,
M3Error,
M3InitializationError,
M3PresetError,
M3ValidationError,
TokenValidationError,
)
from .m3 import M3

__all__ = [
"M3",
"M3CLI",
"AuthenticationError",
"M3BuildError",
"M3Config",
"M3ConfigError",
"M3Error",
"M3InitializationError",
"M3PresetError",
"M3ValidationError",
"TokenValidationError",
]
Loading