Start of docs and tests for cp/get/put #1226
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the start of the comprehensive documentation and test suite for all
cp,getandputfunctionality. I'll post a link to the docs when they have been built.I have only considered four of the
cpscenarios so far, so we can check if this is the right approach before I complete it. I have made a number of decisions about the docs to obtain something that I am reasonably happy with, but all decisions are open to discussion and changing.The new docs page described the "expected behavior" idea and is divided up into a number of discrete scenarios, e.g. copy single file to existing directory. Each scenario is in a dropdown so that they can be individually expanded; without this the page will end up too long (so could be split into multiple pages maybe). For the dropdown functionality I've added a new docs dependency on
sphinx-design(https://sphinx-design.readthedocs.io/en/latest/tabs.html) which I am familiar with as it is used in Bokeh. I am displaying file trees in sphinx "literal" blocks using a monospace font and some unicode characters as this doesn't add any new dependencies and looks okay. We could make this look much better but I am not sure if it is worth the effort (and future maintenance).The new 4 tests are not ideal as there is a lot of duplication in the setup code. I'll think about we can replace this with a simple one-off setup of the
sourcedirectory which can be reused across multiple tests as the tests do not change thesourcedirectory only thetargetone.