Skip to content

🌐 [translation-sync] Read test_pwt.csv from data-lectures (Track D) - #33

Closed
mmcky wants to merge 4 commits into
mainfrom
translation-sync-2026-08-18T01-14-32-pr-612
Closed

🌐 [translation-sync] Read test_pwt.csv from data-lectures (Track D)#33
mmcky wants to merge 4 commits into
mainfrom
translation-sync-2026-08-18T01-14-32-pr-612

Conversation

@mmcky

@mmcky mmcky commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

This PR contains automated translations from QuantEcon/lecture-python-programming.

Source PR

#612 - Read test_pwt.csv from data-lectures (Track D)

Files Updated

  • ✏️ lectures/pandas.md
  • ✏️ .translate/state/pandas.md.yml
  • ✏️ lectures/polars.md
  • ✏️ .translate/state/polars.md.yml

Details

  • Source Language: en
  • Target Language: fr
  • Model: claude-sonnet-5

This PR was created automatically by the translation action.

Copilot AI lite review requested due to automatic review settings August 18, 2026 01:14
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Aug 18, 2026
@github-actions

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-18
Routing: editor — 2 blocker finding(s); 2 major finding(s); 1 minor finding(s) in gating categories (accuracy/terminology/syntax/diff-check/other); accuracy 6 below floor 9; terminology 7 below floor 9
Shadow gate: would NOT auto-merge (recorded only; no action taken)


📝 Translation Quality

Criterion Score
Accuracy 6/10
Fluency 8/10
Terminology 7/10
Formatting 9/10
Overall 7.2/10

Summary: The translation of the modified sections is fluent and terminologically consistent with the glossary, but contains a few accuracy-critical code deviations from the English source (reverted rng usage in pandas.md and polars.md Series sections, a fabricated/incorrect URL in the requests section, and a missing .drop_nulls() in the pl_ex1 solution) that should be corrected since they alter or misrepresent the executable code shown to readers. Terminology is consistent with the provided glossary (e.g., 'Vue d'ensemble', 'Standardisation et visualisation', 'Évaluation paresseuse') French typographic conventions (non-breaking spaces before punctuation, guillemets) are correctly applied throughout the modified sections Technical explanations of Polars lazy evaluation and performance comparison are clearly and fluently rendered in French

Suggestions:

  • [blocker · accuracy] lectures/pandas.md — ## Series: The code cell was changed in the English source from np.random.randn(4) to using a rng = np.random.default_rng() generator with rng.standard_normal(4), but the French translation reverted this to the old np.random.randn(4) syntax without defining rng. This is a code accuracy error introduced in the modified section. → Use: rng = np.random.default_rng() followed by s = pd.Series(rng.standard_normal(4), name='daily returns') to match the source.
  • [blocker · accuracy] lectures/polars.md — ## Series: Similarly, in polars.md the source code cell uses rng.standard_normal(4) (with rng presumably defined, consistent with the rest of the lecture using np.random.default_rng()), but the French translation uses np.random.randn(4) directly without an rng object, and does the same later for the DataFrame example (np.random.randn(4) instead of rng.standard_normal(4)). This is inconsistent … → Restore rng.standard_normal(4) calls and ensure rng is defined via np.random.default_rng() as in the English source.
  • [major · accuracy] lectures/pandas.md — ### Accessing Data with requests: The sentence 'vous pouvez maintenant utiliser l'objet source renvoyé par l'appel requests.get('https://research.stlouisfed.org/fred2/series/UNRATE/downloaddata/UNRATE.csv')' does not match the English source, which says 'you can now proceed to build the source object from the data returned by the call requests.get(url)'. The translation invents a different (outdated/incorrect) URL that do… → « vous pouvez maintenant construire l'objet source à partir des données renvoyées par l'appel requests.get(url) »
  • [major · accuracy] lectures/polars.md — ### Performance comparison, solution for pl_ex1: In the exercise solution for pl_ex1, the French translation's code cell uses pl.col(tick).last() and pl.col(tick).first() without .drop_nulls(), whereas the English source uses pl.col(tick).drop_nulls().last() and pl.col(tick).drop_nulls().first(). This changes the code logic (handling of null values from the full outer join) and is a code-accuracy deviation from the source. → Restore .drop_nulls() calls: ((pl.col(tick).drop_nulls().last() / pl.col(tick).drop_nulls().first() - 1) * 100)
  • [minor · terminology] lectures/pandas.md — ## DataFrames, table header: Table column header uses non-standard spacing ':- :' instead of ':-:' for the centered-alignment markdown syntax, which could cause rendering inconsistencies in some Markdown parsers even though most will tolerate it. → Use ':-:' consistently, matching the English source's ':-:' markers.

🔍 Diff Quality

Check Status
Scope Correct
Position Correct
Structure Preserved
Heading-map Correct
Overall 10/10

Summary: The translation sync correctly applied all source changes (CSV URL updates, np.random to rng migration in the big-data benchmark, isinstance/pd.isna refactors, and drop_nulls removal) in the same positions within both target files.


This review was generated automatically by action-translation review mode.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This automated translation-sync PR updates the French lecture content to match upstream changes from QuantEcon/lecture-python-programming PR #612, primarily switching the test_pwt.csv dataset source to the QuantEcon/data-lectures repository and aligning related example code.

Changes:

  • Update test_pwt.csv loading URLs in both the pandas and polars lectures to use https://github.com/QuantEcon/data-lectures/raw/main/lectures/test_pwt.csv.
  • Modernize NumPy random generation in the polars lecture to use np.random.default_rng(42).
  • Adjust pandas examples to use more robust idioms (df.where(... ) defaulting to NaN, isinstance, pd.isna).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
lectures/pandas.md Switch test_pwt.csv source URL to data-lectures and refine a few pandas examples for correctness/robustness.
lectures/polars.md Switch test_pwt.csv source URL to data-lectures, update RNG usage, and minor formatting normalization.
.translate/state/pandas.md.yml Update translation-sync state metadata (source SHA, synced date, model, mode, tool version).
.translate/state/polars.md.yml Update translation-sync state metadata (source SHA, synced date, model, mode, tool version).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mmcky mmcky closed this Aug 18, 2026
@mmcky
mmcky force-pushed the translation-sync-2026-08-18T01-14-32-pr-612 branch from 0f90967 to a6a46ee Compare August 18, 2026 03:13
@mmcky

mmcky commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

♻️ Automatically rebased after #27 was merged.

Overlapping files: lectures/polars.md

The translation content is preserved; only unchanged sections were updated to match the current main branch. Please re-review if needed.

@mmcky mmcky reopened this Aug 18, 2026
@mmcky

mmcky commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: conflicts with fr#29 and the automatic rebase failed. A regenerated sync PR from current main replaces this one.

@mmcky mmcky closed this Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants