CenterForOpenScience / modular-file-renderer

A Python package for rendering files to HTML via an embeddable iframe
http://modular-file-renderer.readthedocs.io/en/latest/
Apache License 2.0
44 stars 67 forks source link

[SVCS-678] Add noop for export (Functionality Only) #334

Closed NyanHelsing closed 6 years ago

NyanHelsing commented 6 years ago

Ticket

https://openscience.atlassian.net/browse/SVCS-678

Purpose

What

When MFR receives an export request where the input and output formats are the same, it should simply return the original file unmodified... unless there's another reason to export the file (i.e. image scaling).

Why

A no-op is a simple operation to support, why not do it?

Acceptance criteria

A PR to support

QA notes

Devs will test this. Dev, please add a list of affected and unaffected file types.

Build an MFR export url requesting to export a file of type foo as type foo. This should start a download of the raw file without modification. Exception: image files should respect scaling parameters.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.2%) to 71.117% when pulling 072c3e08cca190a1b42dc3e8b3abacf031cf78f2 on birdbrained:ft/noop-only into 681a0ce0618d047cc9481b1bd9174b9f7b2d2b1b on CenterForOpenScience:develop.

cslzchen commented 6 years ago

For now, adding/updating new unit tests is not required since we will have a refactoring PR right afterwards.

NyanHelsing commented 6 years ago

Ok commits squashed I think this may be ready to go.