rapidsai / deployment

RAPIDS Deployment Documentation
https://docs.rapids.ai/deployment/stable/
9 stars 28 forks source link

ensure all notebook Python cells are valid Python code #367

Closed jameslamb closed 5 months ago

jameslamb commented 5 months ago

Contributes to #333

ruff reports 2 errors of the form "this Python cell in a notebook doesn't look like syntactically-valid Python code".

error: Failed to parse source/examples/xgboost-azure-mnmg-daskcloudprovider/notebook.ipynb:23:6:27: Unexpected token '<'
error: Failed to parse source/examples/rapids-sagemaker-higgs/notebook.ipynb:39:1:5: Unexpected token 'ecr'

This fixes both of those.

Benefits of this change

Ensuring every Python code is syntactically-valid Python code means we can get better coverage from static analysis and formatting tools, reducing the risk of bugs making it into these notebooks.

Notes for Reviewers

I've left comments inline in the diff below explaining how specific changes fix these errors.

All other style changes were made automatically by this project's other formatting hooks. Those probably never made it onto main before because of similar parsing issues.

review-notebook-app[bot] commented 5 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB