Skip to content

use optional dependencies#177

Open
thorinaboenke wants to merge 4 commits into
developmentfrom
feature/use_optional_dependencies
Open

use optional dependencies#177
thorinaboenke wants to merge 4 commits into
developmentfrom
feature/use_optional_dependencies

Conversation

@thorinaboenke

@thorinaboenke thorinaboenke commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Task

#176

Description

  • Moves all LLM-parser dependencies (openai, tenacity, scipy, scikit-learn, tiktoken, pandas) out of core into a new llm optional extra
  • Moves dataframe backend dependencies (pandas, polars) into the dataframes optional extra
  • Update docs

One code fix needed
persistency_saver.py and persistency/init.py were eagerly importingEventDataFrame/ChunkedEventDataFrame at module level, pulling pandas into every import of the core library. Fixed with a lazy_get_backend_cls() helper

How Has This Been Tested?

Core install only (uv sync, no extras): import detectmatelibrary succeeds; import openai, import pandas, and import LogBatcherParser all raise ModuleNotFoundError
image

llm extra (uv sync --extra llm): from detectmatelibrary.parsers.logbatcher import LogBatcherParser succeeds.

image

dataframes extra (uv sync --extra dataframes): import EventDataFrame succeeds.

image

Checklist

  • This Pull-Request goes to the development branch.
  • I have successfully run prek locally.
  • I have added tests to cover my changes.
  • I have linked the issue-id to the task-description.
  • I have performed a self-review of my own code.

@thorinaboenke thorinaboenke marked this pull request as draft June 15, 2026 13:53
@thorinaboenke thorinaboenke requested a review from whotwagner June 15, 2026 13:54
@thorinaboenke thorinaboenke marked this pull request as ready for review June 17, 2026 10:55
@thorinaboenke thorinaboenke changed the base branch from main to development June 17, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant