diff --git a/.gitignore b/.gitignore index 70bc87a2..04353a44 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .eggs/* *.egg-info *__pycache__ -Lib/languages/_version.py +Lib/gflanguages/_version.py diff --git a/CHANGELOG.md b/CHANGELOG.md index e5a0961f..5cc373f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ Below are the most important changes from each release. ## 0.1.0 (2022-Feb-16) ### Release notes - - Initial release of the `languages` python module. + - Initial release of the `gflanguages` python module. - Most of the code was copied from the `gftools` repository (https://github.com/googlefonts/gftools/) so that language/region/script data can be easily available to all our tools without having to also get the large dependency tree of `gftools`. The most immediate user of this module is `Font Bakery`, which needs to validate language support on font binaries being checked. (see https://github.com/googlefonts/fontbakery/issues/3605) - - The second obvious user of this `languages` module will be `gftools` itself. I'll be sending a pull request soon. - - Language/region/script definitions are still being gradualy updated on the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang) and this `languages` module will try to be kept in sync. + - The second obvious user of this `gflanguages` module will be `gftools` itself. I'll be sending a pull request soon. + - Language/region/script definitions are still being gradualy updated on the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang) and this `gflanguages` module will try to be kept in sync. - Ideally at some point this module would become the main place to update these definitions, avoiding data duplication and guaranteeing uniformity across tools. But that will require coordination with the Google Fonts team, so I hope this module can serve, for now, as a prototype for such proposed integration. diff --git a/README.md b/README.md index d467fba1..3702eb9d 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ This python module provides an API with data about languages/regions/scripts for use in the language-support categorization of the font families in the Google Fonts collection. -You can also directly access the raw **textproto** files on the `Lib/languages/data` directory: -* [`languages`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/languages) -* [`regions`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/regions) -* [`scripts`](https://github.com/felipesanches/languages/tree/main/Lib/languages/data/scripts) +You can also directly access the raw **textproto** files on the `Lib/gflanguages/data` directory: +* [`languages`](https://github.com/felipesanches/gflanguages/tree/main/Lib/gflanguages/data/languages) +* [`regions`](https://github.com/felipesanches/gflanguages/tree/main/Lib/gflanguages/data/regions) +* [`scripts`](https://github.com/felipesanches/gflanguages/tree/main/Lib/gflanguages/data/scripts) Most of the code in this project was copied from the `gftools` repository (https://github.com/googlefonts/gftools/) so that language/region/script data can be easily available to all our tools without having to also get the large dependency tree of `gftools`. The most immediate user of this module is `Font Bakery`, which needs to validate language support on font binaries being checked. (see https://github.com/googlefonts/fontbakery/issues/3605) -The second obvious user of this `languages` module will be `gftools` itself. I'll be sending a pull request soon. +The second obvious user of this `gflanguages` module will be `gftools` itself. I'll be sending a pull request soon. -Language/region/script definitions are still being gradualy updated on the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang) and this `languages` module will try to be kept in sync. +Language/region/script definitions are still being gradualy updated on the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang) and this `gflanguages` module will try to be kept in sync. Ideally at some point this module would become the main place to update these definitions, avoiding data duplication and guaranteeing uniformity across tools. But that will require coordination with the Google Fonts team, so I hope this module can serve, for now, as a prototype for such proposed integration. diff --git a/setup.py b/setup.py index fc5e0ced..a957f10f 100644 --- a/setup.py +++ b/setup.py @@ -23,9 +23,9 @@ long_description = f.read() setup( - name="languages", - use_scm_version={"write_to": "Lib/languages/_version.py"}, - url='https://github.com/felipesanches/languages/', + name="gflanguages", + use_scm_version={"write_to": "Lib/gflanguages/_version.py"}, + url='https://github.com/felipesanches/gflanguages/', description='A python API for evaluating language support in the Google Fonts collection.', long_description=long_description, long_description_content_type='text/markdown', # This is important! @@ -35,8 +35,8 @@ 'Roderick Sheeter'), author_email='dave@lab6.com', package_dir={'': 'Lib'}, - packages=['languages'], - package_data={'languages': [ + packages=['gflanguages'], + package_data={'gflanguages': [ "data/languages/*.textproto", "data/regions/*.textproto", "data/scripts/*.textproto" diff --git a/tests/test_languages_api.py b/tests/test_languages_api.py index 54604a00..1a10ab76 100644 --- a/tests/test_languages_api.py +++ b/tests/test_languages_api.py @@ -1,6 +1,6 @@ import os import pytest -from languages import lang_support +from gflanguages import lang_support def portable_path(p): return os.path.join(*p.split('/')) diff --git a/tox.ini b/tox.ini index 3418ce5a..1d7609ac 100644 --- a/tox.ini +++ b/tox.ini @@ -41,7 +41,7 @@ deps = recommonmark wont_fix = invalid-name,protected-access,too-many-lines maybe_someday = fixme,missing-docstring,line-too-long -commands = pylint --disable={[testenv:pylint]wont_fix},{[testenv:pylint]maybe_someday} Lib/languages +commands = pylint --disable={[testenv:pylint]wont_fix},{[testenv:pylint]maybe_someday} Lib/gflanguages [flake8] select = E,F,W @@ -50,7 +50,7 @@ exclude = # Exclude the entire build directory: build # Exclude these auto-generated files that should not be hand-edited: - Lib/languages/fonts_public_pb2.py, + Lib/gflanguages/fonts_public_pb2.py, # No need to traverse hidden directories such as .git, .tox .*, # Exclude virtual environment directory: @@ -62,7 +62,7 @@ exclude = # The ignore-list below comes from FontBakery linting setup. -# The `languages` module has a much simples codebase, so we may be in much better shape in here. +# The `gflanguages` module has a much simples codebase, so we may be in much better shape in here. # So, perhaps, we could safely enable many of these lint-checks. max-line-length=100 ignore =