feat: filtros, nombre/apellido, tests, CI/CD, README - #16
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agrega dos computed fields a Persona usando la librería nameparser: - nombre_pila: primer nombre de la persona física - apellido: apellido de la persona física - None para personas jurídicas (tipo_persona != "física") Agrega nameparser>=1.1 como dependencia del proyecto. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ding (closes #6) Tests unitarios (sin red): - TestExtraerTipoPersona: parsea Física/Jurídica del HTML directamente - TestParsearFiltros: mapeo correcto de facetas a parámetros fN[] - TestPersona: dni, nombre_pila, apellido - TestSopita: extracción de texto HTML Tests de integración (cassettes VCR, correr con --disable-recording para live): - search básico, campos de Persona, paginación con Busqueda.siguiente() - filtro persona:juridica, búsqueda por CUIT Otros cambios: - _tipo_persona_desde_cuit reemplazado por _extraer_tipo_persona (parsea HTML) - _parsear_filtros actualizado: cada faceta mapea a su fN[] correcto (f1-f6) - _FACETA_A_PARAM: iva→f1, monotributo→f2, ganancias→f3, empleador→f4, persona→f5, nacionalidad→f6 - Agrega User-Agent header para evitar 403 del sitio - pytest config: --record-mode=none --block-network por defecto Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rser Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
El sitio usa f0[]=ganancias:... según los cassettes grabados. Confirmado por Codex review #r3215724755. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- setup-uv@v7, python-version por matrix - uv sync --group dev + uv run pytest con cassettes - schedule semanal (lunes 9 UTC) con --disable-recording contra el sitio real - lint se omite en cron Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… de tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ead8c0708
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| run: uv run pytest | ||
| - name: Tests contra el sitio real (sanidad semanal) | ||
| if: github.event_name == 'schedule' | ||
| run: uv run pytest --disable-recording |
There was a problem hiding this comment.
Allow network in scheduled tests
In the scheduled workflow this command still inherits addopts = "--record-mode=none --block-network" from pyproject.toml. pytest-recording says --disable-recording disables VCR integration, while global --block-network blocks socket access except when VCR recording is enabled for marked tests, so the weekly “sitio real” job will fail with network disabled before it can reach cuitonline.com. Override/drop --block-network for this path, or run with a recording mode that permits live requests.
Useful? React with 👍 / 👎.
Consolida todos los cambios pendientes en main. Los PRs #11–#15 mergearon entre sí correctamente pero el cambio de base a main no fue automático.
Cambios incluidos
chore: sacauv.lockdel repo (librería, no aplicación)feat:nombre_pilayapellidocomo campos opcionales (requierepip install cuitonline[nombres])feat: suite pytest con cassettes VCR (unit + integración)fix:gananciasusaf0[], nof3[]ci: pytest con matrix 3.12–3.15, cron semanal contra el sitio realci: CD viauv publishenrelease: publisheddocs: README en rioplatense, badge PyPI, tabla de filtros, instrucciones de testsCloses #1 #3 #6