Skip to content

Display Greek small letter mu#13668

Merged
bryevdv merged 1 commit intobokeh:branch-3.4from
covracer:13667_fix_mu
Jan 25, 2024
Merged

Display Greek small letter mu#13668
bryevdv merged 1 commit intobokeh:branch-3.4from
covracer:13667_fix_mu

Conversation

@covracer
Copy link
Contributor

@covracer covracer commented Jan 25, 2024

Characters which look the same but have different underlying codes (homographs) are problematic. The abbreviation for microvolts is best represented as μV, using the 0x03bc Greek small letter mu instead of the 0x00b5 Latin Extended micro sign. This aligns with:

Tested on:

  • Chrome, Firefox, Safari on Darwin 23.1.0 arm64

  • Chrome, Edge on Windows 10 x86_64

  • issues: fixes [BUG] Display Greek small letter mu #13667

  • no tests added: enabling RUF001 is probably best considered separately

  • release document entry: none

Characters which look the same but have different underlying codes (homographs)
are problematic. The abbreviation for microvolts is best represented as μV,
using the 0x03bc Greek small letter mu instead of the 0x00b5 Latin Extended
micro sign. This aligns with:
- [The International System of Units (SI) brochure](https://www.bipm.org/documents/20126/41483022/SI-Brochure-9-EN.pdf)
- NFKC normalized [Python code](https://peps.python.org/pep-3131/) and [domain names](https://unicode.org/reports/tr36/)
- Section 2.5 Duplicated Characters of [Unicode Technical Report 25](https://www.unicode.org/reports/tr25/)
- Bokeh's [histogram example](/bokeh/bokeh/tree/branch-3.4/examples/plotting/histogram.py#L44-L57)
- Ruff confusable mapping [updates](https://github.com/astral-sh/ruff/pull/4430/files) (currently in the "preview" stage)

Tested on:
- Chrome, Firefox, Safari on Darwin 23.1.0 arm64
- Chrome, Edge on Windows 10 x86_64
@codecov
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a8c3450) 92.59% compared to head (7c67073) 92.55%.

Additional details and impacted files
@@              Coverage Diff               @@
##           branch-3.4   #13668      +/-   ##
==============================================
- Coverage       92.59%   92.55%   -0.04%     
==============================================
  Files             324      323       -1     
  Lines           20531    20529       -2     
==============================================
- Hits            19010    19001       -9     
- Misses           1521     1528       +7     

@mattpap
Copy link
Contributor

mattpap commented Jan 25, 2024

enabling RUF001 is probably best considered separately

It complains about:

examples/plotting/histogram.py:44:43: RUF001 String contains ambiguous `σ` (GREEK SMALL LETTER SIGMA). Did you mean `o` (LATIN SMALL LETTER O)?
examples/plotting/histogram.py:57:47: RUF001 String contains ambiguous `σ` (GREEK SMALL LETTER SIGMA). Did you mean `o` (LATIN SMALL LETTER O)?

Though that can be silenced by setting allowed-confusables.

@mattpap mattpap added this to the 3.4 milestone Jan 25, 2024
@bryevdv
Copy link
Member

bryevdv commented Jan 25, 2024

Thanks, @covracer

@bryevdv bryevdv merged commit d4bd835 into bokeh:branch-3.4 Jan 25, 2024
@covracer covracer deleted the 13667_fix_mu branch January 26, 2024 00:12
Chiemezuo pushed a commit to Chiemezuo/bokeh that referenced this pull request Aug 27, 2024
Characters which look the same but have different underlying codes (homographs)
are problematic. The abbreviation for microvolts is best represented as μV,
using the 0x03bc Greek small letter mu instead of the 0x00b5 Latin Extended
micro sign. This aligns with:
- [The International System of Units (SI) brochure](https://www.bipm.org/documents/20126/41483022/SI-Brochure-9-EN.pdf)
- NFKC normalized [Python code](https://peps.python.org/pep-3131/) and [domain names](https://unicode.org/reports/tr36/)
- Section 2.5 Duplicated Characters of [Unicode Technical Report 25](https://www.unicode.org/reports/tr25/)
- Bokeh's [histogram example](/bokeh/bokeh/tree/branch-3.4/examples/plotting/histogram.py#L44-L57)
- Ruff confusable mapping [updates](https://github.com/astral-sh/ruff/pull/4430/files) (currently in the "preview" stage)

Tested on:
- Chrome, Firefox, Safari on Darwin 23.1.0 arm64
- Chrome, Edge on Windows 10 x86_64
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Display Greek small letter mu

3 participants