re-write of test flags#232
Conversation
|
Check out this pull request on Review Jupyter notebook visual diffs & provide feedback on notebooks. Powered by ReviewNB |
|
Thanks much better! :D Let me know when you've tested on colab, and I'll merge this and see how it goes. |
|
hi @jph00 bit slow going (o: but this all works on colab. Hope you're ok with the extra changes to 04_test.ipynb and 09_nbdev_callback_test.ipynb - in its own cell, |
|
Hope you're ok with the extra changes to 04_test.ipynb and 09_nbdev_callback_test.ipynb - in its own cell, `import nbdev_callbacks` might fail or might load the wrong module (depending on sys.path etc), we need:
`call_cb('this makes sure nbdev_callbacks is loaded from the right place')
import nbdev_callbacks`
Thanks for checking! I don't really think that's OK - it's too surprising and a bit clunky.
What's this doing exactly? Is there some feature we can just do without, to get rid of this?
|
|
@jph00 we I had said in the docs "If you ever need to import the nbdev_callbacks in your code, please make a call to call_cb first", but you've made me realize we should hide all of these low level details from nbdev users - as they should not ever have to do this (they should just worry about defining the callback handlers that they care about in I've pushed another change to clean up the imports and hide some more details from the docs. Hope this makes sense (o: |
|
Ummm.... but now we have non-def/class code running when imported again! :( Can you explain more about what's going on here? Why do we need this exactly? How long does it take to run? |
|
Hi @jph00 In response to forum questions, here's a couple of places where callbacks can help and they will simplify creating code coverage reports - I'm hoping we'll find lots of uses for these callbacks that would otherwise have needed code changes to nbdev. The implementation of
Here's an example to show why I'm working on nbdev and my
Note: the only reason we
Let me know if a quick call to discus might save you some time (o: |
|
Apologies - I should have explained, I understand the benefits of nb callbacks. It was just the need to use before import that I was wondering about.
Note: the only reason we `import nbdev_callbacks` is to test and document as part of nbdev.
OK sorry that's the bit I didn't understand. Let's put the call to the callback back into the test then, and remove it from the module (i.e put it back where it was).
Thanks for your patient explanations! :)
|
|
@jph00 I think we've got it right now (o: |
Magics flags for tests