bids-specification
bids-specification copied to clipboard
[ENH] render table from TSV
- closes #644
- relates to #1757
- relates to #1756
rely on mkdocs plugins to render TSV
- [x] ensure proper PDF build
@yarikoptic @sappelhoff
http://127.0.0.1:8000/en/stable/longitudinal-and-multi-site-studies.html#longitudinal-and-multi-site-studies
How would this look:
Note that grabbing the content from the HTML (with copy-paste) gives this (where separators are one space + one tab):
session_id acq_time systolic_blood_pressure
ses-predrug 2009-06-15T13:45:30 120
ses-postdrug 2009-06-16T13:45:30 100
if we are OK with this look, I could do the other TSV examples in the spec.
I think this is a great improvement!
one space + one tab
why the space though 🤔
why the space though 🤔
No idea
looks neat! I would have still adjusted styling to remove even row separators visually.
re "space" -- worth checking on https://github.com/timvink/mkdocs-table-reader-plugin/issues?
how would it work for PDFs?
how would it work for PDFs?
will add a bit of code to inject content during the pdf build
if we need to add a warning for copy pasting directly from the HTML, I would suggest using mkdocs annotations:
https://squidfunk.github.io/mkdocs-material/reference/annotations/#using-annotations
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.93%. Comparing base (
943c20e) to head (72705c7). Report is 2 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #1783 +/- ##
=======================================
Coverage 87.93% 87.93%
=======================================
Files 16 16
Lines 1351 1351
=======================================
Hits 1188 1188
Misses 163 163
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
PDF looks good to me:
For the PDF could also just opt for a more verbatim rendering rather than actual tables.
Though not sure how often people will "copy paste" from the pdf.
I hate to throw a towel on all of this, but I feel like moving the examples into separate files will only make the spec more difficult to contribute to. One thing we could consider is writing a custom fence formatter and write a renderer that would convert
```tsv
session_id body_weight
ses-01 58
ses-02 59
```
into
| session_id | body_weight |
|--|--|
| ses-01 | 58 |
| ses-02 | 59 |
I hate to throw a towel on all of this, but I feel like moving the examples into separate files will only make the spec more difficult to contribute to.
To be fair this was an unvoiced concern of mine when working on this, so thanks for raising it.
In any case this is not urgent so we can definitely wait before merging: moving back to draft.
In the meantime I will try to work on those fencer thing you linked to.
🤺