Seed the French edition: 26 lectures translated with Opus 4.8#1
Merged
Conversation
Bulk translation of lecture-python-programming into French, seeded with QuantEcon/action-translation's `translate init`. - Model: claude-opus-4-8. Opus is used for one-time seeds because it showed zero cross-lecture terminology drift over a 5-lecture trial where Sonnet 5 drifted on 5 terms, and was correct where Sonnet was not (`mutable`, not `muable`). It costs 1.66x, which is worth it once for a corpus a native speaker then reviews. Ongoing sync stays on Sonnet 5. See QuantEcon/action-translation `.dev/decisions/D-2026-07-14-opus-for-bulk-seed.md`. - Glossary: 364 terms, including 7 programming-domain terms proposed in QuantEcon/action-translation#78 and still under native review. - French typography (non-breaking space before ; : ! ?) applied deterministically rather than via the prompt, which the model ignores. 331 inserted. See QuantEcon/action-translation#79. - 26/26 translated, 687k tokens, 34 minutes. This is a draft for review, not a finished edition.
There was a problem hiding this comment.
Pull request overview
This PR seeds the French edition of lecture-python-programming by adding the full translated lecture set, supporting book config/TOC, translation state metadata, and copied lecture assets needed to render/build the site.
Changes:
- Adds the French-translated lecture sources (MyST Markdown) and associated book configuration (
_config.yml,_toc.yml). - Adds translation provenance/state tracking under
.translate/state/plus aTRANSLATION-REPORT.md. - Adds/cop ies various lecture-specific static assets used by the book (data files, helper scripts, includes).
Reviewed changes
Copilot reviewed 65 out of 135 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| TRANSLATION-REPORT.md | Translation run summary + provenance metadata and next steps |
| lectures/writing_good_code.md | French lecture content (MyST) for “Writing Good Code” |
| lectures/workspace.md | French lecture content (MyST) for “Workspace / longer programs” |
| lectures/troubleshooting.md | French troubleshooting page |
| lectures/sympy.md | French lecture content (MyST) for SymPy |
| lectures/status.md | Execution stats page template (nb-exec table + environment info) |
| lectures/sine_wave.py | Small Python helper/example file referenced by workspace content |
| lectures/scipy.md | French lecture content (MyST) for SciPy |
| lectures/python_oop.md | French lecture content (MyST) for Python OOP |
| lectures/python_essentials.md | French lecture content (MyST) for Python essentials |
| lectures/python_by_example.md | French lecture content (MyST) for “Python by example” |
| lectures/python_advanced_features.md | French lecture content (MyST) for advanced features |
| lectures/pandas.md | French lecture content (MyST) for Pandas basics |
| lectures/pandas_panel.md | French lecture content (MyST) for panel data with Pandas |
| lectures/oop_intro.md | French lecture content (MyST) introducing OOP concepts |
| lectures/numpy.md | French lecture content (MyST) for NumPy |
| lectures/numpy_vs_numba_vs_jax.md | French lecture comparing NumPy/Numba/JAX |
| lectures/numba.md | French lecture content (MyST) for Numba |
| lectures/need_for_speed.md | French lecture on scientific computing/performance motivation |
| lectures/names.md | French lecture on names/namespaces |
| lectures/matplotlib.md | French lecture content (MyST) for Matplotlib |
| lectures/jax_intro.md | French lecture content (MyST) for JAX intro |
| lectures/intro.md | Book root/landing page in French edition |
| lectures/getting_started.md | French “getting started” lecture + embedded CSS snippet |
| lectures/functions.md | French lecture on functions |
| lectures/debugging.md | French lecture on debugging/error handling |
| lectures/autodiff.md | French lecture on automatic differentiation |
| lectures/about_py.md | French “about this course/Python” lecture |
| lectures/_toc.yml | Jupyter Book table of contents for the French edition |
| lectures/_static/lecture_specific/python_foundations/us_cities.txt | Lecture-specific data file |
| lectures/_static/lecture_specific/python_foundations/test_table.csv | Lecture-specific data file |
| lectures/_static/lecture_specific/python_advanced_features/test_table.csv | Lecture-specific data file |
| lectures/_static/lecture_specific/python_advanced_features/numbers.txt | Lecture-specific data file |
| lectures/_static/lecture_specific/pandas/wb_download.py | Helper script used by Pandas lecture assets/examples |
| lectures/_static/lecture_specific/pandas/data/ticker_data.csv | Lecture-specific dataset |
| lectures/_static/lecture_specific/pandas/data/test_pwt.csv | Lecture-specific dataset |
| lectures/_static/lecture_specific/pandas_panel/realwage.csv | Lecture-specific dataset |
| lectures/_static/lecture_specific/pandas_panel/employ.csv | Lecture-specific dataset |
| lectures/_static/lecture_specific/pandas_panel/countries.csv | Lecture-specific dataset |
| lectures/_static/lecture_specific/about_py/qs.py | Helper script used for a figure in about_py |
| lectures/_static/includes/lecture_howto_py.raw | Shared raw HTML include used by the book |
| lectures/_static/includes/header.raw | Shared raw HTML header include |
| lectures/_config.yml | Jupyter Book configuration for the French edition |
| .translate/state/writing_good_code.md.yml | Translation state metadata for writing_good_code |
| .translate/state/workspace.md.yml | Translation state metadata for workspace |
| .translate/state/troubleshooting.md.yml | Translation state metadata for troubleshooting |
| .translate/state/sympy.md.yml | Translation state metadata for sympy |
| .translate/state/status.md.yml | Translation state metadata for status |
| .translate/state/scipy.md.yml | Translation state metadata for scipy |
| .translate/state/python_oop.md.yml | Translation state metadata for python_oop |
| .translate/state/python_essentials.md.yml | Translation state metadata for python_essentials |
| .translate/state/python_by_example.md.yml | Translation state metadata for python_by_example |
| .translate/state/python_advanced_features.md.yml | Translation state metadata for python_advanced_features |
| .translate/state/pandas.md.yml | Translation state metadata for pandas |
| .translate/state/pandas_panel.md.yml | Translation state metadata for pandas_panel |
| .translate/state/oop_intro.md.yml | Translation state metadata for oop_intro |
| .translate/state/numpy.md.yml | Translation state metadata for numpy |
| .translate/state/numpy_vs_numba_vs_jax.md.yml | Translation state metadata for numpy_vs_numba_vs_jax |
| .translate/state/numba.md.yml | Translation state metadata for numba |
| .translate/state/need_for_speed.md.yml | Translation state metadata for need_for_speed |
| .translate/state/names.md.yml | Translation state metadata for names |
| .translate/state/matplotlib.md.yml | Translation state metadata for matplotlib |
| .translate/state/jax_intro.md.yml | Translation state metadata for jax_intro |
| .translate/state/intro.md.yml | Translation state metadata for intro |
| .translate/state/getting_started.md.yml | Translation state metadata for getting_started |
| .translate/state/functions.md.yml | Translation state metadata for functions |
| .translate/state/debugging.md.yml | Translation state metadata for debugging |
| .translate/state/autodiff.md.yml | Translation state metadata for autodiff |
| .translate/state/about_py.md.yml | Translation state metadata for about_py |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+16
to
+17
| - **Source**: /Users/mmcky/work/quantecon/lecture-python-programming | ||
| - **Target**: /Users/mmcky/work/quantecon/lecture-python-programming.fr |
|
|
||
| ## Next Steps | ||
|
|
||
| 1. Review translated lectures in `/Users/mmcky/work/quantecon/lecture-python-programming.fr` |
| - `.github/workflows/` — CI/CD and `action-translation` sync workflow | ||
| - `environment.yml` or `requirements.txt` — Python dependencies | ||
| - `LICENSE` | ||
| 3. Build to verify: `jupyter-book build /Users/mmcky/work/quantecon/lecture-python-programming.fr` |
Comment on lines
+52
to
+61
| <style> | ||
| .auto { | ||
| width : 70% ; | ||
| height : auto ; | ||
| } | ||
| .terminal{ | ||
| width : 80% ; | ||
| height : auto ; | ||
| } | ||
| </style> |
Comment on lines
+407
to
+414
| attributes = dir(__builtins__.bool) | ||
| callablels = [] | ||
|
|
||
| for attribute in attributes: | ||
| # Utilise eval() pour évaluer une chaîne comme une expression | ||
| if callable(eval(f'True.{attribute}')): | ||
| callablels.append(attribute) | ||
| print(callablels) |
Comment on lines
+46
to
+47
| repository_url: https://github.com/QuantEcon/lecture-python-programming | ||
| nb_repository_url: https://github.com/QuantEcon/lecture-python-programming.notebooks |
Comment on lines
+23
to
+25
| Ces cours sont compilés sur des instances `linux` via `github actions`. | ||
|
|
||
| Ces cours utilisent la version de python suivante |
Contributor
Author
|
Ignoring |
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.
Seeds the French edition with all 26 lectures, bulk-translated from
lecture-python-programmingusingaction-translation'stranslate init.This is a draft for review, not a finished edition. A GitHub diff isn't a useful review surface here — there's nothing to compare against, so every file reads as "all new". The real review happens on the rendered site and in the follow-ups below.
What was run
claude-opus-4-8Why Opus for the seed
Sonnet 5 is the default for ongoing sync and stays that way. Opus is used once, for the seed, on evidence rather than preference: across a 5-lecture trial it showed zero cross-lecture terminology drift where Sonnet 5 drifted on 5 terms, and it was correct where Sonnet drifted — rendering
mutableasmutable, notmuable, which isn't the Python sense. Output lengths were near-identical, so the 1.66× is purely the price ratio (~$6.3 → ~$10.4 for the full corpus). That's cheap for a one-time corpus a native speaker will then review. Recorded inaction-translationas.dev/decisions/D-2026-07-14-opus-for-bulk-seed.md.Caveat worth stating: that trial was n=5 lectures in one language.
French typography
The translation prompt has always instructed the model to place a non-breaking space before
; : ! ?. It doesn't — a measured translation came back with zero of them. That's now applied deterministically in code instead (QuantEcon/action-translation#79); 331 non-breaking spaces were inserted here.The 21 remaining plain spaces before high punctuation are all inside code — numpy slices (
z[0, :]), docstring parameters (observations : array_like), type annotations, and French prose inside#comments. Those are deliberately left alone; touching code to fix typography is the wrong trade.Known limitations — please read before reviewing terminology
Standard normal→Loi normale centrée réduite: neither model produced it, so it's a correctness call, not a consistency one.action-translation@v0.15.0, which still defaults toclaude-sonnet-4-6. Getting sync onto Sonnet 5 needs a v0.16.0 release and a pin bump — tracked separately, and it doesn't affect this seeded content.What's included
The 26 translated lectures, 88 copied non-markdown assets,
.translate/state/andTRANSLATION-REPORT.md— matching the conventions of the existing.zh-cnedition.🤖 Generated with Claude Code