You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was checking "tmy_to_power.ipynb" and found 6 changes are needed to run and there's a deprecation warning.
Let me know how best to share these as I am a novice at github but can share the ipynb file.
If anyone had fixed the other tutorials it would be good to have them.
The changes I found were
I volunteer to go through and update the notebooks. @cwhanse how do you want to coordinate this with #886? Merge conflicts with notebooks are a bit of a pain to resolve.
@steve-ransome ipynb files can be handled through git like normal text files (because they are normal text files) but the diffs can get a little messy because a lot of somewhat irrelevant environment metadata gets captured as well. If you don't want to deal with that, feel free to email me that file and I can do it along with the others: kevin.anderson at nrel.gov
A broader question is how we test and maintain the iPython notebooks to keep up with pvlib changes.
Googling around, nbval is one option. It's a pytest plugin that targets jupyter notebooks and treats each cell like a test. Trying it out on tmy_to_power.ipynb gives a pretty standard pytest output, although it's pretty cluttered because it doesn't stop running cells after it hits an error, so when one fails at the beginning, everything after that fails too. Seems like it also picks up warnings and reports those as errors, so it would catch deprecated function calls. Could be a manual check before cutting a release, or could probably set it up on the CI somehow.
Activity
steve-ransome commentedon Jun 28, 2020
I was checking "tmy_to_power.ipynb" and found 6 changes are needed to run and there's a deprecation warning.
Let me know how best to share these as I am a novice at github but can share the ipynb file.
If anyone had fixed the other tutorials it would be good to have them.
The changes I found were
kandersolar commentedon Jun 30, 2020
I volunteer to go through and update the notebooks. @cwhanse how do you want to coordinate this with #886? Merge conflicts with notebooks are a bit of a pain to resolve.
@steve-ransome ipynb files can be handled through git like normal text files (because they are normal text files) but the diffs can get a little messy because a lot of somewhat irrelevant environment metadata gets captured as well. If you don't want to deal with that, feel free to email me that file and I can do it along with the others: kevin.anderson at nrel.gov
Googling around, nbval is one option. It's a pytest plugin that targets jupyter notebooks and treats each cell like a test. Trying it out on
tmy_to_power.ipynbgives a pretty standard pytest output, although it's pretty cluttered because it doesn't stop running cells after it hits an error, so when one fails at the beginning, everything after that fails too. Seems like it also picks up warnings and reports those as errors, so it would catch deprecated function calls. Could be a manual check before cutting a release, or could probably set it up on the CI somehow.cwhanse commentedon Jun 30, 2020
Let's hold on a PR to fix the tutorials until after #886 is merged, that's waiting on an approval.
If you are willing to do so, we can manually check the tutorials pre-v0.8, see how we like the plugin.
mikofski commentedon Jun 30, 2020
To compare notebooks, I use nbdime (https://nbdime.readthedocs.io/en/latest/) please give it a try, it's really useful.
steve-ransome commentedon Jun 30, 2020
Thanks all, I am willing to help. It would be nice to keep all the tutorials working all the time.
Thanks @mikofski , nbdime looks very useful