From 7a67c695cca2b4f4cd3b96a4bdec98459ccf82ff Mon Sep 17 00:00:00 2001 From: James Tauber Date: Wed, 27 Jul 2016 01:19:01 -0400 Subject: [PATCH] moved modules into container package and bump to version 1.0.0 --- README.md | 12 +++++++++++- docs.rst | 19 ++++++++++--------- extra.rst | 9 +++------ greek_accentuation/__init__.py | 0 .../accentuation.py | 8 ++++---- .../characters.py | 0 .../syllabify.py | 8 ++++---- setup.cfg | 2 ++ setup.py | 6 +++--- 9 files changed, 37 insertions(+), 27 deletions(-) create mode 100644 greek_accentuation/__init__.py rename accentuation.py => greek_accentuation/accentuation.py (95%) rename characters.py => greek_accentuation/characters.py (100%) rename syllabify.py => greek_accentuation/syllabify.py (96%) create mode 100644 setup.cfg diff --git a/README.md b/README.md index 5144c4b..9a43aef 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ For more of my work on Ancient Greek, see . ## Installation - pip install greek-accentuation==0.9.9 + pip install greek-accentuation==1.0.0 ## Documentation @@ -21,6 +21,16 @@ see [docs.rst](https://github.com/jtauber/greek-accentuation/blob/master/docs.rs ## Change Log +### New in 1.0.0 + +* `syllabify.debreath` +* `syllabify.rebreath` +* `syllabify.add_necessary_breathing` can optionally add rough breathing +* `characters.add_breathing` properly handles macrons +* modules moved into `greek_accentuation` package +* universal wheel build + + 0.9.9 removed some unnecessary code 0.9.8 add_necessary_breathing now properly handles initial vowels with iota diff --git a/docs.rst b/docs.rst index f99b067..77ed199 100644 --- a/docs.rst +++ b/docs.rst @@ -6,10 +6,11 @@ Characters ========== ->>> from characters import * +>>> from greek_accentuation.characters import * -The ``characters`` module provides basic analysis and manipulation of Greek -characters in terms of their Unicode diacritics as if decomposed. +The ``greek_accentuation.characters`` module provides basic analysis and +manipulation of Greek characters in terms of their Unicode diacritics as if +decomposed. For example: @@ -90,10 +91,10 @@ circumflex: Syllabify ========= ->>> from syllabify import * +>>> from greek_accentuation.syllabify import * -The ``syllabify`` module provides basic analysis and manipulation of Greek -syllables. +The ``greek_accentuation.syllabify`` module provides basic analysis and +manipulation of Greek syllables. You can syllabify a word with ``syllabify``: @@ -411,10 +412,10 @@ Finally, there are two experimental functions ``morae`` and ``contonation``: Accentuation ============ ->>> from accentuation import * +>>> from greek_accentuation.accentuation import * -The ``accentuation`` module uses the two modules above to analyze and -manipulate the accentuation of Greek words. +The ``greek_accentuation.accentuation`` module uses the two modules above to +analyze and manipulate the accentuation of Greek words. ``get_accent_type`` will return the type of accent on a word (as tuple of diff --git a/extra.rst b/extra.rst index 7dd9a1c..9095692 100644 --- a/extra.rst +++ b/extra.rst @@ -1,6 +1,4 @@ ->>> from characters import add_diacritic, add_breathing ->>> from characters import accent, breathing, length ->>> from characters import LONG, ACUTE, ROUGH, SMOOTH +>>> from greek_accentuation.characters import * >>> a = add_diacritic(add_diacritic(add_diacritic('ι', LONG), ACUTE), ROUGH) >>> a @@ -28,8 +26,7 @@ >>> add_breathing("ῑ", ROUGH) 'ῑ̔' ->>> from syllabify import syllabify, add_necessary_breathing, rebreath ->>> from syllabify import onset, nucleus, coda, onset_nucleus_coda +>>> from greek_accentuation.syllabify import * >>> syllabify('ῑ́̔στην') ['ῑ́̔', 'στην'] @@ -87,7 +84,7 @@ True '' ->>> from accentuation import recessive, add_accent, syllable_add_accent, PAROXYTONE +>>> from greek_accentuation.accentuation import * >>> syllabify('ῑ̔στην') ['ῑ̔', 'στην'] diff --git a/greek_accentuation/__init__.py b/greek_accentuation/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accentuation.py b/greek_accentuation/accentuation.py similarity index 95% rename from accentuation.py rename to greek_accentuation/accentuation.py index 22ccb70..242a012 100644 --- a/accentuation.py +++ b/greek_accentuation/accentuation.py @@ -1,7 +1,7 @@ -from characters import add_diacritic -from characters import ACUTE, CIRCUMFLEX, SHORT, LONG, SMOOTH, ROUGH -from syllabify import onset_nucleus_coda, syllabify, UNKNOWN, syllable_length -from syllabify import syllable_accent, ultima, penult, antepenult +from .characters import add_diacritic +from .characters import ACUTE, CIRCUMFLEX, SHORT, LONG, SMOOTH, ROUGH +from .syllabify import onset_nucleus_coda, syllabify, UNKNOWN, syllable_length +from .syllabify import syllable_accent, ultima, penult, antepenult def syllable_add_accent(s, a): diff --git a/characters.py b/greek_accentuation/characters.py similarity index 100% rename from characters.py rename to greek_accentuation/characters.py diff --git a/syllabify.py b/greek_accentuation/syllabify.py similarity index 96% rename from syllabify.py rename to greek_accentuation/syllabify.py index 3cd02c7..ab2ec6b 100644 --- a/syllabify.py +++ b/greek_accentuation/syllabify.py @@ -1,7 +1,7 @@ -from characters import accent, base, diaeresis, iota_subscript, length -from characters import remove_redundant_macron -from characters import breathing, strip_breathing, add_breathing, SMOOTH, ROUGH -from characters import ACUTE, CIRCUMFLEX, SHORT, LONG +from .characters import accent, base, diaeresis, iota_subscript, length +from .characters import remove_redundant_macron +from .characters import breathing, strip_breathing, add_breathing +from .characters import SMOOTH, ROUGH, ACUTE, CIRCUMFLEX, SHORT, LONG def is_vowel(ch): diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..2a9acf1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal = 1 diff --git a/setup.py b/setup.py index 10cf99d..3042124 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="greek-accentuation", - version="0.9.9", + version="1.0.0", description="""\ Python 3 library for accenting (and analyzing the accentuation of) \ Ancient Greek words""", @@ -10,9 +10,9 @@ url="http://github.com/jtauber/greek-accentuation", author="James Tauber", author_email="jtauber@jtauber.com", - py_modules=["characters", "syllabify", "accentuation"], + packages=["greek_accentuation"], classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4",