Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Conversation

@valentinsulzer
Copy link
Collaborator

@valentinsulzer valentinsulzer commented Sep 2, 2020

Adds a jupyter notebook example
Adds tests for the examples

Fixes #33

@valentinsulzer valentinsulzer marked this pull request as draft September 2, 2020 21:11
@valentinsulzer valentinsulzer marked this pull request as ready for review September 3, 2020 14:45
Copy link

@ChasNelson1990 ChasNelson1990 left a 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"

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?

Copy link
Collaborator Author

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

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 @@
#

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?

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How so?

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?

@de-code
Copy link
Contributor

de-code commented Sep 3, 2020

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.

@jezcope
Copy link
Collaborator

jezcope commented Sep 4, 2020

@all-contributors please add @tinosulzer for example

@allcontributors
Copy link
Contributor

@jezcope

I've put up a pull request to add @tinosulzer! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add and test examples

5 participants