Closed edublancas closed 2 years ago
Hi, is Rod.
Made this change & apparently is working, but would like your input.
Basically, clean_mudule.basic_clean(nb_path)
already implements this logic of applying black, so now is also run before export.refactor(...)
(in cli.py
). But I could be missing something.
please open a PR with your changes, that will help me evaluate the solution
Fixed unit-tests by adding option to disable string normalizations (aka do not mess with single quotes) when applying black. The reason is that many tests were failing because they use regex to match single quotes.
Submitted a PR to ploomber/ci-notebooks that should fix the integration-tests on Soorgeon. The reason is that those notebooks are downloaded by the Soorgeon integration-tests workflow & converted to dags. Those convertions are failing because of errors in code in those notebooks.
thanks for the patience! can you push a new commit to re-trigger the CI for your PR? https://github.com/ploomber/soorgeon/pull/87
git commit --allow-empty -m "trigger ci"
Done. Tests passed!
apologies for the delay @rrhg; I'll review this in the next 1-2 days. thanks for your patience and for your contributions!
I ran
soorgeon refactor
on this notebook: https://www.kaggle.com/code/cdeotte/xgboost-starter-0-793after fixing the headings and the function that uses global variables. I got this error:
and it failed. I realized it's because of this for loop:
I realized that applying black and rerunning it fixed the issue. that's an easy fix for many of this edge cases; so I think we should apply black on the notebook before running
soorgeon refactor
here's the notebook. note that I changed the extension from ipynb to txt since github wont let me upload it with ipynb extension
xgboost-starter-0-793.txt