Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ jobs:
# sdist separately for PyPI (model not included — source-only)
uv build --sdist

- name: Verify PyPI metadata
run: |
pip install twine --quiet
twine check dist/*

- name: Verify wheel install
run: |
python -m venv /tmp/verify-wheel
Expand Down
1 change: 1 addition & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
- [TESTS]: Rewrite `test_summary.py` for `CombinedResult` schema
- [ACTION]: Add `parse_result.py` — compute score, level, violations from `CombinedResult` JSON
- [CLI]: `--strict` exits 1 on any finding, not just errors
- [BUILD]: Remove `en-core-web-sm` direct URL dependency (rejected by PyPI). spaCy model auto-downloads on first run if missing.
- [TESTS]: Fix remaining MCP and CLI integration tests for `CombinedResult` schema — remove `score`/`level` assertions, use `files`/`stats`

### Fixed
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ dependencies = [
# hard requirement — the fallback verb lexicon drops charge accuracy
# from 96% to ~78%. With the torch blocker active, spaCy loads in ~1s.
"spacy>=3.8.11,<4",
"en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -86,9 +85,6 @@ requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.metadata]
# Required because we pin en_core_web_sm via a direct URL (spaCy models
# are distributed as GitHub release wheels, not via PyPI).
allow-direct-references = true

[tool.hatch.build.targets.wheel]
packages = ["src/reporails_cli"]
Expand Down
22 changes: 18 additions & 4 deletions src/reporails_cli/core/mapper/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2091,10 +2091,24 @@ def nlp(self) -> Any | None:
# tok.text / tok.i / root.children. That needs tok2vec +
# tagger + parser only; ner / lemmatizer / attribute_ruler
# are dead weight on both load time and per-doc inference.
self._nlp = spacy.load(
"en_core_web_sm",
disable=["ner", "lemmatizer", "attribute_ruler"],
)
try:
self._nlp = spacy.load(
"en_core_web_sm",
disable=["ner", "lemmatizer", "attribute_ruler"],
)
except OSError:
# Model not installed — download it once
import subprocess
import sys

subprocess.run(
[sys.executable, "-m", "spacy", "download", "en_core_web_sm"],
capture_output=True,
)
self._nlp = spacy.load(
"en_core_web_sm",
disable=["ner", "lemmatizer", "attribute_ruler"],
)
except (ImportError, OSError):
self._nlp = None
return self._nlp
Expand Down
10 changes: 0 additions & 10 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading