FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-66783: Automate update of Unicode data version in documentation by nmassman · Pull Request #17748 · python/cpython · GitHub

Repository navigation

gh-66783: Automate update of Unicode data version in documentation - #17748

Closed
nmassman wants to merge 3 commits into
python:mainfrom
nmassman:fix-issue-22593
Closed

nmassman wants to merge 3 commits into
python:mainfrom
nmassman:fix-issue-22593

Conversation

nmassman commented Dec 30, 2019 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown

Added a sphinx extension and modified makeunicodedata.py to automate updating documentation with the current Unicode version when it changes.

https://bugs.python.org/issue22593

aeros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for the PR @nmassman and welcome!

I agree with the general idea behind the PR, it doesn't seem practical to maintain the latest Unicode version in 6 different locations, or for additional ones that are added in the future.

However, a few points (I might think of more later):

  1. You could store the version as a global constant in conf.py, I don't think we need a dedicated text file just to store the latest unicode version.
  2. UNICODE_VERSION or UCS_VERSION would be a far more explicit name for the constant. As far as I'm aware, "UCD" is not a commonly known acronym for Unicode.
  3. IANAL, but I believe there are legal issues associated with copyrighting your own file additions. Our primary means of providing credit/acknowledgement to contributors these days is by adding a Contributed by <name>. sentence at the end of the news entry for the PR. You can add this in yourself.

/cc @merwok

aeros requested a review from merwok December 30, 2019 06:30
aeros added the docs Documentation in the Doc dir label Dec 30, 2019

nmassman commented Dec 31, 2019 •
edited
Loading

Copy link
Copy Markdown
Author

Thanks for the feedback @aeros

  1. You could store the version as a global constant in conf.py, I don't think we need a dedicated text file just to store the latest unicode version.

I waffled on this a bit, but I went back and took another crack at it. Mostly I wanted to avoid having makeunicodedata.py accidentally mangle conf.py. I think I got it working reliably, though.

  1. UNICODE_VERSION or UCS_VERSION would be a far more explicit name for the constant. As far as I'm aware, "UCD" is not a commonly known acronym for Unicode.

Kinda embarrassed that I didn't clean that up before submitting the PR. I should have slept first. :) I renamed everything to 'UNIDATA_VERSION' to match the original variable in makeunicodedata.py. This could just as easily be changed to 'UNICODE_VERSION', but I erred on the side of staying consistent to what was already in place.

  1. IANAL, but I believe there are legal issues associated with copyrighting your own file additions. Our primary means of providing credit/acknowledgement to contributors these days is by adding a Contributed by <name>. sentence at the end of the news entry for the PR. You can add this in yourself.

I wasn't sure of the convention. I copied the heading format from what was in a few of the other sphinx extensions in the same directory. I inserted the bpo link instead (which was also in one of the other extensions), and updated the news entry.

merwok commented Dec 31, 2019

Copy link
Copy Markdown
Member

I think the comments in the file constitute a change log, not a copyright notice. The copyright situation is already handled by the CLA check, which ensures that the contribution has a suitable license.

It seems OK to me to add a line there, even though there is external history in VCS metadata.

aeros self-requested a review April 17, 2020 03:59

Copy link
Copy Markdown
Member

I feel this would be easier by using rst_prolog like:

rst_prolog = f"""
.. |UNIDATA_VERSION| replace:: {UNIDATA_VERSION}
"""

it would not need an extension.

erlend-aasland changed the title bpo-22593: Automate update of Unicode data version in documentation gh-66783: Automate update of Unicode data version in documentation Jan 5, 2024

Copy link
Copy Markdown
Member

Closing per #66783 (comment)

A

AA-Turner closed this Jan 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL