Skip to content

Commit ca1a775

Browse files
authored
Merge pull request #97 from devitocodes/maximum-effort
Convert to Quatro formatted book; update for Python 3.10; dropping some features/modules that are hard to maintain.
2 parents 3927830 + 4ce3db1 commit ca1a775

22,490 files changed

Lines changed: 52166 additions & 1099043 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Build Book PDF
2+
3+
on:
4+
push:
5+
branches: [main, master, maximum-effort]
6+
pull_request:
7+
branches: [main, master]
8+
workflow_dispatch: # Allow manual triggers
9+
10+
jobs:
11+
build-pdf:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.12'
22+
cache: 'pip'
23+
24+
- name: Install Quarto
25+
uses: quarto-dev/quarto-actions/setup@v2
26+
with:
27+
version: '1.6.40'
28+
29+
- name: Install TeX Live
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y --no-install-recommends \
33+
texlive-latex-base \
34+
texlive-latex-recommended \
35+
texlive-latex-extra \
36+
texlive-fonts-recommended \
37+
texlive-fonts-extra \
38+
texlive-science \
39+
texlive-pictures \
40+
texlive-bibtex-extra \
41+
texlive-plain-generic \
42+
lmodern \
43+
biber \
44+
latexmk \
45+
cm-super \
46+
dvipng \
47+
ghostscript
48+
49+
- name: Install Python dependencies
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install numpy scipy matplotlib sympy
53+
54+
- name: Verify installations
55+
run: |
56+
echo "=== Quarto version ==="
57+
quarto --version
58+
echo ""
59+
echo "=== Python packages ==="
60+
pip list | grep -E "numpy|scipy|matplotlib|sympy"
61+
echo ""
62+
echo "=== LaTeX version ==="
63+
pdflatex --version | head -2
64+
65+
- name: Build book PDF with Quarto
66+
run: |
67+
quarto render --to pdf
68+
69+
- name: Verify PDF was created
70+
run: |
71+
if [ -f _book/Finite-Difference-Computing-with-PDEs.pdf ]; then
72+
echo "PDF successfully created!"
73+
ls -lh _book/Finite-Difference-Computing-with-PDEs.pdf
74+
else
75+
echo "ERROR: PDF was not created"
76+
echo "Contents of _book directory:"
77+
ls -la _book/ || echo "_book directory does not exist"
78+
exit 1
79+
fi
80+
81+
- name: Upload PDF artifact
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: fdm-book-pdf
85+
path: _book/Finite-Difference-Computing-with-PDEs.pdf
86+
retention-days: 30
87+
88+
- name: Upload build logs on failure
89+
if: failure()
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: build-logs
93+
path: |
94+
_book/*.log
95+
_book/*.tex
96+
retention-days: 7

.gitignore

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@ syntax: glob
33
*.o
44
*.so
55
*.a
6+
# Python:
7+
venv/
8+
.venv/
9+
__pycache__/
10+
*.py[cod]
11+
*.egg-info/
12+
dist/
13+
build/
14+
.eggs/
615
# temporary files:
7-
build
816
*.bak
917
*.swp
1018
*~
1119
.*~
1220
*.old
21+
*.old~~
1322
tmp*
1423
temp*
1524
.#*
@@ -43,3 +52,22 @@ _minted-*
4352
.*.copyright
4453
sphinx-rootdir
4554
Trash
55+
# Generated/published content (regenerated by build scripts):
56+
doc/pub/
57+
58+
# Generated LaTeX files (in doc/.src/book/):
59+
book.tex
60+
book.pdf
61+
book.dlog
62+
latex_figs/
63+
svmonodo.cls
64+
t4do.sty
65+
newcommands_keep.tex
66+
tmp_mako__*.do.txt
67+
tmp_preprocess__*.do.txt
68+
# Test files:
69+
title_test.*
70+
71+
/.quarto/
72+
/_book/
73+
**/*.quarto_ipynb

.markdownlint-cli2.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# markdownlint-cli2 configuration
2+
# Include both .md and .qmd files for Quarto support
3+
globs:
4+
- "**/*.md"
5+
- "**/*.qmd"

.markdownlint.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# markdownlint configuration
2+
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
3+
4+
# MD013 - Line length (disabled - documentation often has long lines)
5+
MD013: false
6+
7+
# MD024 - Multiple headings with the same content (allowed for books)
8+
MD024: false
9+
10+
# MD033 - Inline HTML (allowed)
11+
MD033: false
12+
13+
# MD041 - First line should be a top-level heading (disabled for partial files)
14+
MD041: false
15+
16+
# MD046 - Code block style (allow both fenced and indented)
17+
MD046: false
18+
19+
# Rules disabled for LaTeX/math-heavy QMD files
20+
# MD010 - Hard tabs (often in raw LaTeX)
21+
MD010: false
22+
23+
# MD037 - Spaces inside emphasis (false positives from *u* in math)
24+
MD037: false
25+
26+
# MD040 - Fenced code language ({=latex} not recognized)
27+
MD040: false
28+
29+
# MD049 - Emphasis style (underscores common in math)
30+
MD049: false
31+
32+
# MD050 - Strong style (similar issue)
33+
MD050: false
34+
35+
# MD011 - Reversed link syntax (false positives from math like [D^{2x}])
36+
MD011: false
37+
38+
# MD032 - Blanks around lists (false positives from + in equations)
39+
MD032: false
40+
41+
# MD003 - Heading style (false positives from = in LaTeX equations)
42+
MD003: false
43+
44+
# MD025 - Multiple H1 headings (Quarto books have multiple titled sections)
45+
MD025: false
46+
47+
# MD001 - Heading increment (Quarto YAML title acts as H1, sections may start at H3)
48+
MD001: false
49+
50+
# MD022 - Blanks around headings (false positives from LaTeX arrays/matrices)
51+
MD022: false
52+
53+
# MD012 - Multiple consecutive blank lines (false positives in Python code blocks with PEP8 style)
54+
MD012: false
55+
56+
# MD004 - Unordered list style (allow both dash and plus - converted from DocOnce)
57+
MD004: false
58+
59+
# MD031 - Blanks around fences (false positives in nested documentation examples)
60+
MD031: false
61+
62+
# MD007 - Unordered list indentation
63+
MD007:
64+
indent: 2
65+
66+
# MD029 - Ordered list item prefix (allow any number)
67+
MD029:
68+
style: "one_or_ordered"
69+
70+
# MD060 - Table column style (disabled - formatting is matter of preference)
71+
MD060: false

.markdownlintignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Vendored third-party libraries
2+
**/node_modules/
3+
4+
# Build outputs
5+
doc/pub/
6+
_book/
7+
8+
# Virtual environments
9+
venv/
10+
.venv/

.pre-commit-config.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# See https://pre-commit.com for more information
2+
default_stages: [pre-commit]
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v6.0.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: https://github.com/pycqa/isort
12+
rev: 7.0.0
13+
hooks:
14+
# Run isort to check only (don't modify files)
15+
- id: isort
16+
name: "Check imports are sorted"
17+
args: [--check-only, --filter-files]
18+
stages: [pre-commit]
19+
- repo: https://github.com/astral-sh/ruff-pre-commit
20+
# Ruff version.
21+
rev: v0.14.14
22+
hooks:
23+
# Run the linter to check only (don't modify files)
24+
- id: ruff-check
25+
name: "Check code is linted with ruff"
26+
# Disabled flake8 - ruff covers the same checks with better performance
27+
# - repo: https://github.com/PyCQA/flake8
28+
# rev: 7.3.0
29+
# hooks:
30+
# - id: flake8
31+
# name: "Check code is linted with flake8"
32+
# additional_dependencies: [flake8-pyproject]
33+
- repo: https://github.com/crate-ci/typos
34+
rev: v1.33.1
35+
hooks:
36+
- id: typos
37+
name: "Check files for typos"
38+
stages: [pre-commit]
39+
- repo: https://github.com/DavidAnson/markdownlint-cli2
40+
rev: v0.20.0
41+
hooks:
42+
- id: markdownlint-cli2
43+
name: "Check markdown files"
44+
stages: [pre-commit]
45+
#
46+
# These stages modify the files applying fixes where possible
47+
# Since this may be undesirable they will not run automatically
48+
# These stages can be run with
49+
# pre-commit run --hook-stage manual
50+
#
51+
- repo: https://github.com/pycqa/isort
52+
rev: 7.0.0
53+
hooks:
54+
# Run isort to check only (don't modify files)
55+
- id: isort
56+
name: "Fix imports with isort"
57+
args: [--filter-files]
58+
stages: [manual]
59+
- repo: https://github.com/astral-sh/ruff-pre-commit
60+
# Ruff version.
61+
rev: v0.14.14
62+
hooks:
63+
# Run the linter to check only (don't modify files)
64+
- id: ruff-check
65+
name: "Fix linting errors with ruff check --fix"
66+
args: [--fix]
67+
stages: [manual]
68+
- repo: https://github.com/crate-ci/typos
69+
rev: v1.33.1
70+
hooks:
71+
- id: typos
72+
name: "Fix typos"
73+
args: [-w]
74+
stages: [manual]
75+
- repo: https://github.com/DavidAnson/markdownlint-cli2
76+
rev: v0.20.0
77+
hooks:
78+
- id: markdownlint-cli2
79+
name: "Fix markdown files"
80+
args: [--fix]
81+
stages: [manual]

.typos.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[default.extend-words]
2+
# Vietnamese name (Thanh-Ha Le Thi)
3+
Thi = "Thi"
4+
# Equation label suffix (exact solution "u_e")
5+
ue = "ue"

0 commit comments

Comments
 (0)