Permitir sobrescribir has_exam desde subject_overrides#1160
Merged
Conversation
The scraper detects that a subject has an exam in two ways: normally, Bedelias lists the exam itself in the prerequisites system (with its own prerequisites); as a fallback, the scraper also infers it when another subject lists that subject's exam as a prerequisite. `1511 - SISTEMAS OPERATIVOS` is inactive, so Bedelias does not list its prerequisites and the normal path never fires. Its exam was only known through the fallback, via `1537 - SISTEMAS OPERATIVOS` needing `1511`'s exam. When `1537` switched that prerequisite from the exam to an `all` over `1511`, the fallback stopped firing too, so `scraped_subjects.yml` now reports `has_exam: false`. Loading the yml then raised "Subject 1511 no longer has an exam" because the previously-created exam still existed. Let `subject_overrides.yml` override `has_exam` (falling back to the scraped value when absent) and force `has_exam: true` for `1511`, which is robust to the scraper regenerating the value as false.
santiagorodriguez96
force-pushed
the
sr--override-subject-has-exam
branch
from
July 13, 2026 19:10
ebf34d4 to
787f30a
Compare
RenzoMinelli
approved these changes
Jul 13, 2026
This was referenced Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivación
Al correr la tarea
load_yamlestábamos obteniendo el siguiente error:Causa
El scraper detecta que una materia tiene examen de dos formas: normalmente, Bedelías lista el examen como una entrada propia dentro del sistema de previaturas (con sus propias previaturas); o como fallback, si la materia no aparece en la lista, cuando otra materia declara el examen de esa materia como previatura.
1511 - SISTEMAS OPERATIVOSestá inactiva, por lo que Bedelías no lista sus previaturas y el camino normal nunca se ejecuta. Su examen solo se conocía a través del fallback, gracias a que1537 - SISTEMAS OPERATIVOSnecesitaba el examen de1511. Cuando1537cambió esa previatura del examen a unallsobre1511, el fallback también dejó de aplicar, por lo quescraped_subjects.ymlahora reportahas_exam: false.Como el examen creado previamente seguía existiendo en la base, la carga levantaba el error
Subject 1511 no longer has an exam.Solución
Agregamos soporte para sobrescribir
has_examdesdesubject_overrides.yml.El loader ahora toma el valor del override cuando está presente y, si no, cae al valor scrapeado:
Y forzamos
has_exam: truepara1511endb/data/computacion/1997/subject_overrides.yml. Como el archivo de overrides no lo genera el scraper, esto es robusto ante que el scraper vuelva a generar el valor comofalse.