Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Updates to Code Execution Notebook #1604

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Conversation

holtskinner
Copy link
Collaborator

  • Change Code output to use Language syntax highlighting

- Change Code output to use Language syntax highlighting
@holtskinner holtskinner requested a review from a team as a code owner January 6, 2025 20:46
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@holtskinner holtskinner merged commit ca53b58 into main Jan 6, 2025
12 checks passed
Copy link
Contributor

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi @holtskinner and reviewers,

I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, here's a quick summary of the changes for you and other reviewers to get up to speed:

This pull request, titled "fix: Updates to Code Execution Notebook", aims to improve the code execution notebook by making several updates. The primary change is to update the code output to use language syntax highlighting.

Here's a breakdown of the changes:

  • Removed BigQuery Studio link: The link to open the notebook in BigQuery Studio has been removed from gemini/code-execution/intro_code_execution.ipynb (lines 51-53).
  • Updated execution counts: The execution_count values in gemini/code-execution/intro_code_execution.ipynb have been updated to null in several code cells (lines 140, 187, 232, 247, 267, 314, 338, 360, 422, 521, 586, 608, 662, 714, 842, 892, 1023, 1073, 1233, 1323). This likely reflects a clean state for the notebook.
  • Added HTML import: The IPython.display.HTML import was added to gemini/code-execution/intro_code_execution.ipynb (line 195) along with the addition of ToolCodeExecution to the imports (line 197).
  • Updated execution count values: Several code cells' execution_count values were adjusted in gemini/code-execution/intro_code_execution.ipynb (lines 232, 247, 267, etc.).
  • Simplified CSS function: The set_css_in_cell_output function in gemini/code-execution/intro_code_execution.ipynb was simplified (lines 274-296), removing unnecessary imports and lines of code.
  • Removed redundant HTML output: Redundant HTML output related to CSS styling was removed from cells in gemini/code-execution/intro_code_execution.ipynb (lines 311-321, 335-346).
  • Updated code execution tool: The code_execution_tool in gemini/code-execution/intro_code_execution.ipynb was updated to use ToolCodeExecution (line 344).
  • Improved code formatting: The markdown code blocks in gemini/code-execution/intro_code_execution.ipynb were updated to use ````py` for Python code (lines 458, 500, 750, 928, 1109, 1540, 1747). This improves readability.
  • Improved output formatting: The output of code execution results in gemini/code-execution/intro_code_execution.ipynb is now wrapped in backticks for better formatting (lines 578, 827, 1008, 1205, 1298).
  • Updated sample time series data: The sample time series data generation and output in gemini/code-execution/intro_code_execution.ipynb has been updated (lines 755-773, 785-796, 934-954, 966-977, 1115-1147, 1159-1174). The time range, temperature profile, and noise generation have been modified, resulting in different sample data. A moving average filter was added to the example.
  • Added markdown separators: Several markdown separators (---) were added to the notebook's output section (lines 1619-1876). This improves the visual structure of the notebook's output.

I hope this helps!

Small changes, big impact,
Code flows like a river,
Syntax shines so bright.

@holtskinner holtskinner deleted the code-execution-update branch January 6, 2025 20:46
Copy link
Contributor

Gemini encountered an error creating the review. You can try again by commenting @code-review-assist review.

Copy link
Contributor

Gemini encountered an error creating the summary. You can try again by commenting @code-review-assist summarize.

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