Skip to content
This repository was archived by the owner on Jul 18, 2026. It is now read-only.

feat: filtros, nombre/apellido, tests, CI/CD, README - #16

Merged
mgaitan merged 10 commits into
mainfrom
feat/readme
May 11, 2026
Merged

feat: filtros, nombre/apellido, tests, CI/CD, README#16
mgaitan merged 10 commits into
mainfrom
feat/readme

Conversation

@mgaitan

@mgaitan mgaitan commented May 11, 2026

Copy link
Copy Markdown
Owner

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: saca uv.lock del repo (librería, no aplicación)
  • feat: nombre_pila y apellido como campos opcionales (requiere pip install cuitonline[nombres])
  • feat: suite pytest con cassettes VCR (unit + integración)
  • fix: ganancias usa f0[], no f3[]
  • ci: pytest con matrix 3.12–3.15, cron semanal contra el sitio real
  • ci: CD via uv publish en release: published
  • docs: README en rioplatense, badge PyPI, tabla de filtros, instrucciones de tests

Closes #1 #3 #6

Martín Gaitán and others added 10 commits May 11, 2026 09:00
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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .github/workflows/ci.yml
run: uv run pytest
- name: Tests contra el sitio real (sanidad semanal)
if: github.event_name == 'schedule'
run: uv run pytest --disable-recording

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@mgaitan
mgaitan merged commit effd6cb into main May 11, 2026
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separar nombre / apellido

1 participant