Add compilation, CLI, log parser, health checks, and module refactor#15
Merged
JessicaTegner merged 4 commits intomasterfrom Mar 10, 2026
Merged
Add compilation, CLI, log parser, health checks, and module refactor#15JessicaTegner merged 4 commits intomasterfrom
JessicaTegner merged 4 commits intomasterfrom
Conversation
…allbacks New features: - compile() with multi-pass, engine selection, and auto-install of missing packages via tlmgr - LaTeX log parser (parse_log) for structured error/warning extraction - CLI entry point (python -m pytinytex / pytinytex command) with subcommands: compile, install, remove, list, search, info, update, version, doctor, download, uninstall - doctor() health check for diagnosing TinyTeX installations - Progress callback support for download_tinytex() API changes: - ensure_tinytex_installed() no longer auto-downloads; raises RuntimeError if TinyTeX is not found - Proper PATH handling: ensure_tinytex_installed adds bin dir to PATH, doctor uses normalized path comparison Refactoring: - Split __init__.py into focused modules: tlmgr.py (package management + command runner), doctor.py (health checks), compiler.py (compilation), log_parser.py (log parsing), cli.py + __main__.py (CLI) - __init__.py is now a thin hub with path resolution, engine discovery, and re-exports Rewritten README showcasing all features. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Verify compile produces valid PDF with magic bytes check - Verify multi-pass cross-reference resolution - Verify xelatex engine compilation - Verify auto-install finds and installs missing packages (blindtext) - Verify auto_install=False does not install anything - Verify doctor reports healthy on variation 1 - Verify PATH check passes after ensure_tinytex_installed - Verify doctor is consistent across consecutive runs - Verify doctor reports unhealthy when TinyTeX is missing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
download_tinytex() now resolves the path cache and adds the bin directory to PATH automatically, so the user is ready to go immediately after downloading. Removes duplicated PATH logic from tinytex_download.py. Also fixes test_tinytex_runner tests that relied on the old auto-download behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- download_tinytex() now shows progress automatically when stdout is a TTY. Scripted/CI usage stays silent. Custom progress_callback still supported. - Fix test_compile_auto_install_missing_package: run tlmgr update --self before attempting package install (tlmgr refuses to install until updated on fresh TinyTeX downloads). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
compile()— Compile.texto PDF with multi-pass support, engine selection (pdflatex/xelatex/lualatex), and automatic installation of missing packages via tlmgrparse_log()) — Extract structured errors, warnings, and missing package names from.logfilespython -m pytinytex/pytinytexcommand) — All features accessible from the terminal: compile, install, remove, list, search, info, update, version, doctor, download, uninstalldoctor()— Health check that verifies TinyTeX installation, PATH, tlmgr, and engine availabilitydownload_tinytex(progress_callback=...)for tracking download progressensure_tinytex_installed()no longer auto-downloads — RaisesRuntimeErrorif TinyTeX isn't found instead of silently downloading ~100MB__init__.pyinto focused modules:tlmgr.py,doctor.py,compiler.py,log_parser.py,cli.pyNew files
pytinytex/tlmgr.pypytinytex/doctor.pypytinytex/compiler.pypytinytex/log_parser.pypytinytex/cli.pypytinytex/__main__.pypython -m pytinytexentry pointtests/test_log_parser.pytests/test_compiler.pytests/test_cli.pytests/test_doctor.pyTest plan
pytinytex compileworks end-to-end with a real.texfilepytinytex doctorreports correct status.stypackages during compilation🤖 Generated with Claude Code