Repository navigation
Modernize for Python 3.9+ and add DSTU 9112:2021, ALA-LC tables (v2.0) - #11
Merged
Merged
Conversation
…usted publishing - Replace setup.py/setup.cfg with pyproject.toml (version 2.0); this also fixes source builds, which read the long description from README.rst — a file that no longer exists - Drop the Python 2 compatibility shims (unicode_literals, text_type, object-inheriting classes); transliteration tables and behavior unchanged - Add type hints to the public functions and ship a py.typed marker - Run the doctest suite on GitHub Actions against CPython 3.9-3.13 and PyPy - Add publish workflow: build and upload to PyPI via trusted publishing on v* tags or manual dispatch - Refresh README: badges, Python 3.9+ note, changelog Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ha16zNy2fDMdrZBMQGgpBt
- Describe the table interface with a TransliterationTable Protocol and use it in translit()'s signature instead of a bare 'type'; exported for users typing their own tables - Move doctest collection into [tool.pytest.ini_options] so plain pytest runs the suite locally exactly as CI does - Scope the push trigger to master so PR commits run the matrix once, not twice Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ha16zNy2fDMdrZBMQGgpBt
- UkrainianDSTU9112A/B: the current State Standard of Ukraine (2022), including the contextual consonant-й apostrophe rule; outputs cross-validated against the uklatn reference implementation on a real-word corpus and fuzz-tested (divergence only on sequences impossible in Ukrainian orthography, noted in the docstrings) - UkrainianALALC (full, with ligature ties) and UkrainianALALCModified (simplified academic form); RussianALALC - UkrainianBGN2019 / UkrainianUNGEGN aliases of UkrainianKMU, since both bodies adopted the 2010 national system; UkrainianBGN docstring now notes it is the superseded 1965 system - Doctests for every new table; README table lists, credits and changelog updated Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ha16zNy2fDMdrZBMQGgpBt
- UkrainianDSTU9112B references system A's consonant-й SPECIAL_CASES and PATTERN1 rather than repeating them - UkrainianALALCModified reuses UkrainianKMU's DELETE_PATTERN for the soft sign and apostrophe removal Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ha16zNy2fDMdrZBMQGgpBt
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same treatment as visual-logging 2.0, plus new transliteration standards. Existing tables and behavior are unchanged — all doctests pass byte-for-byte.
New transliteration tables
підйом → pid'jom). Outputs cross-validated against the MIT-licensed uklatn reference implementation on a real-word corpus (52/52 exact) and fuzz-tested over 6000 random strings — the only divergences are sequences impossible in Ukrainian orthography (e.g. word-initial soft sign), noted in the docstrings.Знам'янка → Znam'i͡anka) and the simplified academic form (Znamianka).UkrainianKMU: both bodies adopted the 2010 national system as-is.UkrainianBGN(1965) docstring now notes it is superseded.Totals: 17 Ukrainian + 11 russian tables. Every new table has doctests.
Packaging
setup.py/setup.cfgwithpyproject.toml: version 2.0,requires-python >= 3.9,py.typedmarkersetup.pyreads its long description fromREADME.rst, which no longer exists in the repoCode
TransliterationTableProtocol documents the table contract and typestranslit()'s signatureCI / releasing
tests.yml: doctests via pytest (config inpyproject.toml) on CPython 3.9–3.13 and PyPy; push runs scoped to master so PR commits run the matrix oncepublish.yml: PyPI trusted publishing onv*tags or manual dispatch (needs one-time PyPI publisher registration: workflowpublish.yml, environmentpypi)Docs
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ha16zNy2fDMdrZBMQGgpBt