nteract / scrapbook

A library for recording and reading data in notebooks.
https://nteract-scrapbook.readthedocs.io
BSD 3-Clause "New" or "Revised" License
281 stars 26 forks source link

Return data and metadata from glue() if return_output is True #70

Closed davidbrochart closed 4 years ago

davidbrochart commented 4 years ago

It would be nice to not display but just return data/metadata. This is needed for https://github.com/davidbrochart/subnotebook.

codecov[bot] commented 4 years ago

Codecov Report

Merging #70 into master will decrease coverage by 0.35%. The diff coverage is 77.77%.

@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
- Coverage   96.33%   95.97%   -0.36%     
==========================================
  Files          10       10              
  Lines         491      497       +6     
==========================================
+ Hits          473      477       +4     
- Misses         18       20       +2     
MSeal commented 4 years ago

Is the intent to avoid serializing / deserializing when interfacing with notebooks in the same process? Why not just extract the variables you want directly in the subnotebook case?

Would it be slightly better to make it save the scrap AND return it so the sub-notebook in this case still persists it's data?

Sorry for the many questions, just trying to understand the usecase and make sure the change avoids library users from falling into risky patterns

davidbrochart commented 4 years ago

I think I don't need this change anymore, sorry for the inconvenience.

MSeal commented 4 years ago

No problem, glad you look into the library some :)