-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow rendering search responses as lines of tab-separated or comma-separated values main point: - add simple_tsv and simple_csv renderers in trove.render - - can be seen with query param acceptMediatype=text/tab-separated-values or acceptMediatype=text/csv - - get default columns from static DEFAULT_TABULAR_SEARCH_COLUMN_PATHS in trove.vocab.osfmap - allow "download" responses -- add withFileName=foo query param to get a response with Content-Disposition: attachment and a filename based on "foo" - allow absurd page sizes changes made along the way: - introduce ProtoRendering as renderer output type, to better decouple rendering from view logic - - include StreamableRendering for responses that might could be streamed, like csv/tsv (tho it's not currently handled any differently from SimpleRendering) - - reshape BaseRenderer (and each existing renderer) to have a consistent call signature (and return ProtoRendering) - - - replace trove.render.get_renderer with trove.render.get_renderer_type -- instantiate the renderer with response data - add trove.views._responder with common logic for building a django HttpResponse for a ProtoRendering - - consistently handles withFileName/Content-Disposition - move some osf-specific constants to trove.vocab.osfmap for easier reuse - pull out some abstractable logic: - - from existing trove.render.simple_json into trove.render._simple_trovesearch (for renderers that include only the list of search results) - - from existing tests.trove.derive._base into tests.trove._input_output_tests (for tests following the same simple input/output pattern as deriver and renderer tests) - add tests.trove.render to cover the new renderers simple_tsv and simple_csv, as well as the existing renderers jsonapi, simple_json, jsonld, and turtle - - minimally update existing renderers to create consistent output
- Loading branch information
Showing
44 changed files
with
2,366 additions
and
636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,4 @@ xmltodict==0.12.0 # MIT | |
# Allows custom-rendered IDs, hiding null values, and including data in error responses | ||
git+https://github.com/cos-forks/[email protected]+cos0 | ||
|
||
git+https://github.com/aaxelb/[email protected].09 | ||
git+https://github.com/aaxelb/[email protected].14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.