nteract / bookstore

📚 Notebook storage and publishing workflows for the masses
https://bookstore.readthedocs.io
BSD 3-Clause "New" or "Revised" License
201 stars 23 forks source link

Add fsclone integration test & format improvements #165

Closed mpacer closed 4 years ago

mpacer commented 4 years ago

This adds integration tests for file system cloning and is based on #162 and #164.

It also required addressing some minor inconsistencies I was discovering when I attempted to try our integration tests with a genuinely empty notebook.

These have to do with how the notebook stores cell source values in memory vs. on disk. Because we were using json.dumps() to get our to-disk content, we were not always writing out the appropriate information that was being passed through. This was most obvious in the case of an empty source [] which was being written to s3 as ''. Using nbformat.writes and nbformat.from_dict alleviates the issue.

codecov[bot] commented 4 years ago

Codecov Report

Merging #165 into master will increase coverage by 1.48%. The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
+ Coverage   81.15%   82.64%   +1.48%     
==========================================
  Files          10       10              
  Lines         467      507      +40     
==========================================
+ Hits          379      419      +40     
  Misses         88       88
codecov[bot] commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@b446ba2). Click here to learn what that means. The diff coverage is 100%.

@@            Coverage Diff            @@
##             master     #165   +/-   ##
=========================================
  Coverage          ?   82.64%           
=========================================
  Files             ?       10           
  Lines             ?      507           
  Branches          ?        0           
=========================================
  Hits              ?      419           
  Misses            ?       88           
  Partials          ?        0