This commit removes several existing image files
and re-adds them. This is likely due to some
process that needed to be run over all images,
or that they were unintentionally removed
before.
Updates image validation script to include autofix
functionality to address format mismatches.
Creates a script that extracts section headers from .qmd files,
outputting them in a formatted table showing filename, header level,
and header text. It supports processing either a single file or all
.qmd files within a directory.
Adds a pre-commit hook to validate image files.
This ensures that images are not corrupted and have the correct format.
Also, renames several png images to jpg or gif and updates references in the qmd files.
Ensures consistency between section IDs in QMD files and corresponding references in quiz JSON files. The script now automatically updates these references when section IDs change, maintaining synchronization between content and assessments.
Improves quiz question quality and relevance by providing the LLM with contextual information about the textbook structure and chapter progression.
- Introduces dynamic book outline generation from `_quarto.yml`, enabling the LLM to understand chapter dependencies and progression.
- Enhances the prompt with chapter context, difficulty guidelines, and previous quiz data.
- Implements real-time progress tracking for parallel quiz generation, providing better visibility into the process.
- Adds thread safety measures to prevent conflicts during book outline generation.
Adds a script that uses the GitHub CLI to delete all but the most recent GitHub Actions workflow run.
This helps to keep the number of runs manageable and avoid exceeding storage limits.
Replaces the manual package extraction script with an automated tool.
This tool analyzes project files, extracts LaTeX package dependencies,
and generates a list of required TeX Live packages and collections.
It improves maintainability and ensures all necessary packages are
installed. The pre-commit configuration is updated to run this tool
automatically before committing changes.
Implements a script that analyzes Quarto projects to
automatically extract LaTeX package dependencies. The script
parses both TEX header files and Quarto YAML configurations
to identify required TeX Live packages and collections. It then
uses `tlmgr` to map LaTeX package names to their corresponding
TeX Live packages, streamlining the dependency installation
process for building Quarto projects.
Adds functionality to count the number of quiz answer sections
within a QMD file during the cleaning process. This allows for
more comprehensive analysis of the file's structure, especially
when using the dry-run option.
Updates the quiz cleaning process to retain the 'quiz'
key in the frontmatter, but removes associated content
from the body of the document. This ensures the Lua
filter continues to function while preventing the
insertion of quiz content.
Refactors the blank line collapsing logic from a bash command to a dedicated python script.
This change improves cross-platform compatibility, particularly addressing issues with sed implementations on different operating systems. It also enhances code readability and maintainability by using a python script.
Adds a comprehensive requirements file and a scripts README
documenting dependencies, pre-commit setup, and project structure.
This enhancement streamlines project setup and ensures consistent
dependency management, improving maintainability and collaboration.
The section label type is removed from the list of label types to be checked for unreferenced labels.
This is likely due to a change in how section labels are handled or a decision to exclude them from this particular check.
Skips 'Self-Check Answers' sections when extracting sections.
Implements a more robust insertion strategy for quizzes. It now collects all insertion points, sorts them in reverse order, and then performs the insertions. This prevents line number shifts from affecting subsequent insertions, ensuring quizzes are inserted at the correct locations.
Ensures that only non-empty answer blocks are added to the final output.
Corrects an issue in `find_safe_insertion_points` where header parsing
could be bypassed within code or div blocks, leading to incorrect
insertion points. This change ensures that header parsing only occurs
outside of code and div blocks, preventing premature breaking of the
insertion point search.
Deletes the compiled Python cache file for the quizzes module.
This ensures that the latest version of the code is always used,
preventing potential issues related to outdated bytecode.
Updates the section header for quiz answers to "Self-Check Answers" across multiple core content files.
This change aims to better reflect the intended purpose of these sections as self-assessment tools for learners.
Disables most of the book's chapter entries in `_quarto.yml`.
Renames "Quiz Answers" section to "Self-Check Answers" in the quiz generation script.
This change improves code readability and maintainability by using a consistent naming convention.
WIP on 874-part-title
Improves user experience by adding keyboard shortcuts for common actions within the quiz editor interface.
The shortcuts include navigation (previous/next), saving, regenerating, and toggling the first five checkboxes. A markdown element was added to inform the user of the available shortcuts.
Added "Part" label before part number in TOC with custom spacing and color.
Also updated styles of custom callout blocks to visually distinguish them from Quarto defaults.
Enhances section ID generation by incorporating content hashing for improved stability and accuracy.
This change ensures that IDs are content-aware, preventing unnecessary ID changes across multiple repair runs if the actual content remains the same.
Additionally, it introduces smart block detection to automatically ignore headers inside code blocks, divs, and callouts, preventing incorrect processing of documentation examples and code comments.
Refactors header processing logic to correctly identify headers by introducing block tracking.
This change fixes an issue where headers within code blocks or div blocks were being incorrectly processed, leading to inaccurate section ID management.
The solution involves introducing functions to track the state of 'inside_skip_div' and 'inside_code_block' to prevent header processing within these blocks, ensuring that only valid headers are processed.
Allows the 'insert' mode to process all quiz JSON files within a specified directory, streamlining the quiz insertion process.
Ensures proper formatting of the "Quiz Answers" section by stripping trailing whitespace and adding a consistent number of newlines.
Enhances the formatting of FILL-type question answers by extracting the key word before the first period and displaying it prominently.
Adds logic to handle cases where no period exists.
Prioritizes .qmd file order in quiz generation based on the
`_quarto.yml` file's chapters section, if present. This ensures
quizzes are generated in the intended order, enhancing content
consistency. Falls back to default file order when `_quarto.yml`
is absent. Includes improvements to MCQ formatting and learning objective output.
Refactors the handling of quiz file references in QMD/MD files. Instead of relying on a dedicated function to find the quiz file, it now directly extracts the quiz file name from the 'quiz:' variable in the YAML frontmatter.
This change also adds more robust error handling, including checks for:
- The existence of the 'quiz:' variable in the frontmatter.
- The existence of the specified quiz file.
- General file reading errors.
These improvements provide clearer error messages to the user in case of misconfiguration.
Updates the quiz and answer formatting to improve
readability and consistency by adding/removing blank lines
around callout blocks.
Also, concatenates answer blocks with single newlines instead of
double newlines to prevent extra spacing.
Updates the section extraction logic to ignore level 2 headers (##) that appear within Quarto blocks.
The prior regex-based approach was unable to reliably determine section boundaries in the presence of Quarto syntax.
This change iterates through lines and keeps track of whether the current line resides inside any of the Quarto blocks (":::", "::::", "```", "---").
Only when outside these blocks does it process a "##" line as a potential header.
Refines the quiz generation process with improved instructions and clearer guidelines for the AI model to create more effective and relevant quiz questions.
Improves YAML parsing for quiz metadata extraction to provide more robustness.
Enhances output file naming and path management to streamline quiz generation workflow.
Also ensures a line break after frontmatter to resolve formatting issues in QMD files.
Improves the quiz generation script with enhanced question quality guidelines, chapter-level coherence checks, and GUI enhancements.
These updates ensure better quiz question variety and alignment with chapter content, reduces question redundancy, and improves the overall user experience during review and editing, by adding functionality to pass previous quiz data to the generation process to avoid redundancy.
Implements a comprehensive tool for generating, managing, and
maintaining quiz questions for a machine learning systems textbook.
This includes functionality for AI-powered quiz generation, a GUI for
reviewing/editing, quiz insertion/removal, and file verification.
Improves quiz generation by adding chapter context and difficulty progression, and by providing clearer guidance and anti-patterns to avoid.
Refactors quiz cleaning to correctly remove quiz-related content and metadata.
Adds utility functions to find corresponding quiz/qmd files, and extract chapter info.
Ensures that headers with the class {.unnumbered} are skipped during section ID verification, aligning with the script's intended behavior.
This prevents false positives and improves the accuracy of the verification process.
Updates section IDs in qmd files to ensure consistent internal linking and navigation across the document.
Removes IDs from unnumbered headers to prevent conflicts and improve document structure.