Closed kkleidal closed 2 years ago
Thanks for hopping on this, looks good.
We should figure out how to make this feature discoverable via links. One option would be to have a parallel link for collections that includes the __tsv__=true
in the link. This also might be a good opportunity to start using templated links, so we can add the optional parameter to existing collection links.
Also please add a couple unit tests to verify that the correct data is coming back in the right format, with the right content type header.
-s
Added TSV links to list views (I can add them to single views too if you want). It currently only links to the TSV with the exact same filter.
It might be helpful to create a new view that lets you tailor the filters and download a TSV containing the data obeying the filters. Sort of like a query. Should I put that idea in a separate issue?
I also added two test cases.
Need to add some tests Tuesday, but TSV upload seems to be working.
Also, I don't think the fields in TSV upload/TSV download are necessarily consistent with each other (but they are internally consistent--ie, if you download a scalar data TSV from two different sensors, they will have the same fields), but the properties in the JSON create/JSON get are not necessarily consistent either, so I didn't think it would be a problem.
Implemented upload tests
Looks good. I'll pull it to my dev environment and play around with it soon.
by adding tsv=true GET param
Can easily be changed to CSV if need be, but tabs are generally a better delimiter than commas.
XXX: I only changed the generic Resource class; individual resources may still need to be changed
9