Skip to content

Releases: 686f6c61/pypi-legal-expand

legal-expand 1.5.2

15 Jun 21:50

Choose a tag to compare

legal-expand 1.5.2

Patch release de documentación y publicación.

  • Corrige los badges del README con fuentes dinámicas para PyPI, GitHub Release, CI, licencia, Python y Colab.
  • Actualiza la demo de Google Colab a legal-expand==1.5.2.
  • Actualiza DEMO.txt y CHANGELOG.md para reflejar la versión publicada.
  • Mantiene intacta la API de 1.5.1 y el comportamiento del asistente BOE.
  • Actualiza los smoke checks de CI/publicación a 1.5.2.

Verificado antes de publicar:

  • 129 tests pasados con cobertura global 94.83% y umbral mínimo del 90%.
  • Bandit sin issues accionables.
  • Build wheel/sdist, twine check y smoke install desde wheel: OK.

legal-expand 1.5.1

15 Jun 21:38

Choose a tag to compare

Patch release de robustez y publicacion.

  • Sube la cobertura real con pruebas deterministas de BOE, CLI, documentos, normalizador, serializacion, cache, parsers JSON/XML y errores de red simulados.
  • Fija gate de cobertura del 90% en pyproject, CI y workflow de publicacion.
  • Actualiza README, CHANGELOG, DEMO.txt y Google Colab a legal-expand==1.5.1.
  • Validacion local: 129 tests, cobertura global 94.83%, BOE 96%, CLI 97%, Bandit OK, build/twine/smoke OK y SonarQube Quality Gate OK con 0 issues abiertos.

legal-expand 1.5.0

15 Jun 21:17

Choose a tag to compare

legal-expand 1.5.0

Release centrada en convertir BOE en un flujo de revisión más claro y demostrable.

Añadido

  • Revisión BOE explicada con revisar_boe() y secciones resolved, manual, review-required y unsupported.
  • Nuevas salidas CLI: review-json, html y paragraphs.
  • Plantilla editable de overrides con --overrides-template y boe_overrides_template().
  • Informes HTML y por párrafos para demos, Colab y herramientas internas.

Calidad

  • README, Colab, DEMO y changelog actualizados para 1.5.0.
  • 115 tests locales pasados.
  • SonarQube Docker local: Quality Gate OK, 0 issues abiertos, cobertura nueva 81.4%, duplicación nueva 0.0% y violaciones nuevas 0.
  • Wheel/sdist verificados con twine check y smoke install desde wheel.

legal-expand 1.4.1

15 Jun 19:23

Choose a tag to compare

legal-expand 1.4.1

Release de mantenimiento sobre 1.4.0. No cambia la API pública ni el comportamiento esperado del detector BOE.

Cambiado

  • Refactor interno del detector BOE para reducir complejidad ciclomática.
  • Dispatch del CLI simplificado mediante tabla de comandos.
  • Matcher reorganizado con objetos internos para metadata del índice y resolución de matches.
  • Demo de Google Colab actualizada a legal-expand==1.4.1.
  • DEMO.txt rehecho como guía actual de Colab, CLI, Python, BOE, overrides y validación de calidad.
  • Configuración Sonar actualizada a 1.4.1 y organización 686f6c61.

Corregido

  • Documentación de verificación alineada con la suite actual de 107 tests.

Verificado

  • Ruff general y perfil estricto de smells sobre src/legal_expand: OK.
  • mypy: OK.
  • Bandit: sin issues identificados.
  • pytest con cobertura: 107 tests pasados.
  • compileall, build wheel/sdist y smoke install desde wheel: OK.
  • GitHub CI en Python 3.9 a 3.14: OK.

Nota Sonar

SonarScanner conecta con SonarQube Cloud, pero el análisis remoto requiere que exista el proyecto o que se configure SONAR_TOKEN; el servidor devuelve Project not found antes de ejecutar el análisis.

legal-expand 1.4.0

15 Jun 15:24

Choose a tag to compare

legal-expand 1.4.0

Añadido

  • Asistente BOE opt-in con detectar_referencias_boe() y enriquecer_boe() para localizar referencias legales españolas sin modificar el texto original.
  • Subcomando legal-expand boe con salida Markdown o JSON, modo offline por defecto y modos cache-first/online para consultar la API de legislación consolidada del BOE cuando se solicite.
  • Tipos públicos BOEOptions, BOENorm, BOEUnitBlock, BOEReference, BOEEnrichmentStats y BOEEnrichmentOutput.
  • Resolución conservadora de referencias frecuentes como art. 217 LEC, artículo 24 de la Constitución Española, art. 14.2 de la Ley 39/2015, Ley Orgánica 3/2018, Real Decreto 203/2021, anexos y disposiciones.
  • Soporte de formas abreviadas frecuentes como RD 203/2021, LO 3/2018, disp. final séptima, artículos con subletra (art. 14.2.a)) y artículos con sufijo (artículo 14 bis).
  • Overrides manuales en JSON para añadir aliases o referencias que el detector no pueda resolver con seguridad, marcadas como manual en el informe.
  • Demo de Google Colab actualizada a legal-expand==1.4.0, con sección BOE, matriz de 25 casos, CLI legal-expand boe y ejemplo de overrides manuales.

Seguridad del comportamiento

  • El enriquecimiento BOE no se mezcla con expandir_siglas() y no consulta red salvo que se use el subcomando/API BOE.
  • Ley 2/2023 sin fecha ni título se marca como ambigua para evitar resolver una norma incorrecta.
  • Las referencias dentro de URLs, emails, bloques de código y código inline se ignoran.
  • La normativa UE, incluido RGPD, se marca como no soportada por esta función, en lugar de intentar resolverla como BOE.

Verificado

  • Matriz de 25 casos de uso y edge cases.
  • Suite local: 107 passed.
  • Bandit: sin issues identificados.
  • Build wheel/sdist y smoke install desde wheel, incluyendo import, detector BOE y CLI legal-expand boe.

v1.3.1 - Colab demo refresh

15 Jun 09:09

Choose a tag to compare

Patch release focused on the Google Colab demo and publication metadata.\n\nHighlights:\n- Colab notebook updated for legal-expand==1.3.1.\n- Demo now walks through CLI, audit, glossary export, batch document processing, HTML-safe expansion, custom dictionaries, global config and benchmark.\n- README and notebook badges use shields.io so the PyPI version badge reflects the published version clearly.\n- CI and publish wheel smoke tests now assert 1.3.1.\n\nValidated before release: pytest, ruff, mypy, pyright, bandit, pip-audit, notebook smoke test, CLI smoke test, build, twine check and wheel install smoke test.

v1.3.0 - CLI, audit and batch release

14 Jun 21:47

Choose a tag to compare

Release 1.3.0 for legal-expand.\n\nHighlights:\n- Official legal-expand CLI with expand, audit, glossary, batch, info and benchmark commands.\n- Audit, extraction, glossary export and batch document processing.\n- Custom JSON/CSV dictionaries and HTML-safe document expansion.\n- Typed package marker, stronger tests, SonarQube config and PyPI Trusted Publishing workflow.\n\nValidated before release: pytest, ruff, mypy, pyright, bandit, pip-audit, build/twine, wheel smoke test, SonarQube quality gate OK.

v1.0.0 - Initial Release

18 Dec 23:48

Choose a tag to compare

legal-expand v1.0.0

First stable release of the Python package for expanding Spanish legal acronyms.

Features

  • 646 verified legal acronyms from official sources (RAE, BOE, DPEJ)
  • 3 output formats: plain text, HTML with <abbr> tags, structured JSON
  • Global configuration: enable/disable, default options, force expansion
  • Advanced options: expand only first occurrence, exclude/include specific acronyms
  • Context protection: URLs, emails, code blocks are preserved
  • Extensible formatters: register custom formatters via FormatterFactory
  • Zero runtime dependencies
  • Python 3.9+ compatible

Installation

```bash
pip install legal-expand
```

Quick Example

```python
from legal_expand import expandir_siglas

text = 'La AEAT notifica el IVA'
result = expandir_siglas(text)

'La AEAT (Agencia Estatal de Administración Tributaria) notifica el IVA (Impuesto sobre el Valor Añadido)'

```

Resources