Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace the "Status of the Python branches" table with a csv.#884

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ezio-melotti merged 12 commits intopython:mainfromezio-melotti:branches-csv
Nov 10, 2022

Conversation

ezio-melotti
Copy link
Member

@ezio-melottiezio-melotti commentedJun 6, 2022
edited
Loading

This PRfixes#883.

I kept the Sphinx markup in the csv, or otherwise it would have been lost. The markup should be easy enough to remove while parsing, and it only affects PEPs and dates. I checked if there was a way to include a separate column without markup and then ignore it in the table, but there's no such option.

While I was at it, I also fixed the column widths. Here's a comparison of the result (csv table on top, old one below):

image

Copy link
Member

@MariattaMariatta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The csv table looks much cleaner this way.

@encukou
Copy link
Member

Could you convert the EOL table as well?https://devguide.python.org/devcycle/#end-of-life-branches

Mariatta, ezio-melotti, and erlend-aasland reacted with thumbs up emoji

@ezio-melotti
Copy link
MemberAuthor

If we start adding more csv files, I wonder if it would make sense to add them in a newinclude dir. The reasons for doing this are:

  • if people start using the files now, and then we move them, we will break their scripts;
  • the root dir is already crowded with rst (and other files);
  • I'm planning to add more files inMachine-parsable developers list #848.
zware and CAM-Gerlach reacted with thumbs up emoji

@ezio-melotti
Copy link
MemberAuthor

Relevant discussion about the two tables (cc@hugovk,@encukou):endoflife-date/endoflife.date#711

@ezio-melotti
Copy link
MemberAuthor

I updated the PR to include the end-of-life table, and moved both thecsvs in a newinclude directory.
I'll wait after#901 is done to merge this, as to not create additional conflicts in that PR.

@AA-Turner
Copy link
Member

Doesauto work for widths?

Another option would be to combine the CSVs, and use a very simple extension inconf.py to split them by EOL/active and add the italics -- that would allow for easier parsing for external consumers such as endoflife.date.

A

ezio-melotti and hugovk reacted with thumbs up emoji

@ezio-melotti
Copy link
MemberAuthor

Does auto work for widths?

I can give that a try. I set those widths manually in order to keep each row in a single line (see e.g. the screenshots in the first message).

Another option would be to combine the CSVs,

I'm trying to gather some feedback from the endoflife folks and pydotorg in order to figure out their needs. If it turns out that a single table is better, I can combine them.

and use a very simple extension in conf.py to split them by EOL/active and add the italics -- that would allow for easier parsing for external consumers such as endoflife.date.

What extension? I also don't like too much the rst markup in the csv, especially the:pep:`...`s applied to all the PEPs in the PEP column, but the italic is not applied to all rows and it's easy enough to remove afterwards that it's probably better to keep it there.

@ezio-melotti
Copy link
MemberAuthor

Hmm, locally the tables look fine after removing the:widths:, but onhttps://cpython-devguide--884.org.readthedocs.build/#status-of-python-branches they don't. Here I tested with both Sphinx 5.0.1 and 5.0.2 -- perhaps readthedocs is using an older version?

@CAM-Gerlach
Copy link
Member

CAM-Gerlach commentedJul 6, 2022
edited
Loading

For reference, this is how they look in FF on Windows on the preview.

Screenshot

image

I checked if there was a way to include a separate column without markup and then ignore it in the table, but there's no such option.

You could useSphinx CSV Filter, both to include/exclude specific columns (e.g. with/without markup), and also to only include specific rows (e.g. that are marked EOL or not). That would avoid having to write a custom directive.

ezio-melotti reacted with thumbs up emoji

@ezio-melotti
Copy link
MemberAuthor

I updated the PR after the Devguide reorganization, reintroduced the:widths: to fix the rendering issues and also to make both tables consistent, and fixed a few other minor things.

I'm not sure if it's worth unifying the two CSVs and/or tables, since that adds an extra dependency and complexity.

@CAM-Gerlach
Copy link
Member

I'm not sure if it's worth unifying the two CSVs and/or tables, since that adds an extra dependency and complexity.

You could just put them in the same table, since there's already aStatus column, if there were an easy way to clearly separate supported from unsupported statuses (e.g. by row color). But I'm not sure if there is.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@hugovk
Copy link
Member

I'll wait after#901 is done to merge this, as to not create additional conflicts in that PR.

#901 is now merged.

Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It would be useful to have machine-readable data, for example to automatehttps://python-release-cycle.glitch.me/

JSON would be preferred but CSV should be fine too.

(https://endoflife.date/api/python.json doesn't do prereleases.)

CAM-Gerlach reacted with thumbs up emoji
Copy link
Member

@CAM-GerlachCAM-Gerlach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

A couple updates to the release dates

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
ezio-melottiand others added2 commitsNovember 10, 2022 01:51
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
@ezio-melottiezio-melotti merged commit10cb312 intopython:mainNov 10, 2022
@ezio-melottiezio-melotti deleted the branches-csv branchNovember 10, 2022 03:08
@ezio-melotti
Copy link
MemberAuthor

As discussed in the docs meeting, I now merged this. There are more changes we are considering, e.g. merging the two table or creating a JSON file that is then used to create these CSVs, but those will be handled in separate PRs.

@encukou
Copy link
Member

FWIW, I think the source should be a human-writable format, and we shouldgenerate a JSON for the machines to consume (likehttps://peps.python.org/api/peps.json). And we should tell people to expect the source format to change whenever we feel like it.
(That'll need a Sphinx plugin, but if we want to move the formatting out of the tables, one will be needed anyway.)

ericsnowcurrently and ezio-melotti reacted with thumbs up emoji

@hugovk
Copy link
Member

Thanks! Let's continue onpython/docs-community#67.

encukou and ezio-melotti reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@CAM-GerlachCAM-GerlachCAM-Gerlach left review comments

@hugovkhugovkhugovk approved these changes

@MariattaMariattaMariatta approved these changes

Assignees

@ezio-melottiezio-melotti

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Provide the status of Python branches and versions as a csv
6 participants
@ezio-melotti@encukou@AA-Turner@CAM-Gerlach@hugovk@Mariatta

[8]ページ先頭

©2009-2025 Movatter.jp