Skip to content

LimaAnalyzer: analysis handlers from the configuration - #48

Merged
kleag merged 1 commit into
masterfrom
handlers-from-config
Nov 28, 2026
Merged

kleag merged 1 commit into
masterfrom
handlers-from-config

Conversation

@kleag

@kleag kleag commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

The lima-python side of aymara/lima#247 (aymara/lima#3), the same change as LIMA's client copy of LimaAnalyzer.

  • What changes: instead of five hard-coded handlers, an analysis (analyzeText, and operator() for Docs) gets:
    • the handlers its pipeline's dumpers need, created from the LIMA configuration on first use (pipelineHandlers and createAnalysisHandler);
    • simpleStreamHandler, whose output is still analyzeText's result;
    • the handlers of units added with addPipelineUnit, which are not in the configuration (e.g. the documented conllDumper added to the empty pipeline).
  • Discarded outputs: handlers whose output is not used write to a discarding stream, a stream without buffer. SBowDocumentWriter does not check for a null stream.

Testing

  • LIMA's copy: the same patch, built locally; LIMA's 21 LimaAnalyzerTest tests pass with it.
  • This copy: not built locally. This PR's CI is the first build: its wait job waits for LIMA's master image build, which started after #247's merge.
  • Windows and macOS: those wheels need a LIMA release containing #247 (at the next aymara release).

🤖 Generated with Claude Code

Instead of five hard-coded handlers, an analysis gets the handlers its
pipeline's dumpers need (PipelineHandlers.h of aymara/lima#247), created
from the configuration on first use, simpleStreamHandler (whose output is
analyzeText's result) and the handlers of the units added by
addPipelineUnit. The handlers whose output is not used write to a
discarding stream. Kept in sync with LIMA's client copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 medium

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
BestPractice 1 medium

View in Codacy

🟢 Metrics 10 complexity · 0 duplication

Metric Results
Complexity 10
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@kleag
kleag merged commit c1d2ce4 into master Nov 28, 2026
13 of 14 checks passed
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