Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge projects? #5

Closed
timkpaine opened this issue May 11, 2019 · 3 comments
Closed

Merge projects? #5

timkpaine opened this issue May 11, 2019 · 3 comments

Comments

@timkpaine
Copy link

Any interest in merging projects?
https://github.com/timkpaine/jupyterlab_celltests

@amit1rrr
Copy link
Member

I looked at jupyterlab_celltests briefly and couldn't figure out exactly what it does from the Readme. From what I understand, it's a Jupyter lab plugin that let's you write tests for each cell and stores them as cell metadata. There's probably some mocking support as well. Can you please explain the tool briefly? (how does one install it, what type of tests user can write etc).

Also, if you have a general idea on what functionalities would be useful to merge that would be great.

@timkpaine
Copy link
Author

Yep, so basically there's a UI component for JupyterLab which lets you write tests for individual cells:
Screen Shot 2019-05-13 at 9 09 14 AM

You can also configure some top-level assertions like >50% of cells have tests, there are no more than 10 lines in a given cell, etc, all of which are designed to further enforce the notion of notebooks as simple, slim, linearly-executed structures.
Screen Shot 2019-05-13 at 9 09 44 AM

The on the backend, there are really 2 commands, lint and test.
Screen Shot 2019-05-13 at 9 10 01 AM

Lint will basically check your top-level assertions (could be extended to include linting the python code using a linter, but notebook code is usually too different to get relevant results).
Screen Shot 2019-05-13 at 9 10 07 AM

And test basically extracts your notebook python and cell tests into a standard python unittest and runs your cell tests and top level assertions with pytest.
Screen Shot 2019-05-13 at 9 10 25 AM

Both lint and test results are usable from python and exposed in the jupyterlab UI.

@amit1rrr
Copy link
Member

Thanks for explaining. Looks like a pretty useful tool. I would updated the Readme to convey this and how to get started.

About merging projects - these are both primarily in different formats for users to consume.
(JupyterLab UI vs cmdline). I don't see a path to really merge these as such and offering them both in a single tool is not ideal since we'll just be bloated with lot of options. I definitely want to support pytests in treon so maybe I will reach out to you for that. Here's the issue for it: #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants