Open StevenMaude opened 2 years ago
I don't quite follow this: take/drop
only works as a frame->frame operation.
I probably didn't explain well enough or even understand clearly enough myself; sorry! (I'm possibly still a little muddled in how series and frames work too.)
In this case, what I mean: none of the current spec tests show the bare result of take/drop
, but are used in conjunction with selection of a column and/or aggregation, to give a series.
That means it's easy to miss — as I did — that take/drop
goes from frame :arrow_right: frame.
What's then missing: an example of the outcome of a take/drop
without further chained methods.
Oh I see, yes. In one sense it's impossible to demonstrate what you want to demonstrate via spec tests, because the only way to get anything out of ehrQL requires getting a series and attaching it to a dataset.
I feel like this comes back to a question I've raised before, which is that it's not quite clear to me how the spec tests can properly play the roles of being both tests and documentation at the same time.
Yes, I agree!
Though I think the spec tests are pretty good at this stage, in lieu of anything more dedicated right now.
(With respect to user testing, we can sandpaper over any important gaps by explicitly mentioning them in the tutorial, or somewhere else appropriate.)
Though
take
apparently works with frames to give another frame, it's not covered in the spec tests.