-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Replace version tables with RST csv-table and add 3.11 #6433
Conversation
Demo: https://pillow--6433.org.readthedocs.build/en/6433/installation.html#python-support Note "Newer versions [table]" also has 3.11. I left that in by accident when testing out, will remove it from the final PR. |
My suggestion would be a mix of the two, as the inline version still works without spaces. This would avoid the separate CSV files, while still keeping the easy of editing - radarhere@395469d / https://pillow-radarhere.readthedocs.io/en/docs-csv-table/installation.html#python-support |
Yep, it also works without spaces. I think the spaces help make sure the raw text match the output, to make it easier to edit and see you're making the right changes. But my idea for using separate CSV files is they can be much more easily manipulated using a spreadsheet program to make it easier to add/move rows, and between tables as well if necessary. |
Ok. I would personally still just edit the raw text anyway, but it is easier for others, then sure. |
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
The existing version support tables at https://pillow.readthedocs.io/en/stable/installation.html#python-support are a bit time consuming to edit when adding a new version, for example 3.11:
One option would be to flip it so higher Python versions are on the right. But it still needs a bunch of character dancing, and would also be a bit tricky to edit when rebalancing the two tables - moving some rows from the top table to the bottom table.
CSV table
Another option is to the
.. csv-table::
directive.Docs:
We can then put CSV directly in the RST file, which means there's fewer structure characters that need juggling. For example (and using the comma to help display it more like a table when editing RST):
This is still a bit of a pain to edit.
CSV file
Or we can load them directly from CSV files:
Then it's pretty easy to edit the CSV files in a spreadsheet.
One thing we'd need to watch out for: when opening
newer-versions.csv
, Excel has an annoying habit of converting 3.10 to 3.1, even if it's in the CSV as"3.10"
or'3.10
.Putting this as a draft to compare the different options. Will delete the
[CSV file]
/[table]
bits as well, they're just for visibility during testing.These CSV tables are also render more compactly than the original, which is a nice plus.
Shall we switch to one of these?