-
Notifications
You must be signed in to change notification settings - Fork 148
Examples #50
base: develop
Are you sure you want to change the base?
Examples #50
Conversation
Use Sphinx as documentation framework.
ChasNelson1990
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to pull and check the notebook runs on my system before approving but have to dash off to a short meeting so thought I'd give you chance to answer my two comments.
| line = inspect.getsourcelines(wrapped)[1] | ||
| # add exception for testing notebook in a subprocess | ||
| except OSError: | ||
| line = "n/a" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be more informative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it only appears when testing the notebook, in a subprocess - I don't think a user would ever see it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.
| @@ -0,0 +1,211 @@ | |||
| # | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this whole module be integrated into the pytest framework?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps, though I view testing the examples and docs as separate from pytest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and I don't know how to put this in the pytest framework
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry.... I didn't see the "how to put this in the pytest framework" comment before I sent 'how so?'!
Erm, this could be a good reason not to then... but can't you use a pytest fixture to tell it where the docs/notebooks are?
|
BTW it turns out my main tests didn't test runtime tracking at all as I passed in a directory (which then used static analysis). I am changing it to test one example. |
|
@all-contributors please add @tinosulzer for example |
|
I've put up a pull request to add @tinosulzer! 🎉 |
Adds a jupyter notebook example
Adds tests for the examples
Fixes #33