treebeardtech / nbmake

📝 Pytest plugin for testing notebooks
https://pypi.org/project/nbmake/
Apache License 2.0
189 stars 18 forks source link

feat: add ability to run commands after a cell #94

Closed tekumara closed 1 year ago

tekumara commented 1 year ago

resolves #93

codecov[bot] commented 1 year ago

Codecov Report

Merging #94 (3e04704) into main (966edac) will increase coverage by 0.27%. The diff coverage is 91.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
+ Coverage   92.46%   92.73%   +0.27%     
==========================================
  Files           4        4              
  Lines         146      179      +33     
==========================================
+ Hits          135      166      +31     
- Misses         11       13       +2     
Impacted Files Coverage Δ
src/nbmake/pytest_items.py 88.46% <ø> (ø)
src/nbmake/pytest_plugin.py 91.66% <83.33%> (-3.08%) :arrow_down:
src/nbmake/nb_run.py 94.62% <93.10%> (+0.77%) :arrow_up:
alex-treebeard commented 1 year ago

Thanks @tekumara, this is an awesome contribution and it looks like it's safe to merge (some CI checks are failing but I need to do some maintenance on them).

Out of interest, what's the origination of this use case? e.g. Are we trying to (a) generate runnable docs, (b) maintain some operational tool, or (c) validate the proof of concept/prototype code works?

tekumara commented 1 year ago

👍 I'd like to use this for runnable docs... The docs include an authentication step that end users need to perform, but in order to make it work in CI there is an auth dance that differs from what the end user would do (eg: it uses a service account rather than the user's account). So I'd like to keep the CI auth setup hidden.

alex-treebeard commented 1 year ago

Great, thanks again. Released in https://github.com/treebeardtech/nbmake/releases/tag/v1.4

We need to follow up with some docs and CI fixes (I'll take a look in the next week)

tekumara commented 1 year ago

Awesome thank you!