Conversation
Crea una página que integra y explica cuatro gráficas estadísticas sobre las reformas constitucionales (generadas por scripts/generar_graficos.py): reformas por presidencia, artículos modificados por presidencia, líneas nuevas o modificadas por presidencia y veces que se ha reformado cada artículo. Se incrustan los SVG de html/graficos/ mediante la directiva '.. image::'.
La página estadisticas.html comparte la regla 'main > section { display:
none }' que oculta por defecto las secciones del visor de artículos de
la portada. Se añade una excepción 'main#estadisticas > section' (análoga
a la existente 'main#acerca-de') para que se muestren las secciones con
las gráficas y sus explicaciones.
Script Python (sin dependencias) que genera, en html/graficos/, cuatro gráficas de barras horizontales en formato SVG a partir del historial de commits de reformas de la CPEUM: - reformas_por_presidente.svg: cuántas reformas por presidencia. - articulos_por_presidente.svg: artículos modificados por presidencia. - lineas_por_presidente.svg: líneas nuevas o modificadas por presidencia. - reformas_por_articulo.svg: cuántas veces se ha reformado cada artículo. Extrae el presidente del cuerpo del commit, los artículos modificados de los archivos .rst tocados, y las líneas de 'git show --numstat'. Se regenera en el build (html/ está en .gitignore).
Añade un enlace 'Estadisticas' a estadisticas.html en el menú del banner, junto a Decretos y Acerca de.
Añade en el banner de las páginas de reformas (html/decretos/) un enlace 'Estadísticas' a ../estadisticas.html, junto a Decretos y Acerca de.
En el flujo local: compila la página de estadísticas y ejecuta scripts/generar_graficos.py para generar los SVG en html/graficos/.
… build En el job de build, compila estadisticas.rst, ejecuta scripts/generar_graficos.py para generar los SVG, y valida html/estadisticas.html con tidy.
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.
No description provided.