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

Clone Refactor & Test improvements #139

Closed mpacer closed 5 years ago

mpacer commented 5 years ago

I wanted to set us up for success going forward around cloning.

The difficulty we were having getting coverage in the tests suggested to me that we hadn't properly isolated the different pieces of the logic. When I started diving in it became clear that the internal logic of the clone API handler could use a lot of attention & refactoring.

Once the refactor was done it was fairly straightforward to test.

Also made general improvements

Overall the code should be much easier to follow.

codecov[bot] commented 5 years ago

Codecov Report

Merging #139 into master will increase coverage by 2.55%. The diff coverage is 72.72%.

@@            Coverage Diff             @@
##           master     #139      +/-   ##
==========================================
+ Coverage   74.87%   77.43%   +2.55%     
==========================================
  Files          10       10              
  Lines         414      421       +7     
==========================================
+ Hits          310      326      +16     
+ Misses        104       95       -9