-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Makefile #20
Merged
Merged
Added Makefile #20
Conversation
This file contains 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
RootShinobi
added a commit
that referenced
this pull request
Aug 22, 2023
* context + td * Some improvements - Fixed type-hints - Fixed LazyProxy model serialization - Fixed TextDecoration stub when parse mode is not defined - Click dependency version range changed - Improved FluentToken extractor to parse syntactic sugar like 'i18n.hello.world()' * Fixed typo * fixed typo x2 * ADD FluentMultipleKeyParser ADD BaseFluentKeyParser Refactor FluentKeyParser to use Path instead of str Fix `locale=` in i18n.get(...) not to be gathered by parser Now Parsers accepts `locales`, which will create sub-dirs (eg. `uk`, `en`). If locales is None - no sub-dirs will be created. FluentMultipleKeyParser parses locale-tokens in code and split them by separator. [`token.split(maxsplit=1)`] First element of local-token is used to create sub-ftl-files for them. Also u can pass locales and create sub-dirs with sub-ftl-files. The code was formatted by Black + Ruff. * Update pyproject.toml * Refactored CLI Fixed path building in fluent-token parser * Update tests.yml * + stub tree * + gnutext stub + stubtree * + RedisManager + startup/shutdown for Managers * Linters, reformat code * Update actions * Temporarily enable CI for current branch * Empty-Commit * Disable current branch * Disable ruff for examples * Added pytest-cov * Fixed build command * Remove codecov step * Enable post-install * Fixed check installable on windows * Update aiogram_i18n/cores/fluent_runtime_core.py * + LocaleGetter * Small refactoring & type-hints fix (#19) * Updated pyproject.toml * Code refactoring, fixed type-hints * Added __init__ methods to aiogram_i18n.types * Reformatted aiogram_i18n.types * Replaced "Ellipsis" to "pass" in abstract methods * Reformatted aiogram_i18n/types.py by ruff * 🥴 * stub class_name * SmartGNUTranslations + MemoryManager * Added Makefile (#20) * cleanup stun generator * 1.3 * core optional locale * tests core optional locale * Delete gnu_translations.py * - isort * off multiple extract tests * LazyProxy as filter * + locales map * + types hints fix * + fix * + fix * New exception and mypy issues fix (#21) * Added Makefile * Added 'UnknownLocaleError' exception, fixed mypy issues --------- Co-authored-by: nullmatawasoradesu <119107850+wakaree@users.noreply.github.com> Co-authored-by: andrew000 <11490628+andrew000@users.noreply.github.com> Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
RootShinobi
added a commit
that referenced
this pull request
Aug 22, 2023
* 1.3 (#22) * context + td * Some improvements - Fixed type-hints - Fixed LazyProxy model serialization - Fixed TextDecoration stub when parse mode is not defined - Click dependency version range changed - Improved FluentToken extractor to parse syntactic sugar like 'i18n.hello.world()' * Fixed typo * fixed typo x2 * ADD FluentMultipleKeyParser ADD BaseFluentKeyParser Refactor FluentKeyParser to use Path instead of str Fix `locale=` in i18n.get(...) not to be gathered by parser Now Parsers accepts `locales`, which will create sub-dirs (eg. `uk`, `en`). If locales is None - no sub-dirs will be created. FluentMultipleKeyParser parses locale-tokens in code and split them by separator. [`token.split(maxsplit=1)`] First element of local-token is used to create sub-ftl-files for them. Also u can pass locales and create sub-dirs with sub-ftl-files. The code was formatted by Black + Ruff. * Update pyproject.toml * Refactored CLI Fixed path building in fluent-token parser * Update tests.yml * + stub tree * + gnutext stub + stubtree * + RedisManager + startup/shutdown for Managers * Linters, reformat code * Update actions * Temporarily enable CI for current branch * Empty-Commit * Disable current branch * Disable ruff for examples * Added pytest-cov * Fixed build command * Remove codecov step * Enable post-install * Fixed check installable on windows * Update aiogram_i18n/cores/fluent_runtime_core.py * + LocaleGetter * Small refactoring & type-hints fix (#19) * Updated pyproject.toml * Code refactoring, fixed type-hints * Added __init__ methods to aiogram_i18n.types * Reformatted aiogram_i18n.types * Replaced "Ellipsis" to "pass" in abstract methods * Reformatted aiogram_i18n/types.py by ruff * 🥴 * stub class_name * SmartGNUTranslations + MemoryManager * Added Makefile (#20) * cleanup stun generator * 1.3 * core optional locale * tests core optional locale * Delete gnu_translations.py * - isort * off multiple extract tests * LazyProxy as filter * + locales map * + types hints fix * + fix * + fix * New exception and mypy issues fix (#21) * Added Makefile * Added 'UnknownLocaleError' exception, fixed mypy issues --------- Co-authored-by: nullmatawasoradesu <119107850+wakaree@users.noreply.github.com> Co-authored-by: andrew000 <11490628+andrew000@users.noreply.github.com> Co-authored-by: Alex Root Junior <jroot.junior@gmail.com> * Update python-publish.yml --------- Co-authored-by: nullmatawasoradesu <119107850+wakaree@users.noreply.github.com> Co-authored-by: andrew000 <11490628+andrew000@users.noreply.github.com> Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
RootShinobi
added a commit
that referenced
this pull request
Sep 27, 2023
* context + td * Some improvements - Fixed type-hints - Fixed LazyProxy model serialization - Fixed TextDecoration stub when parse mode is not defined - Click dependency version range changed - Improved FluentToken extractor to parse syntactic sugar like 'i18n.hello.world()' * Fixed typo * fixed typo x2 * ADD FluentMultipleKeyParser ADD BaseFluentKeyParser Refactor FluentKeyParser to use Path instead of str Fix `locale=` in i18n.get(...) not to be gathered by parser Now Parsers accepts `locales`, which will create sub-dirs (eg. `uk`, `en`). If locales is None - no sub-dirs will be created. FluentMultipleKeyParser parses locale-tokens in code and split them by separator. [`token.split(maxsplit=1)`] First element of local-token is used to create sub-ftl-files for them. Also u can pass locales and create sub-dirs with sub-ftl-files. The code was formatted by Black + Ruff. * Update pyproject.toml * Refactored CLI Fixed path building in fluent-token parser * Update tests.yml * + stub tree * + gnutext stub + stubtree * + RedisManager + startup/shutdown for Managers * Linters, reformat code * Update actions * Temporarily enable CI for current branch * Empty-Commit * Disable current branch * Disable ruff for examples * Added pytest-cov * Fixed build command * Remove codecov step * Enable post-install * Fixed check installable on windows * Update aiogram_i18n/cores/fluent_runtime_core.py * + LocaleGetter * Small refactoring & type-hints fix (#19) * Updated pyproject.toml * Code refactoring, fixed type-hints * Added __init__ methods to aiogram_i18n.types * Reformatted aiogram_i18n.types * Replaced "Ellipsis" to "pass" in abstract methods * Reformatted aiogram_i18n/types.py by ruff * 🥴 * stub class_name * SmartGNUTranslations + MemoryManager * Added Makefile (#20) * cleanup stun generator * 1.3 * core optional locale * tests core optional locale * Delete gnu_translations.py * - isort * off multiple extract tests * LazyProxy as filter * + locales map * + types hints fix * + fix * + fix * New exception and mypy issues fix (#21) * Added Makefile * Added 'UnknownLocaleError' exception, fixed mypy issues * Main (#23) * 1.3 (#22) * context + td * Some improvements - Fixed type-hints - Fixed LazyProxy model serialization - Fixed TextDecoration stub when parse mode is not defined - Click dependency version range changed - Improved FluentToken extractor to parse syntactic sugar like 'i18n.hello.world()' * Fixed typo * fixed typo x2 * ADD FluentMultipleKeyParser ADD BaseFluentKeyParser Refactor FluentKeyParser to use Path instead of str Fix `locale=` in i18n.get(...) not to be gathered by parser Now Parsers accepts `locales`, which will create sub-dirs (eg. `uk`, `en`). If locales is None - no sub-dirs will be created. FluentMultipleKeyParser parses locale-tokens in code and split them by separator. [`token.split(maxsplit=1)`] First element of local-token is used to create sub-ftl-files for them. Also u can pass locales and create sub-dirs with sub-ftl-files. The code was formatted by Black + Ruff. * Update pyproject.toml * Refactored CLI Fixed path building in fluent-token parser * Update tests.yml * + stub tree * + gnutext stub + stubtree * + RedisManager + startup/shutdown for Managers * Linters, reformat code * Update actions * Temporarily enable CI for current branch * Empty-Commit * Disable current branch * Disable ruff for examples * Added pytest-cov * Fixed build command * Remove codecov step * Enable post-install * Fixed check installable on windows * Update aiogram_i18n/cores/fluent_runtime_core.py * + LocaleGetter * Small refactoring & type-hints fix (#19) * Updated pyproject.toml * Code refactoring, fixed type-hints * Added __init__ methods to aiogram_i18n.types * Reformatted aiogram_i18n.types * Replaced "Ellipsis" to "pass" in abstract methods * Reformatted aiogram_i18n/types.py by ruff * 🥴 * stub class_name * SmartGNUTranslations + MemoryManager * Added Makefile (#20) * cleanup stun generator * 1.3 * core optional locale * tests core optional locale * Delete gnu_translations.py * - isort * off multiple extract tests * LazyProxy as filter * + locales map * + types hints fix * + fix * + fix * New exception and mypy issues fix (#21) * Added Makefile * Added 'UnknownLocaleError' exception, fixed mypy issues --------- Co-authored-by: nullmatawasoradesu <119107850+wakaree@users.noreply.github.com> Co-authored-by: andrew000 <11490628+andrew000@users.noreply.github.com> Co-authored-by: Alex Root Junior <jroot.junior@gmail.com> * Update python-publish.yml --------- Co-authored-by: nullmatawasoradesu <119107850+wakaree@users.noreply.github.com> Co-authored-by: andrew000 <11490628+andrew000@users.noreply.github.com> Co-authored-by: Alex Root Junior <jroot.junior@gmail.com> * Rework multiple-extract (#24) * Rework multiple-extract Rework FluentTemplateDir Add `--default-ftl-file` parameter to multiple-extract Refactor libcst tree parser to search `Call(func=Name)` such as I18NFormat("Key") Rework `BaseCore._extract_locales` Rework `BaseCore._find_locales` to search files recursively Refactor `FluentCompileCore` to accept `path` argument as `str` or `Path` Refactor `FluentRuntimeCore` to accept `path` argument as `str` or `Path` Refactor `GNUTextCore` to accept `path` argument as `str` or `Path` Optimize directories creation if `create_missing_dirs=True` Add simple test-code Reworked multiple-extract tests Add `C901` to ignore (too complex) * ADD new tests * Rework TMP directories for tests * Update .gitignore * Exclude `tests/data/test_code` from `ruff check` during GH Workflows * Revert "Exclude `tests/data/test_code` from `ruff check` during GH Workflows" This reverts commit 2c2da85. * Make Temporary `test_code` DIR Refactor test_extract.py Refactor test_multiple_extract.py Rename simple_code.py to sample_code.txt * 1.3.1 * pre * fluent fix number * fix --------- Co-authored-by: nullmatawasoradesu <119107850+wakaree@users.noreply.github.com> Co-authored-by: andrew000 <11490628+andrew000@users.noreply.github.com> Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
Merged
RootShinobi
added a commit
that referenced
this pull request
Sep 27, 2023
* context + td * Some improvements - Fixed type-hints - Fixed LazyProxy model serialization - Fixed TextDecoration stub when parse mode is not defined - Click dependency version range changed - Improved FluentToken extractor to parse syntactic sugar like 'i18n.hello.world()' * Fixed typo * fixed typo x2 * ADD FluentMultipleKeyParser ADD BaseFluentKeyParser Refactor FluentKeyParser to use Path instead of str Fix `locale=` in i18n.get(...) not to be gathered by parser Now Parsers accepts `locales`, which will create sub-dirs (eg. `uk`, `en`). If locales is None - no sub-dirs will be created. FluentMultipleKeyParser parses locale-tokens in code and split them by separator. [`token.split(maxsplit=1)`] First element of local-token is used to create sub-ftl-files for them. Also u can pass locales and create sub-dirs with sub-ftl-files. The code was formatted by Black + Ruff. * Update pyproject.toml * Refactored CLI Fixed path building in fluent-token parser * Update tests.yml * + stub tree * + gnutext stub + stubtree * + RedisManager + startup/shutdown for Managers * Linters, reformat code * Update actions * Temporarily enable CI for current branch * Empty-Commit * Disable current branch * Disable ruff for examples * Added pytest-cov * Fixed build command * Remove codecov step * Enable post-install * Fixed check installable on windows * Update aiogram_i18n/cores/fluent_runtime_core.py * + LocaleGetter * Small refactoring & type-hints fix (#19) * Updated pyproject.toml * Code refactoring, fixed type-hints * Added __init__ methods to aiogram_i18n.types * Reformatted aiogram_i18n.types * Replaced "Ellipsis" to "pass" in abstract methods * Reformatted aiogram_i18n/types.py by ruff * 🥴 * stub class_name * SmartGNUTranslations + MemoryManager * Added Makefile (#20) * cleanup stun generator * 1.3 * core optional locale * tests core optional locale * Delete gnu_translations.py * - isort * off multiple extract tests * LazyProxy as filter * + locales map * + types hints fix * + fix * + fix * New exception and mypy issues fix (#21) * Added Makefile * Added 'UnknownLocaleError' exception, fixed mypy issues * Main (#23) * 1.3 (#22) * context + td * Some improvements - Fixed type-hints - Fixed LazyProxy model serialization - Fixed TextDecoration stub when parse mode is not defined - Click dependency version range changed - Improved FluentToken extractor to parse syntactic sugar like 'i18n.hello.world()' * Fixed typo * fixed typo x2 * ADD FluentMultipleKeyParser ADD BaseFluentKeyParser Refactor FluentKeyParser to use Path instead of str Fix `locale=` in i18n.get(...) not to be gathered by parser Now Parsers accepts `locales`, which will create sub-dirs (eg. `uk`, `en`). If locales is None - no sub-dirs will be created. FluentMultipleKeyParser parses locale-tokens in code and split them by separator. [`token.split(maxsplit=1)`] First element of local-token is used to create sub-ftl-files for them. Also u can pass locales and create sub-dirs with sub-ftl-files. The code was formatted by Black + Ruff. * Update pyproject.toml * Refactored CLI Fixed path building in fluent-token parser * Update tests.yml * + stub tree * + gnutext stub + stubtree * + RedisManager + startup/shutdown for Managers * Linters, reformat code * Update actions * Temporarily enable CI for current branch * Empty-Commit * Disable current branch * Disable ruff for examples * Added pytest-cov * Fixed build command * Remove codecov step * Enable post-install * Fixed check installable on windows * Update aiogram_i18n/cores/fluent_runtime_core.py * + LocaleGetter * Small refactoring & type-hints fix (#19) * Updated pyproject.toml * Code refactoring, fixed type-hints * Added __init__ methods to aiogram_i18n.types * Reformatted aiogram_i18n.types * Replaced "Ellipsis" to "pass" in abstract methods * Reformatted aiogram_i18n/types.py by ruff * 🥴 * stub class_name * SmartGNUTranslations + MemoryManager * Added Makefile (#20) * cleanup stun generator * 1.3 * core optional locale * tests core optional locale * Delete gnu_translations.py * - isort * off multiple extract tests * LazyProxy as filter * + locales map * + types hints fix * + fix * + fix * New exception and mypy issues fix (#21) * Added Makefile * Added 'UnknownLocaleError' exception, fixed mypy issues --------- * Update python-publish.yml --------- * Rework multiple-extract (#24) * Rework multiple-extract Rework FluentTemplateDir Add `--default-ftl-file` parameter to multiple-extract Refactor libcst tree parser to search `Call(func=Name)` such as I18NFormat("Key") Rework `BaseCore._extract_locales` Rework `BaseCore._find_locales` to search files recursively Refactor `FluentCompileCore` to accept `path` argument as `str` or `Path` Refactor `FluentRuntimeCore` to accept `path` argument as `str` or `Path` Refactor `GNUTextCore` to accept `path` argument as `str` or `Path` Optimize directories creation if `create_missing_dirs=True` Add simple test-code Reworked multiple-extract tests Add `C901` to ignore (too complex) * ADD new tests * Rework TMP directories for tests * Update .gitignore * Exclude `tests/data/test_code` from `ruff check` during GH Workflows * Revert "Exclude `tests/data/test_code` from `ruff check` during GH Workflows" This reverts commit 2c2da85. * Make Temporary `test_code` DIR Refactor test_extract.py Refactor test_multiple_extract.py Rename simple_code.py to sample_code.txt * 1.3.1 * pre * fluent fix number * fix --------- Co-authored-by: nullmatawasoradesu <119107850+wakaree@users.noreply.github.com> Co-authored-by: andrew000 <11490628+andrew000@users.noreply.github.com> Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
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.
Added Makefile for easier code linting & reformatting