Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
84cee26
Fix LaTeX build and add CI/CD infrastructure
ggorman Jan 23, 2026
a436ec6
Fix TEXINPUTS recursive reference in CI workflow
ggorman Jan 23, 2026
5d907f0
Add missing soul LaTeX package to CI workflow
ggorman Jan 23, 2026
ebcff3d
Add texlive-plain-generic for soul.sty
ggorman Jan 23, 2026
44e4eff
Add lmodern package for Latin Modern fonts
ggorman Jan 23, 2026
17e6a0a
Add Cython language definition for listings package
ggorman Jan 23, 2026
817e137
Remove preprocessor directives from DocOnce source files
ggorman Jan 26, 2026
15c7a35
Remove all Mako template conditionals from DocOnce source files
ggorman Jan 26, 2026
7815cdf
Fix Python linting issues and clean up obsolete files
ggorman Jan 26, 2026
36f0915
Eliminate duplicate Python source files in doc/.src/chapters
ggorman Jan 26, 2026
59bd89d
Apply Python linting fixes across src/ and exercise files
ggorman Jan 26, 2026
8061711
Remove unused and obsolete files
ggorman Jan 26, 2026
7bb7648
Remove legacy GitHub Pages template (doc/web/)
ggorman Jan 26, 2026
32f935d
Remove legacy published content (doc/pub/) and add to .gitignore
ggorman Jan 26, 2026
04ef983
Remove mov-* directories and relocate stencil figures to fig-wave
ggorman Jan 26, 2026
23ded18
Remove HTML build artifacts, scripts, and experiment outputs
ggorman Jan 26, 2026
988db9e
Simplify chapter build scripts to PDF-only and remove Sphinx dependency
ggorman Jan 26, 2026
6cef326
Remove all scitools dependencies and replace with standard Python pac…
ggorman Jan 26, 2026
3a96e9e
Add Quarto book structure converted from DocOnce
ggorman Jan 26, 2026
e1c1ad1
Remove DocOnce source files
ggorman Jan 26, 2026
01bd5f4
Add _book/ to .gitignore (Quarto build output)
ggorman Jan 26, 2026
54da851
Use PNG for disprel2D figure (remove oversized PDF reference)
ggorman Jan 26, 2026
2bc9ec9
Fix Quarto cross-references and equation labels
ggorman Jan 27, 2026
3189efd
Change figure width from 800px to 100% for PDF compatibility
ggorman Jan 27, 2026
4b69421
Configure PDF output for screen viewing
ggorman Jan 27, 2026
9b75b1c
Keep intermediate LaTeX files for debugging (keep-tex: true)
ggorman Jan 27, 2026
5fd8878
Fix DocOnce artifacts causing PDF formatting issues
ggorman Jan 27, 2026
e44f488
Fill empty code blocks in exercise solutions and add exercise files
ggorman Jan 27, 2026
4ce3db1
Update CI workflow to use Quarto instead of DocOnce
ggorman Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
96 changes: 96 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Build Book PDF

on:
push:
branches: [main, master, maximum-effort]
pull_request:
branches: [main, master]
workflow_dispatch: # Allow manual triggers

jobs:
build-pdf:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'

- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: '1.6.40'

- name: Install TeX Live
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
texlive-latex-base \
texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-science \
texlive-pictures \
texlive-bibtex-extra \
texlive-plain-generic \
lmodern \
biber \
latexmk \
cm-super \
dvipng \
ghostscript

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install numpy scipy matplotlib sympy

- name: Verify installations
run: |
echo "=== Quarto version ==="
quarto --version
echo ""
echo "=== Python packages ==="
pip list | grep -E "numpy|scipy|matplotlib|sympy"
echo ""
echo "=== LaTeX version ==="
pdflatex --version | head -2

- name: Build book PDF with Quarto
run: |
quarto render --to pdf

- name: Verify PDF was created
run: |
if [ -f _book/Finite-Difference-Computing-with-PDEs.pdf ]; then
echo "PDF successfully created!"
ls -lh _book/Finite-Difference-Computing-with-PDEs.pdf
else
echo "ERROR: PDF was not created"
echo "Contents of _book directory:"
ls -la _book/ || echo "_book directory does not exist"
exit 1
fi

- name: Upload PDF artifact
uses: actions/upload-artifact@v4
with:
name: fdm-book-pdf
path: _book/Finite-Difference-Computing-with-PDEs.pdf
retention-days: 30

- name: Upload build logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-logs
path: |
_book/*.log
_book/*.tex
retention-days: 7
30 changes: 29 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ syntax: glob
*.o
*.so
*.a
# Python:
venv/
.venv/
__pycache__/
*.py[cod]
*.egg-info/
dist/
build/
.eggs/
# temporary files:
build
*.bak
*.swp
*~
.*~
*.old
*.old~~
tmp*
temp*
.#*
Expand Down Expand Up @@ -43,3 +52,22 @@ _minted-*
.*.copyright
sphinx-rootdir
Trash
# Generated/published content (regenerated by build scripts):
doc/pub/

# Generated LaTeX files (in doc/.src/book/):
book.tex
book.pdf
book.dlog
latex_figs/
svmonodo.cls
t4do.sty
newcommands_keep.tex
tmp_mako__*.do.txt
tmp_preprocess__*.do.txt
# Test files:
title_test.*

/.quarto/
/_book/
**/*.quarto_ipynb
5 changes: 5 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# markdownlint-cli2 configuration
# Include both .md and .qmd files for Quarto support
globs:
- "**/*.md"
- "**/*.qmd"
71 changes: 71 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# markdownlint configuration
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md

# MD013 - Line length (disabled - documentation often has long lines)
MD013: false

# MD024 - Multiple headings with the same content (allowed for books)
MD024: false

# MD033 - Inline HTML (allowed)
MD033: false

# MD041 - First line should be a top-level heading (disabled for partial files)
MD041: false

# MD046 - Code block style (allow both fenced and indented)
MD046: false

# Rules disabled for LaTeX/math-heavy QMD files
# MD010 - Hard tabs (often in raw LaTeX)
MD010: false

# MD037 - Spaces inside emphasis (false positives from *u* in math)
MD037: false

# MD040 - Fenced code language ({=latex} not recognized)
MD040: false

# MD049 - Emphasis style (underscores common in math)
MD049: false

# MD050 - Strong style (similar issue)
MD050: false

# MD011 - Reversed link syntax (false positives from math like [D^{2x}])
MD011: false

# MD032 - Blanks around lists (false positives from + in equations)
MD032: false

# MD003 - Heading style (false positives from = in LaTeX equations)
MD003: false

# MD025 - Multiple H1 headings (Quarto books have multiple titled sections)
MD025: false

# MD001 - Heading increment (Quarto YAML title acts as H1, sections may start at H3)
MD001: false

# MD022 - Blanks around headings (false positives from LaTeX arrays/matrices)
MD022: false

# MD012 - Multiple consecutive blank lines (false positives in Python code blocks with PEP8 style)
MD012: false

# MD004 - Unordered list style (allow both dash and plus - converted from DocOnce)
MD004: false

# MD031 - Blanks around fences (false positives in nested documentation examples)
MD031: false

# MD007 - Unordered list indentation
MD007:
indent: 2

# MD029 - Ordered list item prefix (allow any number)
MD029:
style: "one_or_ordered"

# MD060 - Table column style (disabled - formatting is matter of preference)
MD060: false
10 changes: 10 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Vendored third-party libraries
**/node_modules/

# Build outputs
doc/pub/
_book/

# Virtual environments
venv/
.venv/
81 changes: 81 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# See https://pre-commit.com for more information
default_stages: [pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pycqa/isort
rev: 7.0.0
hooks:
# Run isort to check only (don't modify files)
- id: isort
name: "Check imports are sorted"
args: [--check-only, --filter-files]
stages: [pre-commit]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.14
hooks:
# Run the linter to check only (don't modify files)
- id: ruff-check
name: "Check code is linted with ruff"
# Disabled flake8 - ruff covers the same checks with better performance
# - repo: https://github.com/PyCQA/flake8
# rev: 7.3.0
# hooks:
# - id: flake8
# name: "Check code is linted with flake8"
# additional_dependencies: [flake8-pyproject]
- repo: https://github.com/crate-ci/typos
rev: v1.33.1
hooks:
- id: typos
name: "Check files for typos"
stages: [pre-commit]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.20.0
hooks:
- id: markdownlint-cli2
name: "Check markdown files"
stages: [pre-commit]
#
# These stages modify the files applying fixes where possible
# Since this may be undesirable they will not run automatically
# These stages can be run with
# pre-commit run --hook-stage manual
#
- repo: https://github.com/pycqa/isort
rev: 7.0.0
hooks:
# Run isort to check only (don't modify files)
- id: isort
name: "Fix imports with isort"
args: [--filter-files]
stages: [manual]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.14
hooks:
# Run the linter to check only (don't modify files)
- id: ruff-check
name: "Fix linting errors with ruff check --fix"
args: [--fix]
stages: [manual]
- repo: https://github.com/crate-ci/typos
rev: v1.33.1
hooks:
- id: typos
name: "Fix typos"
args: [-w]
stages: [manual]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.20.0
hooks:
- id: markdownlint-cli2
name: "Fix markdown files"
args: [--fix]
stages: [manual]
5 changes: 5 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[default.extend-words]
# Vietnamese name (Thanh-Ha Le Thi)
Thi = "Thi"
# Equation label suffix (exact solution "u_e")
ue = "ue"
Loading