drift-check.yml: the bibliography job goes red when upstream drops a citation with its entry, though the night's refresh settles it

Abierto
#41 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github-actions, python
Área
ci-cd, tooling

Línea de trabajo

Start with .github/workflows/drift-check.yml around lines 139 and 152, then trace how tools/bib-merge --reconstruct checks citation closure and how the refresh changes the pool. Reproduce the hog_cycle case described in the issue and add a test for a citation removed alongside its bibliography entry. Done means that case no longer makes the nightly bibliography job fail, while genuine closure errors remain detectable.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Found by the review of intro's promotion for step 2 of QuantEcon/project-monorepo#24; it predates that promotion. Line numbers are at main 83f0179.

What happens. When a series removes a citation and its bibliography entry in the same commit, the night's check job runs tools/bib-merge --reconstruct (.github/workflows/drift-check.yml:139) against the pool as committed. The pool's copy of the lecture still cites the key, because the refresh has not run yet, while the merged file regenerated from the series' files no longer has it. The closure check fails, bib-merge exits 2, bib_failed is set and the bibliography job goes red (line 152). The same run's refresh opens the pull request that settles it, and the job stays red every night until that pull request merges.

Reproduced on a copy of the pool with intro promoted: with intro's two {cite} of hog_cycle removed from cobweb.md, the entry removed from intro's quant-econ.bib and intro's pin moved, bib-merge prints [closure] hog_cycle: cited by cobweb.md but not in the merged file and exits 2. After tools/promote --refresh --exclude jax and tools/bib-merge --write, it is clean.

Why it matters. A red nightly means stop and look, and step 2 of QuantEcon/project-monorepo#24 prepares each day's promotion only after a green one. Here the red asks for nothing that the refresh's pull request does not already do.

What a fix could be. Judge closure against the pool as the refresh will leave it, or report a key cited only by lectures the same run refreshes as part of that refresh rather than as a failure. Either way, with a test for the case above.

Lenguaje dominante
Python
Estrellas
1
Forks
0
Merge medio
1 d 3 h
PR fusionados (30 d)
17

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de QuantEcon/lectures

Todos los issues de QuantEcon/lectures

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.