Skip to content

Correct runnable examples and reference errors in the lesson - #644

Open
dajiaohuang wants to merge 1 commit into
datacarpentry:mainfrom
dajiaohuang:fix/current-lesson-examples-20261016
Open

dajiaohuang wants to merge 1 commit into
datacarpentry:mainfrom
dajiaohuang:fix/current-lesson-examples-20261016

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

Correct small, independently reproducible errors in the canonical lesson sources (no generated site changes):

  • Remove stray characters from the instructor rename example and pass the connection to the SQL saving-work query.
  • Make the documented missing-year branch accept integer years; recognize an existing output directory including the default ./; return the written filename for the following list-of-filenames solution.
  • Include the afternoon of September 15 in the challenge described as September 11 through 15 (exclusive upper bound September 16).
  • Correct the dictionary output after the preceding mutations, describe integer conversion as truncation towards zero, and distinguish outer joins from Cartesian products.
  • Point the plotnine installation reminder to Setup, fix the Python datetime reference and keep the localhost link on the HTTP scheme shown in its label.

Validation

At main 535175e, executing the relevant documented snippets reproduces unmatched-parenthesis SyntaxError, missing-con TypeError, integer-year concatenation TypeError, and mkdir(./) FileExistsError. The original date filter excludes a synthetic September-15 noon observation. Each affected path passes after these changes; the writer now supplies actual filenames to its caller.

Checked with Python 3.13.13, pandas 2.3.3, NumPy 2.3.2, Matplotlib 3.11.2 and plotnine 0.15.8, using tiny invented DataFrames and an in-memory SQLite database (not research data). Also exercised read/write, selection, copying, grouping, joins, yearly-file functions and all current episode-07 Python fences with synthetic data, drawing 27 plot expressions. Verified that outer and cross joins differ, negative float conversion truncates towards zero, and the dictionary output matches the preceding commands. git diff --check passes.

Limits: no full Sandpaper validation/site build (R/Rscript/Pandoc unavailable), browser acceptance, Anaconda/conda installation, Python-3.8 environment check or verification of all supplied dataset statistics/images. The legacy supplemental notebooks are unchanged. Intentional teaching errors are preserved.

Existing PRs #640 and #626 cover different plotting/combination examples; their changes are deliberately not duplicated here.

@github-actions

Copy link
Copy Markdown

🆗 Pre-flight checks passed 😃

This pull request has been checked and contains no modified workflow files, spoofing, or invalid commits.

It should be safe to Approve and Run the workflows that need maintainer approval.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant