ref: Make ollama an optional dependency#2
Merged
NicoHinderling merged 3 commits intogetsentry:mainfrom Mar 24, 2026
Merged
Conversation
Move ollama from hard dependency to optional [suggest] extra so the package can be installed without pulling in pydantic v2, which conflicts with projects pinned to pydantic v1 (e.g. Sentry). The check and baseline commands work without ollama. The suggest command gives a clear error with install instructions if ollama is missing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
This was referenced Mar 24, 2026
NicoHinderling
added a commit
to getsentry/sentry
that referenced
this pull request
Mar 25, 2026
*Need to re-run `uv lock` after getsentry/pypi#2009 merges and update this PR before merging* ## Summary - Add `codeowners-coverage>=0.3.0` to dev dependency group in `pyproject.toml` - Bump CI workflow from `0.2.1` to `0.3.0` v0.3.0 makes ollama an optional dependency (getsentry/codeowners-coverage#2), removing the pydantic conflict that previously blocked adding this as a dev dependency. This enables running `codeowners-coverage check` locally via `devenv sync`. ## Blockers - getsentry/pypi#2009 must merge before `uv lock` can resolve — lockfile update will follow ## Test plan - [ ] getsentry/pypi#2009 merges - [ ] `uv lock` resolves successfully - [ ] `devenv sync` installs the package - [ ] `codeowners-coverage check` runs locally - [ ] CI workflow passes with v0.3.0 --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Move
ollamafrom a hard dependency to an optional[suggest]extra so thepackage can be installed without pulling in
pydantic>=2.9, which conflictswith projects pinned to pydantic v1 (e.g. Sentry).
Only the
suggestcommand uses ollama —checkandbaselinework withoutit. When ollama is missing,
suggestraises a clear error with installinstructions.
Changes:
pyproject.toml:ollama>=0.3.0moved to[project.optional-dependencies.suggest]ollama_matcher.py: guarded import with try/except, clearImportErrormessagecli.py: lazy imports socheck/baselinenever touch ollama modulestests/test_ollama_matcher.py: mocks updated to work with or without ollama installedREADME.md+justfile: updated install instructions to document[suggest]extra