From 86d16c3960d584e0014ffd15aa7ce3e311c83217 Mon Sep 17 00:00:00 2001 From: Hirokazu Kiyomaru Date: Thu, 15 Jun 2023 10:23:09 +0900 Subject: [PATCH 01/52] add djlint to pre-commit hooks --- .pre-commit-config.yaml | 5 ++ src/rhoknp/cli/templates/base.jinja2 | 83 ++++++++++--------- .../components/dependency_parsing.jinja2 | 23 +++-- .../components/discourse_parsing.jinja2 | 48 +++++------ .../cli/templates/components/error.jinja2 | 4 +- .../components/hide_all_button.jinja2 | 10 +-- .../components/morphological_analysis.jinja2 | 43 +++++----- .../named_entity_recognition.jinja2 | 36 ++++---- .../templates/components/raw_output.jinja2 | 20 ++--- .../components/show_all_button.jinja2 | 10 +-- .../components/typo_correction.jinja2 | 34 ++++---- .../components/word_splitting.jinja2 | 27 +++--- src/rhoknp/cli/templates/jumanpp.jinja2 | 16 ++-- src/rhoknp/cli/templates/knp.jinja2 | 24 +++--- src/rhoknp/cli/templates/kwja.jinja2 | 28 +++---- 15 files changed, 205 insertions(+), 206 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19d946de..f43022e1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,3 +49,8 @@ repos: rev: v3.0.0-alpha.9-for-vscode hooks: - id: prettier + - repo: https://github.com/Riverside-Healthcare/djLint + rev: v1.31.0 + hooks: + - id: djlint-jinja + - id: djlint-reformat-jinja diff --git a/src/rhoknp/cli/templates/base.jinja2 b/src/rhoknp/cli/templates/base.jinja2 index ab935b61..22d859c1 100644 --- a/src/rhoknp/cli/templates/base.jinja2 +++ b/src/rhoknp/cli/templates/base.jinja2 @@ -1,41 +1,50 @@ - - - - {{ title }} - - - - - - - - - - - {% include "components/navbar.jinja2" %} -
- {% include "components/form.jinja2" %} - {% if analyzed_document %} -
- {% include "components/raw_input.jinja2" %} -
解析結果
-
- {% include "components/show_all_button.jinja2" %} - {% include "components/hide_all_button.jinja2" %} - {% block result %} - {% endblock %} + + + + + {{ title }} + + + + + + + + + + + {% include "components/navbar.jinja2" %} +
+ {% include "components/form.jinja2" %} + {% if analyzed_document %} +
+ {% include "components/raw_input.jinja2" %} +
解析結果
+
+ {% include "components/show_all_button.jinja2" %} + {% include "components/hide_all_button.jinja2" %} + {% block result %} + {% endblock result %} +
+ {% endif %} + {% if error %} + {% include "components/error.jinja2" %} + {% endif %}
- {% endif %} - {% if error %} - {% include "components/error.jinja2" %} - {% endif %} -
- + diff --git a/src/rhoknp/cli/templates/components/dependency_parsing.jinja2 b/src/rhoknp/cli/templates/components/dependency_parsing.jinja2 index e134cf8b..fb53fcf2 100644 --- a/src/rhoknp/cli/templates/components/dependency_parsing.jinja2 +++ b/src/rhoknp/cli/templates/components/dependency_parsing.jinja2 @@ -1,17 +1,16 @@ -
+
- +
-
+
{{ tree }}
diff --git a/src/rhoknp/cli/templates/components/discourse_parsing.jinja2 b/src/rhoknp/cli/templates/components/discourse_parsing.jinja2 index 971b5fa8..1812718b 100644 --- a/src/rhoknp/cli/templates/components/discourse_parsing.jinja2 +++ b/src/rhoknp/cli/templates/components/discourse_parsing.jinja2 @@ -1,17 +1,15 @@
- +
-
+
@@ -24,20 +22,20 @@ {% for clause in analyzed_document.clauses %} - {% for discourse_relation in clause.discourse_relations %} - - - - - - - {% endfor %} + {% for discourse_relation in clause.discourse_relations %} + + + + + + + {% endfor %} {% endfor %}
{{ discourse_relation.label.value }} - {% if discourse_relation.is_explicit %} - 明示的 - {% else %} - 非明示的 - {% endif %} - {{ discourse_relation.modifier.text }}{{ discourse_relation.head.text }}
{{ discourse_relation.label.value }} + {% if discourse_relation.is_explicit %} + 明示的 + {% else %} + 非明示的 + {% endif %} + {{ discourse_relation.modifier.text }}{{ discourse_relation.head.text }}
diff --git a/src/rhoknp/cli/templates/components/error.jinja2 b/src/rhoknp/cli/templates/components/error.jinja2 index ffdd92e7..392b279a 100644 --- a/src/rhoknp/cli/templates/components/error.jinja2 +++ b/src/rhoknp/cli/templates/components/error.jinja2 @@ -1,5 +1,7 @@ diff --git a/src/rhoknp/cli/templates/components/hide_all_button.jinja2 b/src/rhoknp/cli/templates/components/hide_all_button.jinja2 index 61a07a2f..9f51b3cf 100644 --- a/src/rhoknp/cli/templates/components/hide_all_button.jinja2 +++ b/src/rhoknp/cli/templates/components/hide_all_button.jinja2 @@ -1,7 +1,3 @@ - + diff --git a/src/rhoknp/cli/templates/components/morphological_analysis.jinja2 b/src/rhoknp/cli/templates/components/morphological_analysis.jinja2 index e28f70c4..8e139822 100644 --- a/src/rhoknp/cli/templates/components/morphological_analysis.jinja2 +++ b/src/rhoknp/cli/templates/components/morphological_analysis.jinja2 @@ -1,17 +1,16 @@ -
+
- +
-
+
@@ -28,16 +27,16 @@ {% for morpheme in analyzed_document.morphemes %} - - - - - - - - - - + + + + + + + + + + {% endfor %}
{{ morpheme.text }}{{ morpheme.reading }}{{ morpheme.lemma }}{{ morpheme.pos }}{{ morpheme.subpos }}{{ morpheme.conjtype }}{{ morpheme.conjform }}{{ morpheme.semantics.to_sstring().strip('"') }}
{{ morpheme.text }}{{ morpheme.reading }}{{ morpheme.lemma }}{{ morpheme.pos }}{{ morpheme.subpos }}{{ morpheme.conjtype }}{{ morpheme.conjform }}{{ morpheme.semantics.to_sstring() .strip('"') }}
diff --git a/src/rhoknp/cli/templates/components/named_entity_recognition.jinja2 b/src/rhoknp/cli/templates/components/named_entity_recognition.jinja2 index f886b634..691514a3 100644 --- a/src/rhoknp/cli/templates/components/named_entity_recognition.jinja2 +++ b/src/rhoknp/cli/templates/components/named_entity_recognition.jinja2 @@ -1,27 +1,25 @@
- +
-
+
{% for span in get_entity_spans(analyzed_document) %} - {% if span.label %} - - {{ span.text }} - {{ span.label }} - - {% else %} - {{ span.text }} - {% endif %} + {% if span.label %} + + {{ span.text }} + {{ span.label }} + + {% else %} + {{ span.text }} + {% endif %} {% endfor %}
diff --git a/src/rhoknp/cli/templates/components/raw_output.jinja2 b/src/rhoknp/cli/templates/components/raw_output.jinja2 index b1225991..c6218b85 100644 --- a/src/rhoknp/cli/templates/components/raw_output.jinja2 +++ b/src/rhoknp/cli/templates/components/raw_output.jinja2 @@ -1,17 +1,15 @@
- +
-
+
{{ raw_output }}
diff --git a/src/rhoknp/cli/templates/components/show_all_button.jinja2 b/src/rhoknp/cli/templates/components/show_all_button.jinja2 index eb91691f..5fe4532b 100644 --- a/src/rhoknp/cli/templates/components/show_all_button.jinja2 +++ b/src/rhoknp/cli/templates/components/show_all_button.jinja2 @@ -1,7 +1,3 @@ - + diff --git a/src/rhoknp/cli/templates/components/typo_correction.jinja2 b/src/rhoknp/cli/templates/components/typo_correction.jinja2 index 511110bd..146cf90d 100644 --- a/src/rhoknp/cli/templates/components/typo_correction.jinja2 +++ b/src/rhoknp/cli/templates/components/typo_correction.jinja2 @@ -1,26 +1,24 @@
- +
-
+
{% for diff in get_string_diff(text, analyzed_document.text) %} - {% if diff.label == '+' %} - {{ diff.text }} - {% elif diff.label == '-' %} - {{ diff.text }} - {% else %} - {{ diff.text }} - {% endif %} + {% if diff.label == '+' %} + {{ diff.text }} + {% elif diff.label == '-' %} + {{ diff.text }} + {% else %} + {{ diff.text }} + {% endif %} {% endfor %}
diff --git a/src/rhoknp/cli/templates/components/word_splitting.jinja2 b/src/rhoknp/cli/templates/components/word_splitting.jinja2 index ce9f040d..d523599a 100644 --- a/src/rhoknp/cli/templates/components/word_splitting.jinja2 +++ b/src/rhoknp/cli/templates/components/word_splitting.jinja2 @@ -1,17 +1,18 @@ -
+
- +
-
-
{% for morpheme in analyzed_document.morphemes %}{{ morpheme.text + " " }}{% endfor %}
+
+
+ {% for morpheme in analyzed_document.morphemes %}{{ morpheme.text + " " }}{% endfor %} +
diff --git a/src/rhoknp/cli/templates/jumanpp.jinja2 b/src/rhoknp/cli/templates/jumanpp.jinja2 index ce3b8c62..77266052 100644 --- a/src/rhoknp/cli/templates/jumanpp.jinja2 +++ b/src/rhoknp/cli/templates/jumanpp.jinja2 @@ -1,10 +1,10 @@ {% extends "base.jinja2" %} {% block result %} -
- {% include "components/word_splitting.jinja2" %} - {% include "components/morphological_analysis.jinja2" %} - {% with raw_output = analyzed_document.to_jumanpp() %} - {% include "components/raw_output.jinja2" %} - {% endwith %} -
-{% endblock %} +
+ {% include "components/word_splitting.jinja2" %} + {% include "components/morphological_analysis.jinja2" %} + {% with raw_output = analyzed_document.to_jumanpp() %} + {% include "components/raw_output.jinja2" %} + {% endwith %} +
+{% endblock result %} diff --git a/src/rhoknp/cli/templates/knp.jinja2 b/src/rhoknp/cli/templates/knp.jinja2 index 54172a27..e89993e3 100644 --- a/src/rhoknp/cli/templates/knp.jinja2 +++ b/src/rhoknp/cli/templates/knp.jinja2 @@ -1,14 +1,14 @@ {% extends "base.jinja2" %} {% block result %} -
- {% include "components/word_splitting.jinja2" %} - {% include "components/morphological_analysis.jinja2" %} - {% with tree = draw_tree(analyzed_document, show_pas=True) %} - {% include "components/dependency_parsing.jinja2" %} - {% endwith %} - {% include "components/discourse_parsing.jinja2" %} - {% with raw_output = analyzed_document.to_knp() %} - {% include "components/raw_output.jinja2" %} - {% endwith %} -
-{% endblock %} +
+ {% include "components/word_splitting.jinja2" %} + {% include "components/morphological_analysis.jinja2" %} + {% with tree = draw_tree(analyzed_document, show_pas=True) %} + {% include "components/dependency_parsing.jinja2" %} + {% endwith %} + {% include "components/discourse_parsing.jinja2" %} + {% with raw_output = analyzed_document.to_knp() %} + {% include "components/raw_output.jinja2" %} + {% endwith %} +
+{% endblock result %} diff --git a/src/rhoknp/cli/templates/kwja.jinja2 b/src/rhoknp/cli/templates/kwja.jinja2 index 4c3589ba..27f76ab7 100644 --- a/src/rhoknp/cli/templates/kwja.jinja2 +++ b/src/rhoknp/cli/templates/kwja.jinja2 @@ -1,16 +1,16 @@ {% extends "base.jinja2" %} {% block result %} -
- {% include "components/typo_correction.jinja2" %} - {% include "components/word_splitting.jinja2" %} - {% include "components/morphological_analysis.jinja2" %} - {% include "components/named_entity_recognition.jinja2" %} - {% with tree = draw_tree(analyzed_document, show_rel=True) %} - {% include "components/dependency_parsing.jinja2" %} - {% endwith %} - {% include "components/discourse_parsing.jinja2" %} - {% with raw_output = analyzed_document.to_knp() %} - {% include "components/raw_output.jinja2" %} - {% endwith %} -
-{% endblock %} +
+ {% include "components/typo_correction.jinja2" %} + {% include "components/word_splitting.jinja2" %} + {% include "components/morphological_analysis.jinja2" %} + {% include "components/named_entity_recognition.jinja2" %} + {% with tree = draw_tree(analyzed_document, show_rel=True) %} + {% include "components/dependency_parsing.jinja2" %} + {% endwith %} + {% include "components/discourse_parsing.jinja2" %} + {% with raw_output = analyzed_document.to_knp() %} + {% include "components/raw_output.jinja2" %} + {% endwith %} +
+{% endblock result %} From d8395f4f3893b5447ac62d0d336ebf3d8f4b1fcf Mon Sep 17 00:00:00 2001 From: nobu-g Date: Mon, 26 Jun 2023 14:31:08 +0900 Subject: [PATCH 02/52] fix Dependabot auto-merge --- .github/workflows/dependabot-auto-merge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 566abcff..72223dc7 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -20,8 +20,8 @@ jobs: uses: lewagon/wait-on-check-action@v1.3.1 with: ref: ${{ github.event.pull_request.head.sha }} - running-workflow-name: "Test" # the name of the required check - # check-regexp: Run tests with pytest.* # this condition is also possible + # running-workflow-name: "Test" # the name of the required check + check-regexp: Run tests with pytest.* # this condition is also possible repo-token: ${{ secrets.GITHUB_TOKEN }} wait-interval: 60 # Check every 60 seconds - name: Enable auto-merge for Dependabot PRs From b93dd4b234f94e54d7808f183be6f36e4dd50b17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 06:05:15 +0000 Subject: [PATCH 03/52] Bump pytest from 7.3.2 to 7.4.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.2 to 7.4.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.3.2...7.4.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 100 +++++----------------------------------------------- 1 file changed, 8 insertions(+), 92 deletions(-) diff --git a/poetry.lock b/poetry.lock index ab1e41c3..5c989475 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. [[package]] name = "alabaster" version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -16,7 +15,6 @@ files = [ name = "anyio" version = "3.7.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -39,7 +37,6 @@ trio = ["trio (<0.22)"] name = "appnope" version = "0.1.3" description = "Disable App Nap on macOS >= 10.9" -category = "dev" optional = false python-versions = "*" files = [ @@ -51,7 +48,6 @@ files = [ name = "asttokens" version = "2.2.1" description = "Annotate AST trees with source code positions" -category = "dev" optional = false python-versions = "*" files = [ @@ -69,7 +65,6 @@ test = ["astroid", "pytest"] name = "babel" version = "2.12.1" description = "Internationalization utilities" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -84,7 +79,6 @@ pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} name = "backcall" version = "0.2.0" description = "Specifications for callback functions passed in to an API" -category = "dev" optional = false python-versions = "*" files = [ @@ -96,7 +90,6 @@ files = [ name = "beautifulsoup4" version = "4.12.2" description = "Screen-scraping library" -category = "dev" optional = false python-versions = ">=3.6.0" files = [ @@ -115,7 +108,6 @@ lxml = ["lxml"] name = "cached-property" version = "1.5.2" description = "A decorator for caching properties in classes." -category = "main" optional = false python-versions = "*" files = [ @@ -127,7 +119,6 @@ files = [ name = "certifi" version = "2023.5.7" description = "Python package for providing Mozilla's CA Bundle." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -139,7 +130,6 @@ files = [ name = "charset-normalizer" version = "3.1.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "dev" optional = false python-versions = ">=3.7.0" files = [ @@ -224,7 +214,6 @@ files = [ name = "click" version = "8.1.3" description = "Composable command line interface toolkit" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -240,7 +229,6 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -252,7 +240,6 @@ files = [ name = "coverage" version = "7.2.7" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -328,7 +315,6 @@ toml = ["tomli"] name = "decorator" version = "5.1.1" description = "Decorators for Humans" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -340,7 +326,6 @@ files = [ name = "docutils" version = "0.19" description = "Docutils -- Python Documentation Utilities" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -352,7 +337,6 @@ files = [ name = "exceptiongroup" version = "1.1.1" description = "Backport of PEP 654 (exception groups)" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -367,7 +351,6 @@ test = ["pytest (>=6)"] name = "executing" version = "1.2.0" description = "Get the currently executing AST node of a frame, and other information" -category = "dev" optional = false python-versions = "*" files = [ @@ -382,7 +365,6 @@ tests = ["asttokens", "littleutils", "pytest", "rich"] name = "fastapi" version = "0.97.0" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -401,7 +383,6 @@ all = ["email-validator (>=1.1.1)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)" name = "furo" version = "2023.3.27" description = "A clean customisable Sphinx documentation theme." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -419,7 +400,6 @@ sphinx-basic-ng = "*" name = "furo" version = "2023.5.20" description = "A clean customisable Sphinx documentation theme." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -437,7 +417,6 @@ sphinx-basic-ng = "*" name = "h11" version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -452,7 +431,6 @@ typing-extensions = {version = "*", markers = "python_version < \"3.8\""} name = "httpcore" version = "0.17.2" description = "A minimal low-level HTTP client." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -464,17 +442,16 @@ files = [ anyio = ">=3.0,<5.0" certifi = "*" h11 = ">=0.13,<0.15" -sniffio = ">=1.0.0,<2.0.0" +sniffio = "==1.*" [package.extras] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "httpx" version = "0.24.1" description = "The next generation HTTP client." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -490,15 +467,14 @@ sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -510,7 +486,6 @@ files = [ name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -522,7 +497,6 @@ files = [ name = "importlib-metadata" version = "6.6.0" description = "Read metadata from Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -543,7 +517,6 @@ testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packag name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -555,7 +528,6 @@ files = [ name = "ipdb" version = "0.13.13" description = "IPython-enabled pdb" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -572,7 +544,6 @@ tomli = {version = "*", markers = "python_version > \"3.6\" and python_version < name = "ipython" version = "7.34.0" description = "IPython: Productive Interactive Computing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -609,7 +580,6 @@ test = ["ipykernel", "nbformat", "nose (>=0.10.1)", "numpy (>=1.17)", "pygments" name = "ipython" version = "8.12.2" description = "IPython: Productive Interactive Computing" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -649,7 +619,6 @@ test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pa name = "ipython" version = "8.14.0" description = "IPython: Productive Interactive Computing" -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -689,7 +658,6 @@ test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pa name = "jedi" version = "0.18.2" description = "An autocompletion tool for Python that can be used for text editors." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -709,7 +677,6 @@ testing = ["Django (<3.1)", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -727,7 +694,6 @@ i18n = ["Babel (>=2.7)"] name = "markdown-it-py" version = "2.2.0" description = "Python port of markdown-it. Markdown parsing, done right!" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -753,7 +719,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "markupsafe" version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -813,7 +778,6 @@ files = [ name = "matplotlib-inline" version = "0.1.6" description = "Inline Matplotlib backend for Jupyter" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -828,7 +792,6 @@ traitlets = "*" name = "mdit-py-plugins" version = "0.3.5" description = "Collection of plugins for markdown-it-py" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -848,7 +811,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "mdurl" version = "0.1.2" description = "Markdown URL utilities" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -860,7 +822,6 @@ files = [ name = "myst-parser" version = "1.0.0" description = "An extended [CommonMark](https://spec.commonmark.org/) compliant parser," -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -888,7 +849,6 @@ testing-docutils = ["pygments", "pytest (>=7,<8)", "pytest-param-files (>=0.3.4, name = "packaging" version = "23.1" description = "Core utilities for Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -900,7 +860,6 @@ files = [ name = "parso" version = "0.8.3" description = "A Python Parser" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -916,7 +875,6 @@ testing = ["docopt", "pytest (<6.0.0)"] name = "pexpect" version = "4.8.0" description = "Pexpect allows easy control of interactive console applications." -category = "dev" optional = false python-versions = "*" files = [ @@ -931,7 +889,6 @@ ptyprocess = ">=0.5" name = "pickleshare" version = "0.7.5" description = "Tiny 'shelve'-like database with concurrency support" -category = "dev" optional = false python-versions = "*" files = [ @@ -943,7 +900,6 @@ files = [ name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -962,7 +918,6 @@ testing = ["pytest", "pytest-benchmark"] name = "prompt-toolkit" version = "3.0.38" description = "Library for building powerful interactive command lines in Python" -category = "dev" optional = false python-versions = ">=3.7.0" files = [ @@ -977,7 +932,6 @@ wcwidth = "*" name = "ptyprocess" version = "0.7.0" description = "Run a subprocess in a pseudo terminal" -category = "dev" optional = false python-versions = "*" files = [ @@ -989,7 +943,6 @@ files = [ name = "pure-eval" version = "0.2.2" description = "Safely evaluate AST nodes without side effects" -category = "dev" optional = false python-versions = "*" files = [ @@ -1004,7 +957,6 @@ tests = ["pytest"] name = "pydantic" version = "1.10.9" description = "Data validation and settings management using python type hints" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1057,7 +1009,6 @@ email = ["email-validator (>=1.0.3)"] name = "pygments" version = "2.15.1" description = "Pygments is a syntax highlighting package written in Python." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1070,14 +1021,13 @@ plugins = ["importlib-metadata"] [[package]] name = "pytest" -version = "7.3.2" +version = "7.4.0" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.3.2-py3-none-any.whl", hash = "sha256:cdcbd012c9312258922f8cd3f1b62a6580fdced17db6014896053d47cddf9295"}, - {file = "pytest-7.3.2.tar.gz", hash = "sha256:ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b"}, + {file = "pytest-7.4.0-py3-none-any.whl", hash = "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32"}, + {file = "pytest-7.4.0.tar.gz", hash = "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a"}, ] [package.dependencies] @@ -1096,7 +1046,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-cov" version = "4.1.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1115,7 +1064,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "pytz" version = "2023.3" description = "World timezone definitions, modern and historical" -category = "dev" optional = false python-versions = "*" files = [ @@ -1127,7 +1075,6 @@ files = [ name = "pyyaml" version = "6.0" description = "YAML parser and emitter for Python" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1177,7 +1124,6 @@ files = [ name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1199,7 +1145,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rich" version = "13.4.2" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -category = "main" optional = true python-versions = ">=3.7.0" files = [ @@ -1219,7 +1164,6 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] name = "setuptools" version = "67.8.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1236,7 +1180,6 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1248,7 +1191,6 @@ files = [ name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1260,7 +1202,6 @@ files = [ name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "dev" optional = false python-versions = "*" files = [ @@ -1272,7 +1213,6 @@ files = [ name = "soupsieve" version = "2.4.1" description = "A modern CSS selector implementation for Beautiful Soup." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1284,7 +1224,6 @@ files = [ name = "sphinx" version = "5.3.0" description = "Python documentation generator" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1320,7 +1259,6 @@ test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"] name = "sphinx" version = "6.2.1" description = "Python documentation generator" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1356,7 +1294,6 @@ test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] name = "sphinx-basic-ng" version = "1.0.0b1" description = "A modern skeleton for Sphinx themes." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1374,7 +1311,6 @@ docs = ["furo", "ipython", "myst-parser", "sphinx-copybutton", "sphinx-inline-ta name = "sphinx-copybutton" version = "0.5.2" description = "Add a copy button to each of your code cells." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1393,7 +1329,6 @@ rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme", "sphinx-examples"] name = "sphinx-prompt" version = "1.5.0" description = "Sphinx directive to add unselectable prompt" -category = "dev" optional = false python-versions = "*" files = [ @@ -1408,7 +1343,6 @@ Sphinx = "*" name = "sphinxcontrib-applehelp" version = "1.0.2" description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1424,7 +1358,6 @@ test = ["pytest"] name = "sphinxcontrib-applehelp" version = "1.0.4" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1440,7 +1373,6 @@ test = ["pytest"] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1456,7 +1388,6 @@ test = ["pytest"] name = "sphinxcontrib-htmlhelp" version = "2.0.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1472,7 +1403,6 @@ test = ["html5lib", "pytest"] name = "sphinxcontrib-htmlhelp" version = "2.0.1" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1488,7 +1418,6 @@ test = ["html5lib", "pytest"] name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1503,7 +1432,6 @@ test = ["flake8", "mypy", "pytest"] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1519,7 +1447,6 @@ test = ["pytest"] name = "sphinxcontrib-serializinghtml" version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1535,7 +1462,6 @@ test = ["pytest"] name = "stack-data" version = "0.6.2" description = "Extract data from python stack frames and tracebacks for informative displays" -category = "dev" optional = false python-versions = "*" files = [ @@ -1555,7 +1481,6 @@ tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] name = "starlette" version = "0.27.0" description = "The little ASGI library that shines." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1574,7 +1499,6 @@ full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart", "pyyam name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1586,7 +1510,6 @@ files = [ name = "traitlets" version = "5.9.0" description = "Traitlets Python configuration system" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1602,7 +1525,6 @@ test = ["argcomplete (>=2.0)", "pre-commit", "pytest", "pytest-mock"] name = "typer" version = "0.8.0" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -1623,7 +1545,6 @@ test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6. name = "typer" version = "0.9.0" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -1645,7 +1566,6 @@ test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6. name = "typing-extensions" version = "4.6.3" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1657,7 +1577,6 @@ files = [ name = "urllib3" version = "2.0.3" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1675,7 +1594,6 @@ zstd = ["zstandard (>=0.18.0)"] name = "uvicorn" version = "0.22.0" description = "The lightning-fast ASGI server." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1695,7 +1613,6 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", name = "wcwidth" version = "0.2.6" description = "Measures the displayed width of unicode strings in a terminal" -category = "dev" optional = false python-versions = "*" files = [ @@ -1707,7 +1624,6 @@ files = [ name = "zipp" version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.7" files = [ From 115ce70fe0e6aba86cc6d42e38c0dcf2fe3ae76a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 06:19:30 +0000 Subject: [PATCH 04/52] Bump importlib-metadata from 6.6.0 to 6.7.0 Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 6.6.0 to 6.7.0. - [Release notes](https://github.com/python/importlib_metadata/releases) - [Changelog](https://github.com/python/importlib_metadata/blob/main/CHANGES.rst) - [Commits](https://github.com/python/importlib_metadata/compare/v6.6.0...v6.7.0) --- updated-dependencies: - dependency-name: importlib-metadata dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5c989475..a8bdec94 100644 --- a/poetry.lock +++ b/poetry.lock @@ -495,13 +495,13 @@ files = [ [[package]] name = "importlib-metadata" -version = "6.6.0" +version = "6.7.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.7" files = [ - {file = "importlib_metadata-6.6.0-py3-none-any.whl", hash = "sha256:43dd286a2cd8995d5eaef7fee2066340423b818ed3fd70adf0bad5f1fac53fed"}, - {file = "importlib_metadata-6.6.0.tar.gz", hash = "sha256:92501cdf9cc66ebd3e612f1b4f0c0765dfa42f0fa38ffb319b6bd84dd675d705"}, + {file = "importlib_metadata-6.7.0-py3-none-any.whl", hash = "sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5"}, + {file = "importlib_metadata-6.7.0.tar.gz", hash = "sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4"}, ] [package.dependencies] @@ -511,7 +511,7 @@ zipp = ">=0.5" [package.extras] docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] [[package]] name = "iniconfig" From 317a14d8a643b860b568ccf2865b49dfe91eea19 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Mon, 26 Jun 2023 15:23:39 +0900 Subject: [PATCH 05/52] change dependabot interval to weekly --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4206323c..d4abccfa 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,7 +8,7 @@ updates: - package-ecosystem: "pip" directory: "/" schedule: - interval: "daily" # TODO: Change to "monthly" + interval: "weekly" # TODO: Change to "monthly" timezone: "Asia/Tokyo" target-branch: "develop" ignore: From 6234782e4a869ccd15e88bf581548948e7fcc918 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Mon, 26 Jun 2023 15:23:52 +0900 Subject: [PATCH 06/52] tweak --- .github/workflows/dependabot-auto-merge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 72223dc7..c3276cdb 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -20,8 +20,8 @@ jobs: uses: lewagon/wait-on-check-action@v1.3.1 with: ref: ${{ github.event.pull_request.head.sha }} - # running-workflow-name: "Test" # the name of the required check - check-regexp: Run tests with pytest.* # this condition is also possible + # running-workflow-name: "Test" # this condition does not work + check-regexp: Run tests with pytest.* repo-token: ${{ secrets.GITHUB_TOKEN }} wait-interval: 60 # Check every 60 seconds - name: Enable auto-merge for Dependabot PRs From 437249ef0b88b57224185e281e88c7e527bce26e Mon Sep 17 00:00:00 2001 From: nobu-g Date: Mon, 26 Jun 2023 15:28:05 +0900 Subject: [PATCH 07/52] update pre-commit hooks --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f43022e1..d24f6d85 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: hooks: - id: absolufy-imports - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.3.0 + rev: v1.4.0 hooks: - id: mypy additional_dependencies: @@ -36,7 +36,7 @@ repos: - fastapi - markdown-it-py==2.2.0 - repo: https://github.com/asottile/pyupgrade - rev: v3.6.0 + rev: v3.7.0 hooks: - id: pyupgrade args: From 098787a4d06e50a87f8bba91ad691f386833dc45 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Mon, 26 Jun 2023 15:33:54 +0900 Subject: [PATCH 08/52] remove obsolete cache workflow --- .github/workflows/test.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 12ad6bb3..cc78a94d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,11 +31,6 @@ jobs: run: echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Install dependencies run: poetry install --no-interaction --without dev,docs --extras=cli - - name: Cache KWJA checkpoints - uses: actions/cache@v3 - with: - path: /tmp/kwja - key: kwja-${{ env.KWJA_VERSION }} - name: Run tests with KWJA # KWJA does not support Python 3.7 if: ${{ matrix.python-version != 3.7 }} From 871e90df27edb70f06b382f0ed91ea5e93f4950b Mon Sep 17 00:00:00 2001 From: nobu-g Date: Mon, 26 Jun 2023 15:39:52 +0900 Subject: [PATCH 09/52] drop Python 3.7 from dev dependencies due to CVE-2023-24816 --- poetry.lock | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index a8bdec94..6a16ed5a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1641,4 +1641,4 @@ cli = ["PyYAML", "fastapi", "jinja2", "rich", "typer", "typer", "uvicorn"] [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "e0a9f1ad53f73268006f9983519e689eaacb2b0e3d55c42e3201a0814dc9a33f" +content-hash = "b240e9ef79587c5339396af9b3c235d245c9890a02514dc8709b1812e925ae94" diff --git a/pyproject.toml b/pyproject.toml index 186fb33e..c14f34e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,8 +27,8 @@ fastapi = { version = ">=0.92.0,<1", optional = true } jinja2 = { version = "^3.1", optional = true } [tool.poetry.group.dev.dependencies] +python = "^3.8" ipython = [ - { version = "^7.34", python = "<3.8" }, { version = "~8.12.1", python = "3.8" }, { version = "^8.13", python = ">=3.9" }, ] From 213c5b8647a378305aef5a39156a855743faca64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 06:41:10 +0000 Subject: [PATCH 10/52] Bump fastapi from 0.97.0 to 0.98.0 Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.97.0 to 0.98.0. - [Release notes](https://github.com/tiangolo/fastapi/releases) - [Commits](https://github.com/tiangolo/fastapi/compare/0.97.0...0.98.0) --- updated-dependencies: - dependency-name: fastapi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6a16ed5a..9db5b094 100644 --- a/poetry.lock +++ b/poetry.lock @@ -363,13 +363,13 @@ tests = ["asttokens", "littleutils", "pytest", "rich"] [[package]] name = "fastapi" -version = "0.97.0" +version = "0.98.0" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = true python-versions = ">=3.7" files = [ - {file = "fastapi-0.97.0-py3-none-any.whl", hash = "sha256:95d757511c596409930bd20673358d4a4d709004edb85c5d24d6ffc48fabcbf2"}, - {file = "fastapi-0.97.0.tar.gz", hash = "sha256:b53248ee45f64f19bb7600953696e3edf94b0f7de94df1e5433fc5c6136fa986"}, + {file = "fastapi-0.98.0-py3-none-any.whl", hash = "sha256:f4165fb1fe3610c52cb1b8282c1480de9c34bc270f56a965aa93a884c350d605"}, + {file = "fastapi-0.98.0.tar.gz", hash = "sha256:0d3c18886f652038262b5898fec6b09f4ca92ee23e9d9b1d1d24e429f84bf27b"}, ] [package.dependencies] From 2442adf2f86258afe81c58b0a82f8c34156e9048 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Mon, 26 Jun 2023 20:44:06 +0900 Subject: [PATCH 11/52] support --tasks senter,char and --tasks senter option in KWJA #107 --- src/rhoknp/processors/kwja.py | 68 ++++++++++++++++++++++-- tests/processors/test_kwja.py | 97 ++++++++++++++++++++++++----------- 2 files changed, 130 insertions(+), 35 deletions(-) diff --git a/src/rhoknp/processors/kwja.py b/src/rhoknp/processors/kwja.py index 7f9fda69..b9abe85b 100644 --- a/src/rhoknp/processors/kwja.py +++ b/src/rhoknp/processors/kwja.py @@ -5,7 +5,7 @@ from typing import List, Optional, Union from rhoknp.processors.processor import Processor -from rhoknp.units import Document, Sentence +from rhoknp.units import Document, Morpheme, Sentence logger = logging.getLogger(__name__) @@ -41,9 +41,10 @@ def __init__( self._output_format = "knp" elif "char" in tasks: self._output_format = "words" - raise ValueError(f"`--tasks {','.join(tasks)}` option is not supported yet in rhoknp.") elif "seq2seq" in tasks: - self._output_format = "seq2seq" + self._output_format = "jumanpp" + elif "senter" in tasks: + self._output_format = "line_by_line" elif "typo" in tasks: self._output_format = "raw" else: @@ -95,8 +96,29 @@ def apply_to_document(self, document: Union[Document, str]) -> Document: out_text += line if self._output_format == "raw": return Document.from_raw_text(out_text) - elif self._output_format == "seq2seq": + elif self._output_format == "line_by_line": + return Document.from_line_by_line_text(out_text) + elif self._output_format == "jumanpp": return Document.from_jumanpp(out_text) + elif self._output_format == "words": + document = Document() + sentences = [] + sentence_lines: List[str] = [] + for line in out_text.split("\n"): + if line.strip() == "": + continue + if Sentence.is_comment_line(line) and sentence_lines: + sentences.append( + self._create_sentence_from_words_format("\n".join(sentence_lines) + "\n", post_init=False) + ) + sentence_lines = [] + sentence_lines.append(line) + sentences.append( + self._create_sentence_from_words_format("\n".join(sentence_lines) + "\n", post_init=False) + ) + document.sentences = sentences + document.__post_init__() + return document else: assert self._output_format == "knp" return Document.from_knp(out_text) @@ -129,12 +151,48 @@ def apply_to_sentence(self, sentence: Union[Sentence, str]) -> Sentence: out_text += line if self._output_format == "raw": return Sentence.from_raw_text(out_text) - elif self._output_format == "seq2seq": + elif self._output_format == "line_by_line": + return Sentence.from_raw_text(out_text) + elif self._output_format == "jumanpp": return Sentence.from_jumanpp(out_text) + elif self._output_format == "words": + return self._create_sentence_from_words_format(out_text) else: assert self._output_format == "knp" return Sentence.from_knp(out_text) + @staticmethod + def _create_sentence_from_words_format(text: str, post_init: bool = True) -> Sentence: + sentence = Sentence() + morphemes: List[Morpheme] = [] + for line in text.split("\n"): + if line.strip() == "": + continue + if Sentence.is_comment_line(line): + sentence.comment = line + continue + words: List[str] = line.split(" ") + morphemes += [ + Morpheme( + text=word, + reading="*", + lemma="*", + pos="未定義語", + pos_id=15, + subpos="その他", + subpos_id=1, + conjtype="*", + conjtype_id=0, + conjform="*", + conjform_id=0, + ) + for word in words + ] + sentence.morphemes = morphemes + if post_init is True: + sentence.__post_init__() + return sentence + def get_version(self) -> str: """Juman++ のバージョンを返す.""" if not self.is_available(): diff --git a/tests/processors/test_kwja.py b/tests/processors/test_kwja.py index da342945..0f17b735 100644 --- a/tests/processors/test_kwja.py +++ b/tests/processors/test_kwja.py @@ -7,13 +7,47 @@ from rhoknp.cli.serve import AnalyzerType, create_app +@pytest.fixture +def kwja() -> Generator[KWJA, None, None]: + yield KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) + + +def test_get_version() -> None: + kwja = KWJA() + _ = kwja.get_version() + + +def test_is_available(kwja: KWJA) -> None: + assert kwja.is_available() is True + + kwja = KWJA("kwjaaaaaaaaaaaaaaaaa") + assert kwja.is_available() is False + + with pytest.raises(RuntimeError): + _ = kwja.apply_to_sentence("test") + + with pytest.raises(RuntimeError): + _ = kwja.apply_to_document("test") + + with pytest.raises(RuntimeError): + _ = kwja.get_version() + + def test_typo() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "typo"]) text = "人口知能" + for doc_or_sent in (kwja.apply_to_document(text), kwja.apply_to_sentence(text)): + assert doc_or_sent.text == "人工知能" + + +def test_senter() -> None: + kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter"]) + text = "こんにちは。さようなら。" document = kwja.apply_to_document(text) - sentence = kwja.apply_to_sentence(text) - assert document.text == "人工知能" - assert sentence.text == "人工知能" + sentences = document.sentences + assert len(sentences) == 2 + assert sentences[0].text == "こんにちは。" + assert sentences[1].text == "さようなら。" def test_seq2seq() -> None: @@ -27,9 +61,36 @@ def test_seq2seq() -> None: assert morpheme.text == morpheme.reading == morpheme.lemma == "こんにちは" -@pytest.fixture() -def kwja() -> Generator[KWJA, None, None]: - yield KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) +def test_char() -> None: + kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char"]) + text = "こんにちは" + for doc_or_sent in (kwja.apply_to_document(text), kwja.apply_to_sentence(text)): + assert isinstance(doc_or_sent, (Document, Sentence)) + morphemes = doc_or_sent.morphemes + assert len(morphemes) > 0 + morpheme = morphemes[0] + assert text.startswith(morpheme.text) + assert morpheme.reading == "*" + assert morpheme.lemma == "*" + + +def test_word() -> None: + kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) + text = "こんにちは" + for doc_or_sent in (kwja.apply_to_document(text), kwja.apply_to_sentence(text)): + assert isinstance(doc_or_sent, (Document, Sentence)) + morphemes = doc_or_sent.morphemes + assert len(morphemes) > 0 + assert text.startswith(morphemes[0].text) + base_phrases = doc_or_sent.base_phrases + assert len(base_phrases) > 0 + assert text.startswith(base_phrases[0].text) + phrases = doc_or_sent.phrases + assert len(phrases) > 0 + assert text.startswith(phrases[0].text) + clauses = doc_or_sent.clauses + assert len(clauses) > 0 + assert text.startswith(clauses[0].text) def test_apply(kwja: KWJA) -> None: @@ -42,9 +103,6 @@ def test_apply(kwja: KWJA) -> None: def test_unsupported_option() -> None: - with pytest.raises(ValueError): - _ = KWJA(options=["--model-size", "tiny", "--tasks", "typo,char"]) - with pytest.raises(ValueError): _ = KWJA(options=["--model-size", "tiny", "--tasks", "wakati"]) @@ -70,27 +128,6 @@ def test_apply_to_sentence(kwja: KWJA, text: str) -> None: assert sent.text == text.replace('"', "”").replace(" ", "␣").replace("\r", "").replace("\n", "") -def test_get_version() -> None: - kwja = KWJA() - _ = kwja.get_version() - - -def test_is_available(kwja: KWJA) -> None: - assert kwja.is_available() is True - - kwja = KWJA("kwjaaaaaaaaaaaaaaaaa") - assert kwja.is_available() is False - - with pytest.raises(RuntimeError): - _ = kwja.apply_to_sentence("test") - - with pytest.raises(RuntimeError): - _ = kwja.apply_to_document("test") - - with pytest.raises(RuntimeError): - _ = kwja.get_version() - - def test_repr(kwja: KWJA) -> None: assert repr(kwja) == "KWJA(executable='kwja', options=['--model-size', 'tiny', '--tasks', 'senter,char,word'])" From 66964677eeb0d5b0ab3111399bb31293836169a2 Mon Sep 17 00:00:00 2001 From: Hirokazu Kiyomaru Date: Thu, 29 Jun 2023 13:05:53 +0900 Subject: [PATCH 12/52] introduce sanity check --- src/rhoknp/processors/jumanpp.py | 5 ++++- src/rhoknp/processors/knp.py | 5 ++++- src/rhoknp/processors/kwja.py | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/rhoknp/processors/jumanpp.py b/src/rhoknp/processors/jumanpp.py index a4e3bb8a..ed71658b 100644 --- a/src/rhoknp/processors/jumanpp.py +++ b/src/rhoknp/processors/jumanpp.py @@ -34,16 +34,19 @@ def __init__( executable: str = "jumanpp", options: Optional[List[str]] = None, senter: Optional[Processor] = None, + skip_sanity_check: bool = False, ) -> None: self.executable = executable #: Juman++ のパス. self.options: List[str] = options or [] #: Juman++ のオプション. self.senter = senter self._proc: Optional[Popen] = None + self._lock = Lock() try: self._proc = Popen(self.run_command, stdin=PIPE, stdout=PIPE, stderr=PIPE, encoding="utf-8") + if skip_sanity_check is False: + _ = self.apply(Sentence.from_raw_text("")) except Exception as e: logger.warning(f"failed to start Juman++: {e}") - self._lock = Lock() def __repr__(self) -> str: arg_string = f"executable={repr(self.executable)}" diff --git a/src/rhoknp/processors/knp.py b/src/rhoknp/processors/knp.py index e9301408..69e792c4 100644 --- a/src/rhoknp/processors/knp.py +++ b/src/rhoknp/processors/knp.py @@ -38,6 +38,7 @@ def __init__( options: Optional[List[str]] = None, senter: Optional[Processor] = None, jumanpp: Optional[Processor] = None, + skip_sanity_check: bool = False, ) -> None: self.executable = executable #: KNP のパス. self.options = options or ["-tab"] #: KNP のオプション. @@ -46,11 +47,13 @@ def __init__( self.senter = senter self.jumanpp = jumanpp self._proc: Optional[Popen] = None + self._lock = Lock() try: self._proc = Popen(self.run_command, stdin=PIPE, stdout=PIPE, stderr=PIPE, encoding="utf-8") + if skip_sanity_check is False: + _ = self.apply(Sentence.from_jumanpp("")) except Exception as e: logger.warning(f"failed to start KNP: {e}") - self._lock = Lock() def __repr__(self) -> str: arg_string = f"executable={repr(self.executable)}" diff --git a/src/rhoknp/processors/kwja.py b/src/rhoknp/processors/kwja.py index b9abe85b..0a34faa9 100644 --- a/src/rhoknp/processors/kwja.py +++ b/src/rhoknp/processors/kwja.py @@ -30,6 +30,7 @@ def __init__( self, executable: str = "kwja", options: Optional[List[str]] = None, + skip_sanity_check: bool = False, ) -> None: self.executable = executable #: KWJA のパス. self.options: List[str] = options or [] #: KWJA のオプション. @@ -51,6 +52,8 @@ def __init__( raise ValueError(f"invalid task: {tasks}") try: self._proc = Popen(self.run_command, stdin=PIPE, stdout=PIPE, stderr=PIPE, encoding="utf-8") + if skip_sanity_check is False: + _ = self.apply(Sentence.from_raw_text("")) except Exception as e: logger.warning(f"failed to start KWJA: {e}") self._lock = Lock() From 3e24d78e940d110db0ca34cb7d18483b9e11e61e Mon Sep 17 00:00:00 2001 From: Hirokazu Kiyomaru Date: Thu, 29 Jun 2023 14:50:41 +0900 Subject: [PATCH 13/52] skip unit tests for processors when not available --- tests/processors/test_jumanpp.py | 33 ++++++++++++++++++-------------- tests/processors/test_knp.py | 24 ++++++++++++----------- tests/processors/test_kwja.py | 29 +++++++++++++++++++--------- 3 files changed, 52 insertions(+), 34 deletions(-) diff --git a/tests/processors/test_jumanpp.py b/tests/processors/test_jumanpp.py index 6bba68b5..5dc0696a 100644 --- a/tests/processors/test_jumanpp.py +++ b/tests/processors/test_jumanpp.py @@ -1,17 +1,14 @@ import concurrent.futures -from typing import Generator import pytest from rhoknp import Document, Jumanpp, RegexSenter, Sentence +jumanpp = Jumanpp(options=["--juman"]) -@pytest.fixture() -def jumanpp() -> Generator[Jumanpp, None, None]: - yield Jumanpp(options=["--juman"]) - -def test_call(jumanpp: Jumanpp) -> None: +@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +def test_call() -> None: text = "外国人参政権" assert isinstance(jumanpp(text), Document) assert isinstance(jumanpp(Document.from_raw_text(text)), Document) @@ -20,7 +17,8 @@ def test_call(jumanpp: Jumanpp) -> None: jumanpp(1) # type: ignore -def test_apply(jumanpp: Jumanpp) -> None: +@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +def test_apply() -> None: text = "外国人参政権" assert isinstance(jumanpp.apply(text), Document) assert isinstance(jumanpp.apply(Document.from_raw_text(text)), Document) @@ -29,6 +27,7 @@ def test_apply(jumanpp: Jumanpp) -> None: jumanpp.apply(1) # type: ignore +@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") @pytest.mark.parametrize( "text", [ @@ -43,11 +42,12 @@ def test_apply(jumanpp: Jumanpp) -> None: "CR\r\nLF", # CR+LF ], ) -def test_apply_to_sentence(jumanpp: Jumanpp, text: str) -> None: +def test_apply_to_sentence(text: str) -> None: sent = jumanpp.apply_to_sentence(text) assert sent.text == text.replace("\r", "").replace("\n", "") +@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") @pytest.mark.parametrize( "text", [ @@ -62,12 +62,13 @@ def test_apply_to_sentence(jumanpp: Jumanpp, text: str) -> None: "CR\r\nLF", # CR+LF ], ) -def test_apply_to_document(jumanpp: Jumanpp, text: str) -> None: +def test_apply_to_document(text: str) -> None: doc = jumanpp.apply_to_document(text) assert doc.text == text.replace("\r", "").replace("\n", "") -def test_thread_safe(jumanpp: Jumanpp) -> None: +@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +def test_thread_safe() -> None: texts = ["外国人参政権", "望遠鏡で泳いでいる少女を見た。", "エネルギーを素敵にENEOS"] texts *= 10 with concurrent.futures.ThreadPoolExecutor() as executor: @@ -77,14 +78,16 @@ def test_thread_safe(jumanpp: Jumanpp) -> None: assert sentence.text == texts[i] -def test_normal(jumanpp: Jumanpp) -> None: +@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +def test_normal() -> None: text = "この文を解析してください。" sent = jumanpp.apply(text) assert len(sent.morphemes) == 7 assert "".join(m.text for m in sent.morphemes) == text -def test_nominalization(jumanpp: Jumanpp) -> None: +@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +def test_nominalization() -> None: text = "音の響きを感じる。" sent = jumanpp.apply(text) assert len(sent.morphemes) == 6 @@ -93,7 +96,8 @@ def test_nominalization(jumanpp: Jumanpp) -> None: assert sent.morphemes[2].pos == "名詞" -def test_whitespace(jumanpp: Jumanpp) -> None: +@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +def test_whitespace() -> None: text = "半角 スペース" sent = jumanpp.apply(text) assert len(sent.morphemes) == 3 @@ -102,11 +106,12 @@ def test_whitespace(jumanpp: Jumanpp) -> None: assert sent.morphemes[1].subpos == "空白" +@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") def test_get_version() -> None: - jumanpp = Jumanpp() _ = jumanpp.get_version() +@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") def test_is_available() -> None: jumanpp = Jumanpp() assert jumanpp.is_available() is True diff --git a/tests/processors/test_knp.py b/tests/processors/test_knp.py index 0fec7655..2ac5b7d7 100644 --- a/tests/processors/test_knp.py +++ b/tests/processors/test_knp.py @@ -1,17 +1,14 @@ import concurrent.futures -from typing import Generator import pytest from rhoknp import KNP, Document, Jumanpp, RegexSenter, Sentence +knp = KNP(options=["-tab"]) -@pytest.fixture() -def knp() -> Generator[KNP, None, None]: - yield KNP(options=["-tab"]) - -def test_call(knp: KNP) -> None: +@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") +def test_call() -> None: text = "外国人参政権" assert isinstance(knp(text), Document) assert isinstance(knp(Document.from_raw_text(text)), Document) @@ -20,7 +17,8 @@ def test_call(knp: KNP) -> None: knp(1) # type: ignore -def test_apply(knp: KNP) -> None: +@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") +def test_apply() -> None: text = "外国人参政権" assert isinstance(knp.apply(text), Document) assert isinstance(knp.apply(Document.from_raw_text(text)), Document) @@ -29,6 +27,7 @@ def test_apply(knp: KNP) -> None: knp.apply(1) # type: ignore +@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") @pytest.mark.parametrize( "text", [ @@ -44,12 +43,13 @@ def test_apply(knp: KNP) -> None: "CR\r\nLF", # CR+LF ], ) -def test_apply_to_sentence(knp: KNP, text: str) -> None: +def test_apply_to_sentence(text: str) -> None: sent = knp.apply_to_sentence(text) assert sent.text == text.replace("\r", "").replace("\n", "") -def test_thread_safe(knp: KNP) -> None: +@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") +def test_thread_safe() -> None: texts = ["外国人参政権", "望遠鏡で泳いでいる少女を見た。", "エネルギーを素敵にENEOS"] texts *= 10 with concurrent.futures.ThreadPoolExecutor() as executor: @@ -59,6 +59,7 @@ def test_thread_safe(knp: KNP) -> None: assert sentence.text == texts[i] +@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") @pytest.mark.parametrize( "text", [ @@ -74,16 +75,17 @@ def test_thread_safe(knp: KNP) -> None: "CR\r\nLF", # CR+LF ], ) -def test_apply_to_document(knp: KNP, text: str) -> None: +def test_apply_to_document(text: str) -> None: doc = knp.apply_to_document(text) assert doc.text == text.replace("\r", "").replace("\n", "") +@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") def test_get_version() -> None: - knp = KNP() _ = knp.get_version() +@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") def test_is_available() -> None: knp = KNP() assert knp.is_available() is True diff --git a/tests/processors/test_kwja.py b/tests/processors/test_kwja.py index 0f17b735..d5dfa32e 100644 --- a/tests/processors/test_kwja.py +++ b/tests/processors/test_kwja.py @@ -6,18 +6,17 @@ from rhoknp import KWJA, Document, Sentence from rhoknp.cli.serve import AnalyzerType, create_app - -@pytest.fixture -def kwja() -> Generator[KWJA, None, None]: - yield KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) +kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") def test_get_version() -> None: - kwja = KWJA() _ = kwja.get_version() -def test_is_available(kwja: KWJA) -> None: +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +def test_is_available() -> None: + kwja = KWJA(options=["--model-size", "tiny"]) assert kwja.is_available() is True kwja = KWJA("kwjaaaaaaaaaaaaaaaaa") @@ -33,6 +32,7 @@ def test_is_available(kwja: KWJA) -> None: _ = kwja.get_version() +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") def test_typo() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "typo"]) text = "人口知能" @@ -40,6 +40,7 @@ def test_typo() -> None: assert doc_or_sent.text == "人工知能" +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") def test_senter() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter"]) text = "こんにちは。さようなら。" @@ -50,6 +51,7 @@ def test_senter() -> None: assert sentences[1].text == "さようなら。" +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") def test_seq2seq() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,seq2seq"]) text = "こんにちは" @@ -61,6 +63,7 @@ def test_seq2seq() -> None: assert morpheme.text == morpheme.reading == morpheme.lemma == "こんにちは" +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") def test_char() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char"]) text = "こんにちは" @@ -74,6 +77,7 @@ def test_char() -> None: assert morpheme.lemma == "*" +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") def test_word() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) text = "こんにちは" @@ -93,7 +97,8 @@ def test_word() -> None: assert text.startswith(clauses[0].text) -def test_apply(kwja: KWJA) -> None: +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +def test_apply() -> None: text = "外国人参政権" assert isinstance(kwja.apply(text), Document) assert isinstance(kwja.apply(Document.from_raw_text(text)), Document) @@ -107,6 +112,7 @@ def test_unsupported_option() -> None: _ = KWJA(options=["--model-size", "tiny", "--tasks", "wakati"]) +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") @pytest.mark.parametrize( "text", [ @@ -123,21 +129,24 @@ def test_unsupported_option() -> None: "CR\r\nLF", # CR+LF ], ) -def test_apply_to_sentence(kwja: KWJA, text: str) -> None: +def test_apply_to_sentence(text: str) -> None: sent = kwja.apply_to_sentence(text) assert sent.text == text.replace('"', "”").replace(" ", "␣").replace("\r", "").replace("\n", "") -def test_repr(kwja: KWJA) -> None: +def test_repr() -> None: + kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) assert repr(kwja) == "KWJA(executable='kwja', options=['--model-size', 'tiny', '--tasks', 'senter,char,word'])" +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") @pytest.fixture() def kwja_client() -> Generator[TestClient, None, None]: app = create_app(AnalyzerType.KWJA, options=["--model-size", "tiny", "--tasks", "senter,char,word"]) yield TestClient(app) +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") @pytest.mark.parametrize("text", ["こんにちは"]) def test_cli_serve_analyze_kwja(kwja_client: TestClient, text: str) -> None: response = kwja_client.get("/analyze", params={"text": text}) @@ -149,6 +158,7 @@ def test_cli_serve_analyze_kwja(kwja_client: TestClient, text: str) -> None: assert document.text == text +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") def test_analyze_kwja_error_empty(kwja_client: TestClient) -> None: error_causing_text = "" response = kwja_client.get("/analyze", params={"text": error_causing_text}) @@ -159,6 +169,7 @@ def test_analyze_kwja_error_empty(kwja_client: TestClient) -> None: assert json["error"]["message"] == "text is empty" +@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") @pytest.mark.parametrize("text", ["こんにちは", ""]) def test_cli_serve_index_kwja(kwja_client: TestClient, text: str) -> None: response = kwja_client.get("/", params={"text": text}) From 44244b644a3a390d39a62ba723724cb92f5a4376 Mon Sep 17 00:00:00 2001 From: Hirokazu Kiyomaru Date: Fri, 30 Jun 2023 17:59:33 +0900 Subject: [PATCH 14/52] fix tests --- tests/processors/test_jumanpp.py | 31 ++++++++++++++++++++----------- tests/processors/test_knp.py | 22 ++++++++++++++-------- tests/processors/test_kwja.py | 31 +++++++++++++++++-------------- 3 files changed, 51 insertions(+), 33 deletions(-) diff --git a/tests/processors/test_jumanpp.py b/tests/processors/test_jumanpp.py index 5dc0696a..8f2a4838 100644 --- a/tests/processors/test_jumanpp.py +++ b/tests/processors/test_jumanpp.py @@ -4,11 +4,12 @@ from rhoknp import Document, Jumanpp, RegexSenter, Sentence -jumanpp = Jumanpp(options=["--juman"]) +is_jumanpp_available = Jumanpp(options=["--juman"]).is_available() -@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") def test_call() -> None: + jumanpp = Jumanpp() text = "外国人参政権" assert isinstance(jumanpp(text), Document) assert isinstance(jumanpp(Document.from_raw_text(text)), Document) @@ -17,8 +18,9 @@ def test_call() -> None: jumanpp(1) # type: ignore -@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") def test_apply() -> None: + jumanpp = Jumanpp() text = "外国人参政権" assert isinstance(jumanpp.apply(text), Document) assert isinstance(jumanpp.apply(Document.from_raw_text(text)), Document) @@ -27,7 +29,7 @@ def test_apply() -> None: jumanpp.apply(1) # type: ignore -@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") @pytest.mark.parametrize( "text", [ @@ -43,11 +45,12 @@ def test_apply() -> None: ], ) def test_apply_to_sentence(text: str) -> None: + jumanpp = Jumanpp() sent = jumanpp.apply_to_sentence(text) assert sent.text == text.replace("\r", "").replace("\n", "") -@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") @pytest.mark.parametrize( "text", [ @@ -63,12 +66,14 @@ def test_apply_to_sentence(text: str) -> None: ], ) def test_apply_to_document(text: str) -> None: + jumanpp = Jumanpp() doc = jumanpp.apply_to_document(text) assert doc.text == text.replace("\r", "").replace("\n", "") -@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") def test_thread_safe() -> None: + jumanpp = Jumanpp() texts = ["外国人参政権", "望遠鏡で泳いでいる少女を見た。", "エネルギーを素敵にENEOS"] texts *= 10 with concurrent.futures.ThreadPoolExecutor() as executor: @@ -78,16 +83,18 @@ def test_thread_safe() -> None: assert sentence.text == texts[i] -@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") def test_normal() -> None: + jumanpp = Jumanpp() text = "この文を解析してください。" sent = jumanpp.apply(text) assert len(sent.morphemes) == 7 assert "".join(m.text for m in sent.morphemes) == text -@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") def test_nominalization() -> None: + jumanpp = Jumanpp() text = "音の響きを感じる。" sent = jumanpp.apply(text) assert len(sent.morphemes) == 6 @@ -96,8 +103,9 @@ def test_nominalization() -> None: assert sent.morphemes[2].pos == "名詞" -@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") def test_whitespace() -> None: + jumanpp = Jumanpp() text = "半角 スペース" sent = jumanpp.apply(text) assert len(sent.morphemes) == 3 @@ -106,12 +114,13 @@ def test_whitespace() -> None: assert sent.morphemes[1].subpos == "空白" -@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") def test_get_version() -> None: + jumanpp = Jumanpp() _ = jumanpp.get_version() -@pytest.mark.skipif(not jumanpp.is_available(), reason="Juman++ is not available") +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") def test_is_available() -> None: jumanpp = Jumanpp() assert jumanpp.is_available() is True diff --git a/tests/processors/test_knp.py b/tests/processors/test_knp.py index 2ac5b7d7..082017c9 100644 --- a/tests/processors/test_knp.py +++ b/tests/processors/test_knp.py @@ -4,11 +4,12 @@ from rhoknp import KNP, Document, Jumanpp, RegexSenter, Sentence -knp = KNP(options=["-tab"]) +is_knp_available = KNP().is_available() -@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") def test_call() -> None: + knp = KNP() text = "外国人参政権" assert isinstance(knp(text), Document) assert isinstance(knp(Document.from_raw_text(text)), Document) @@ -17,8 +18,9 @@ def test_call() -> None: knp(1) # type: ignore -@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") def test_apply() -> None: + knp = KNP() text = "外国人参政権" assert isinstance(knp.apply(text), Document) assert isinstance(knp.apply(Document.from_raw_text(text)), Document) @@ -27,7 +29,7 @@ def test_apply() -> None: knp.apply(1) # type: ignore -@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") @pytest.mark.parametrize( "text", [ @@ -44,12 +46,14 @@ def test_apply() -> None: ], ) def test_apply_to_sentence(text: str) -> None: + knp = KNP() sent = knp.apply_to_sentence(text) assert sent.text == text.replace("\r", "").replace("\n", "") -@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") def test_thread_safe() -> None: + knp = KNP() texts = ["外国人参政権", "望遠鏡で泳いでいる少女を見た。", "エネルギーを素敵にENEOS"] texts *= 10 with concurrent.futures.ThreadPoolExecutor() as executor: @@ -59,7 +63,7 @@ def test_thread_safe() -> None: assert sentence.text == texts[i] -@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") @pytest.mark.parametrize( "text", [ @@ -76,16 +80,18 @@ def test_thread_safe() -> None: ], ) def test_apply_to_document(text: str) -> None: + knp = KNP() doc = knp.apply_to_document(text) assert doc.text == text.replace("\r", "").replace("\n", "") -@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") def test_get_version() -> None: + knp = KNP() _ = knp.get_version() -@pytest.mark.skipif(not knp.is_available(), reason="KNP is not available") +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") def test_is_available() -> None: knp = KNP() assert knp.is_available() is True diff --git a/tests/processors/test_kwja.py b/tests/processors/test_kwja.py index d5dfa32e..1cf7079a 100644 --- a/tests/processors/test_kwja.py +++ b/tests/processors/test_kwja.py @@ -6,15 +6,16 @@ from rhoknp import KWJA, Document, Sentence from rhoknp.cli.serve import AnalyzerType, create_app -kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) +is_kwja_available = KWJA(options=["--model-size", "tiny"]).is_available() -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_get_version() -> None: + kwja = KWJA(options=["--model-size", "tiny"]) _ = kwja.get_version() -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_is_available() -> None: kwja = KWJA(options=["--model-size", "tiny"]) assert kwja.is_available() is True @@ -32,7 +33,7 @@ def test_is_available() -> None: _ = kwja.get_version() -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_typo() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "typo"]) text = "人口知能" @@ -40,7 +41,7 @@ def test_typo() -> None: assert doc_or_sent.text == "人工知能" -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_senter() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter"]) text = "こんにちは。さようなら。" @@ -51,7 +52,7 @@ def test_senter() -> None: assert sentences[1].text == "さようなら。" -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_seq2seq() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,seq2seq"]) text = "こんにちは" @@ -63,7 +64,7 @@ def test_seq2seq() -> None: assert morpheme.text == morpheme.reading == morpheme.lemma == "こんにちは" -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_char() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char"]) text = "こんにちは" @@ -77,7 +78,7 @@ def test_char() -> None: assert morpheme.lemma == "*" -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_word() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) text = "こんにちは" @@ -97,8 +98,9 @@ def test_word() -> None: assert text.startswith(clauses[0].text) -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_apply() -> None: + kwja = KWJA(options=["--model-size", "tiny"]) text = "外国人参政権" assert isinstance(kwja.apply(text), Document) assert isinstance(kwja.apply(Document.from_raw_text(text)), Document) @@ -112,7 +114,7 @@ def test_unsupported_option() -> None: _ = KWJA(options=["--model-size", "tiny", "--tasks", "wakati"]) -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") @pytest.mark.parametrize( "text", [ @@ -130,6 +132,7 @@ def test_unsupported_option() -> None: ], ) def test_apply_to_sentence(text: str) -> None: + kwja = KWJA(options=["--model-size", "tiny"]) sent = kwja.apply_to_sentence(text) assert sent.text == text.replace('"', "”").replace(" ", "␣").replace("\r", "").replace("\n", "") @@ -139,14 +142,14 @@ def test_repr() -> None: assert repr(kwja) == "KWJA(executable='kwja', options=['--model-size', 'tiny', '--tasks', 'senter,char,word'])" -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") @pytest.fixture() def kwja_client() -> Generator[TestClient, None, None]: app = create_app(AnalyzerType.KWJA, options=["--model-size", "tiny", "--tasks", "senter,char,word"]) yield TestClient(app) -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") @pytest.mark.parametrize("text", ["こんにちは"]) def test_cli_serve_analyze_kwja(kwja_client: TestClient, text: str) -> None: response = kwja_client.get("/analyze", params={"text": text}) @@ -158,7 +161,7 @@ def test_cli_serve_analyze_kwja(kwja_client: TestClient, text: str) -> None: assert document.text == text -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_analyze_kwja_error_empty(kwja_client: TestClient) -> None: error_causing_text = "" response = kwja_client.get("/analyze", params={"text": error_causing_text}) @@ -169,7 +172,7 @@ def test_analyze_kwja_error_empty(kwja_client: TestClient) -> None: assert json["error"]["message"] == "text is empty" -@pytest.mark.skipif(not kwja.is_available(), reason="KWJA is not available") +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") @pytest.mark.parametrize("text", ["こんにちは", ""]) def test_cli_serve_index_kwja(kwja_client: TestClient, text: str) -> None: response = kwja_client.get("/", params={"text": text}) From 52c57a6012a58e1919f0770a0d61f3b9e29a317a Mon Sep 17 00:00:00 2001 From: nobu-g Date: Sat, 1 Jul 2023 22:18:51 +0900 Subject: [PATCH 15/52] fix tests for full coverage --- tests/processors/test_kwja.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/processors/test_kwja.py b/tests/processors/test_kwja.py index 1cf7079a..85cbdefc 100644 --- a/tests/processors/test_kwja.py +++ b/tests/processors/test_kwja.py @@ -55,20 +55,26 @@ def test_senter() -> None: @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_seq2seq() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,seq2seq"]) - text = "こんにちは" - for doc_or_sent in (kwja.apply_to_document(text), kwja.apply_to_sentence(text)): + for doc_or_sent, text in zip( + (kwja.apply_to_document("こんにちは。さようなら"), kwja.apply_to_sentence("さようなら")), + ("こんにちは。さようなら", "さようなら"), + ): assert isinstance(doc_or_sent, (Document, Sentence)) morphemes = doc_or_sent.morphemes - assert len(morphemes) == 1 + assert len(morphemes) > 0 morpheme = morphemes[0] - assert morpheme.text == morpheme.reading == morpheme.lemma == "こんにちは" + assert text.startswith(morpheme.text) + assert text.startswith(morpheme.reading) + assert text.startswith(morpheme.lemma) @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_char() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char"]) - text = "こんにちは" - for doc_or_sent in (kwja.apply_to_document(text), kwja.apply_to_sentence(text)): + for doc_or_sent, text in zip( + (kwja.apply_to_document("こんにちは。さようなら"), kwja.apply_to_sentence("さようなら")), + ("こんにちは。さようなら", "さようなら"), + ): assert isinstance(doc_or_sent, (Document, Sentence)) morphemes = doc_or_sent.morphemes assert len(morphemes) > 0 @@ -81,8 +87,10 @@ def test_char() -> None: @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_word() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) - text = "こんにちは" - for doc_or_sent in (kwja.apply_to_document(text), kwja.apply_to_sentence(text)): + for doc_or_sent, text in zip( + (kwja.apply_to_document("こんにちは。さようなら"), kwja.apply_to_sentence("さようなら")), + ("こんにちは。さようなら", "さようなら"), + ): assert isinstance(doc_or_sent, (Document, Sentence)) morphemes = doc_or_sent.morphemes assert len(morphemes) > 0 From c11fe5b4b6ea0bfe637e9c5e2b6c48a2c3388dfb Mon Sep 17 00:00:00 2001 From: nobu-g Date: Sat, 1 Jul 2023 22:21:32 +0900 Subject: [PATCH 16/52] tweak --- tests/cli/test_serve.py | 4 ++-- tests/processors/test_kwja.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cli/test_serve.py b/tests/cli/test_serve.py index 86efe780..d2cc4455 100644 --- a/tests/cli/test_serve.py +++ b/tests/cli/test_serve.py @@ -8,7 +8,7 @@ from rhoknp.cli.serve import AnalyzerType, _draw_tree, _get_entity_spans, _get_string_diff, _Span, create_app -@pytest.fixture() +@pytest.fixture def jumanpp_client() -> Generator[TestClient, None, None]: app = create_app(AnalyzerType.JUMANPP) yield TestClient(app) @@ -41,7 +41,7 @@ def test_index_jumanpp(jumanpp_client: TestClient, text: str) -> None: assert response.status_code == 200 -@pytest.fixture() +@pytest.fixture def knp_client() -> Generator[TestClient, None, None]: app = create_app(AnalyzerType.KNP) yield TestClient(app) diff --git a/tests/processors/test_kwja.py b/tests/processors/test_kwja.py index 85cbdefc..73f92472 100644 --- a/tests/processors/test_kwja.py +++ b/tests/processors/test_kwja.py @@ -151,7 +151,7 @@ def test_repr() -> None: @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") -@pytest.fixture() +@pytest.fixture def kwja_client() -> Generator[TestClient, None, None]: app = create_app(AnalyzerType.KWJA, options=["--model-size", "tiny", "--tasks", "senter,char,word"]) yield TestClient(app) From 7953b0a79f6dd5d8ca2f4b9b73e46f93fc3a0efb Mon Sep 17 00:00:00 2001 From: nobu-g Date: Sat, 1 Jul 2023 22:37:53 +0900 Subject: [PATCH 17/52] move tests for serving kwja --- .github/workflows/test.yml | 17 ++++++++++----- tests/cli/test_serve.py | 40 ++++++++++++++++++++++++++++++++-- tests/processors/test_kwja.py | 41 ----------------------------------- 3 files changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cc78a94d..5109dc60 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,19 +28,24 @@ jobs: python3 -m pipx ensurepath python3 -m pipx install poetry - name: Add path for Python packages - run: echo "$HOME/.local/bin" >> $GITHUB_PATH + run: | + echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Install dependencies - run: poetry install --no-interaction --without dev,docs --extras=cli - - name: Run tests with KWJA + run: | + poetry install --no-interaction --without dev,docs --extras=cli + - name: Install KWJA # KWJA does not support Python 3.7 if: ${{ matrix.python-version != 3.7 }} run: | pipx install kwja + - name: Run tests with coverage + if: ${{ matrix.python-version == 3.9 }} + run: | poetry run pytest --cov=./ --cov-report=xml -v ./tests - - name: Run tests without KWJA - if: ${{ matrix.python-version == 3.7 }} + - name: Run tests without coverage + if: ${{ matrix.python-version != 3.9 }} run: | - poetry run pytest -v --ignore ./tests/processors/test_kwja.py ./tests + poetry run pytest -v ./tests - name: Upload coverage to Codecov if: ${{ matrix.python-version == 3.9 }} uses: codecov/codecov-action@v3 diff --git a/tests/cli/test_serve.py b/tests/cli/test_serve.py index d2cc4455..4c300567 100644 --- a/tests/cli/test_serve.py +++ b/tests/cli/test_serve.py @@ -4,9 +4,11 @@ import pytest from fastapi.testclient import TestClient -from rhoknp import Document +from rhoknp import KWJA, Document from rhoknp.cli.serve import AnalyzerType, _draw_tree, _get_entity_spans, _get_string_diff, _Span, create_app +is_kwja_available = KWJA(options=["--model-size", "tiny"]).is_available() + @pytest.fixture def jumanpp_client() -> Generator[TestClient, None, None]: @@ -90,7 +92,41 @@ def test_index_knp_error(knp_client: TestClient) -> None: assert response.status_code == 500 -# KWJA is tested in `tests/processors/test_kwja.py` to isolate tests that require KWJA installed. +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") +@pytest.fixture +def kwja_client() -> Generator[TestClient, None, None]: + app = create_app(AnalyzerType.KWJA, options=["--model-size", "tiny", "--tasks", "senter,char,word"]) + yield TestClient(app) + + +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") +@pytest.mark.parametrize("text", ["こんにちは"]) +def test_cli_serve_analyze_kwja(kwja_client: TestClient, text: str) -> None: + response = kwja_client.get("/analyze", params={"text": text}) + assert response.status_code == 200 + json = response.json() + assert "text" in json + assert "result" in json + document = Document.from_knp(json["result"]) + assert document.text == text + + +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") +def test_analyze_kwja_error_empty(kwja_client: TestClient) -> None: + error_causing_text = "" + response = kwja_client.get("/analyze", params={"text": error_causing_text}) + assert response.status_code == 400 + json = response.json() + assert "error" in json + assert json["error"]["code"] == 400 + assert json["error"]["message"] == "text is empty" + + +@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") +@pytest.mark.parametrize("text", ["こんにちは", ""]) +def test_cli_serve_index_kwja(kwja_client: TestClient, text: str) -> None: + response = kwja_client.get("/", params={"text": text}) + assert response.status_code == 200 @pytest.mark.parametrize( diff --git a/tests/processors/test_kwja.py b/tests/processors/test_kwja.py index 73f92472..51958d54 100644 --- a/tests/processors/test_kwja.py +++ b/tests/processors/test_kwja.py @@ -1,10 +1,6 @@ -from typing import Generator - import pytest -from fastapi.testclient import TestClient from rhoknp import KWJA, Document, Sentence -from rhoknp.cli.serve import AnalyzerType, create_app is_kwja_available = KWJA(options=["--model-size", "tiny"]).is_available() @@ -148,40 +144,3 @@ def test_apply_to_sentence(text: str) -> None: def test_repr() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) assert repr(kwja) == "KWJA(executable='kwja', options=['--model-size', 'tiny', '--tasks', 'senter,char,word'])" - - -@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") -@pytest.fixture -def kwja_client() -> Generator[TestClient, None, None]: - app = create_app(AnalyzerType.KWJA, options=["--model-size", "tiny", "--tasks", "senter,char,word"]) - yield TestClient(app) - - -@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") -@pytest.mark.parametrize("text", ["こんにちは"]) -def test_cli_serve_analyze_kwja(kwja_client: TestClient, text: str) -> None: - response = kwja_client.get("/analyze", params={"text": text}) - assert response.status_code == 200 - json = response.json() - assert "text" in json - assert "result" in json - document = Document.from_knp(json["result"]) - assert document.text == text - - -@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") -def test_analyze_kwja_error_empty(kwja_client: TestClient) -> None: - error_causing_text = "" - response = kwja_client.get("/analyze", params={"text": error_causing_text}) - assert response.status_code == 400 - json = response.json() - assert "error" in json - assert json["error"]["code"] == 400 - assert json["error"]["message"] == "text is empty" - - -@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") -@pytest.mark.parametrize("text", ["こんにちは", ""]) -def test_cli_serve_index_kwja(kwja_client: TestClient, text: str) -> None: - response = kwja_client.get("/", params={"text": text}) - assert response.status_code == 200 From 8297f92006c198d8738ea4b22109e8905bb57c41 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Sat, 1 Jul 2023 22:47:51 +0900 Subject: [PATCH 18/52] add Build actions workflow --- .github/workflows/build.yml | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..5743b05c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: Build + +on: [push, pull_request] + +jobs: + build: + name: Build the project + runs-on: ${{ matrix.os }} + strategy: + max-parallel: 15 + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install Poetry + run: | + pipx install poetry + echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Install dependencies + run: | + poetry install --no-interaction --without dev,test,docs + - name: Build package + run: | + poetry build + - name: Install rhoknp from wheel (non-Windows) + if: ${{ matrix.os != 'windows-latest' }} + run: | + pip3 install dist/*.whl + - name: Install rhoknp from wheel (Windows) + if: ${{ matrix.os == 'windows-latest' }} + run: | + $whlFile = (Get-ChildItem -Path dist -Filter *.whl).FullName + pip3 install $whlFile + shell: pwsh + - name: Run rhoknp + run: | + rhoknp --version + rhoknp --help From 41ff6af0929e40fbe890624534fa5d3efaf27e00 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Sat, 1 Jul 2023 22:52:33 +0900 Subject: [PATCH 19/52] fix tests for full coverage --- tests/processors/test_kwja.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/processors/test_kwja.py b/tests/processors/test_kwja.py index 51958d54..3d826927 100644 --- a/tests/processors/test_kwja.py +++ b/tests/processors/test_kwja.py @@ -40,12 +40,13 @@ def test_typo() -> None: @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_senter() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter"]) - text = "こんにちは。さようなら。" - document = kwja.apply_to_document(text) + document = kwja.apply_to_document("こんにちは。さようなら。") sentences = document.sentences assert len(sentences) == 2 assert sentences[0].text == "こんにちは。" assert sentences[1].text == "さようなら。" + sentence = kwja.apply_to_sentence("こんにちは。") + assert sentence.text == "こんにちは。" @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") From 0d1a570a53c76972326b0d92bcbb042c8fe7771c Mon Sep 17 00:00:00 2001 From: nobu-g Date: Sat, 1 Jul 2023 23:03:35 +0900 Subject: [PATCH 20/52] fix build workflow --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5743b05c..b30ebcdd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,12 +32,13 @@ jobs: - name: Install rhoknp from wheel (non-Windows) if: ${{ matrix.os != 'windows-latest' }} run: | - pip3 install dist/*.whl + wheelFile=$(ls dist/*.whl) + pip3 install ${wheelFile}[cli] - name: Install rhoknp from wheel (Windows) if: ${{ matrix.os == 'windows-latest' }} run: | - $whlFile = (Get-ChildItem -Path dist -Filter *.whl).FullName - pip3 install $whlFile + $wheelFile = (Get-ChildItem -Path dist -Filter *.whl).FullName + pip3 install $wheelFile + "[cli]" shell: pwsh - name: Run rhoknp run: | From 971459282aff2dee76213d9617e94c944a1daaff Mon Sep 17 00:00:00 2001 From: nobu-g Date: Sat, 1 Jul 2023 23:11:01 +0900 Subject: [PATCH 21/52] fix build workflow for Windows --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b30ebcdd..c53c93f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} run: | $wheelFile = (Get-ChildItem -Path dist -Filter *.whl).FullName - pip3 install $wheelFile + "[cli]" + pip3 install "${wheelFile}[cli]" shell: pwsh - name: Run rhoknp run: | From 39206c3a9cad584193acbaec9a6a01518d7d5183 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Sat, 1 Jul 2023 23:17:45 +0900 Subject: [PATCH 22/52] skip tests for serving KNP or Juman++ if the command not available --- tests/cli/test_serve.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/cli/test_serve.py b/tests/cli/test_serve.py index 4c300567..0f2a5f1e 100644 --- a/tests/cli/test_serve.py +++ b/tests/cli/test_serve.py @@ -4,18 +4,22 @@ import pytest from fastapi.testclient import TestClient -from rhoknp import KWJA, Document +from rhoknp import KNP, KWJA, Document, Jumanpp from rhoknp.cli.serve import AnalyzerType, _draw_tree, _get_entity_spans, _get_string_diff, _Span, create_app +is_jumanpp_available = Jumanpp(options=["--juman"]).is_available() +is_knp_available = KNP().is_available() is_kwja_available = KWJA(options=["--model-size", "tiny"]).is_available() +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") @pytest.fixture def jumanpp_client() -> Generator[TestClient, None, None]: app = create_app(AnalyzerType.JUMANPP) yield TestClient(app) +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") @pytest.mark.parametrize("text", ["こんにちは"]) def test_analyze_jumanpp(jumanpp_client: TestClient, text: str) -> None: response = jumanpp_client.get("/analyze", params={"text": text}) @@ -27,6 +31,7 @@ def test_analyze_jumanpp(jumanpp_client: TestClient, text: str) -> None: assert document.text == text +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") def test_analyze_jumanpp_error_empty(jumanpp_client: TestClient) -> None: error_causing_text = "" response = jumanpp_client.get("/analyze", params={"text": error_causing_text}) @@ -37,18 +42,21 @@ def test_analyze_jumanpp_error_empty(jumanpp_client: TestClient) -> None: assert json["error"]["message"] == "text is empty" +@pytest.mark.skipif(not is_jumanpp_available, reason="Juman++ is not available") @pytest.mark.parametrize("text", ["こんにちは", ""]) def test_index_jumanpp(jumanpp_client: TestClient, text: str) -> None: response = jumanpp_client.get("/", params={"text": text}) assert response.status_code == 200 +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") @pytest.fixture def knp_client() -> Generator[TestClient, None, None]: app = create_app(AnalyzerType.KNP) yield TestClient(app) +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") @pytest.mark.parametrize("text", ["こんにちは"]) def test_analyze_knp(knp_client: TestClient, text: str) -> None: response = knp_client.get("/analyze", params={"text": text}) @@ -60,6 +68,7 @@ def test_analyze_knp(knp_client: TestClient, text: str) -> None: assert document.text == text +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") def test_analyze_knp_error_empty(knp_client: TestClient) -> None: error_causing_text = "" response = knp_client.get("/analyze", params={"text": error_causing_text}) @@ -70,6 +79,7 @@ def test_analyze_knp_error_empty(knp_client: TestClient) -> None: assert json["error"]["message"] == "text is empty" +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") def test_analyze_knp_error_long(knp_client: TestClient) -> None: error_causing_text = "http://localhost:8000" * 30 response = knp_client.get("/analyze", params={"text": error_causing_text}) @@ -80,12 +90,14 @@ def test_analyze_knp_error_long(knp_client: TestClient) -> None: assert json["error"]["message"] == "malformed phrase line: " +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") @pytest.mark.parametrize("text", ["こんにちは", ""]) def test_index_knp(knp_client: TestClient, text: str) -> None: response = knp_client.get("/", params={"text": text}) assert response.status_code == 200 +@pytest.mark.skipif(not is_knp_available, reason="KNP is not available") def test_index_knp_error(knp_client: TestClient) -> None: error_causing_text = "http://localhost:8000" * 30 response = knp_client.get("/", params={"text": error_causing_text}) From 4b34b962501baf64d4b64bfe24f16d5ac5915ac6 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Sat, 1 Jul 2023 23:37:30 +0900 Subject: [PATCH 23/52] tweak --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d24f6d85..1a389b77 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: - rich - uvicorn - fastapi - - markdown-it-py==2.2.0 + - markdown-it-py==2.2.0 # markdown-it-py 3.0.0 requires Python 3.8+ - repo: https://github.com/asottile/pyupgrade rev: v3.7.0 hooks: From 34bfb688dd6bf117a48d72922af528724de4fd13 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Sat, 1 Jul 2023 23:37:51 +0900 Subject: [PATCH 24/52] update doc deps --- poetry.lock | 191 +++++++++++++++++++++++++++++++++++-------------- pyproject.toml | 11 ++- 2 files changed, 145 insertions(+), 57 deletions(-) diff --git a/poetry.lock b/poetry.lock index 9db5b094..ca67fbd4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -333,6 +333,17 @@ files = [ {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, ] +[[package]] +name = "docutils" +version = "0.20.1" +description = "Docutils -- Python Documentation Utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, + {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, +] + [[package]] name = "exceptiongroup" version = "1.1.1" @@ -363,18 +374,19 @@ tests = ["asttokens", "littleutils", "pytest", "rich"] [[package]] name = "fastapi" -version = "0.98.0" +version = "0.99.0" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = true python-versions = ">=3.7" files = [ - {file = "fastapi-0.98.0-py3-none-any.whl", hash = "sha256:f4165fb1fe3610c52cb1b8282c1480de9c34bc270f56a965aa93a884c350d605"}, - {file = "fastapi-0.98.0.tar.gz", hash = "sha256:0d3c18886f652038262b5898fec6b09f4ca92ee23e9d9b1d1d24e429f84bf27b"}, + {file = "fastapi-0.99.0-py3-none-any.whl", hash = "sha256:b87fffddf9c761c5618f638b492cfb73bba1d208ab170b89122cce52d1fb044a"}, + {file = "fastapi-0.99.0.tar.gz", hash = "sha256:eab70f072d6c424d16f02ba635dc0945fecab549210e7961c838f4b467f0b4a7"}, ] [package.dependencies] pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0" starlette = ">=0.27.0,<0.28.0" +typing-extensions = ">=4.5.0" [package.extras] all = ["email-validator (>=1.1.1)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "python-multipart (>=0.0.5)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] @@ -715,6 +727,30 @@ profiling = ["gprof2dot"] rtd = ["attrs", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] +[[package]] +name = "markdown-it-py" +version = "3.0.0" +description = "Python port of markdown-it. Markdown parsing, done right!" +optional = false +python-versions = ">=3.8" +files = [ + {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, + {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, +] + +[package.dependencies] +mdurl = ">=0.1,<1.0" + +[package.extras] +benchmarking = ["psutil", "pytest", "pytest-benchmark"] +code-style = ["pre-commit (>=3.0,<4.0)"] +compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "mistletoe (>=1.0,<2.0)", "mistune (>=2.0,<3.0)", "panflute (>=2.3,<3.0)"] +linkify = ["linkify-it-py (>=1,<3)"] +plugins = ["mdit-py-plugins"] +profiling = ["gprof2dot"] +rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] +testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] + [[package]] name = "markupsafe" version = "2.1.3" @@ -807,6 +843,25 @@ code-style = ["pre-commit"] rtd = ["attrs", "myst-parser (>=0.16.1,<0.17.0)", "sphinx-book-theme (>=0.1.0,<0.2.0)"] testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] +[[package]] +name = "mdit-py-plugins" +version = "0.4.0" +description = "Collection of plugins for markdown-it-py" +optional = false +python-versions = ">=3.8" +files = [ + {file = "mdit_py_plugins-0.4.0-py3-none-any.whl", hash = "sha256:b51b3bb70691f57f974e257e367107857a93b36f322a9e6d44ca5bf28ec2def9"}, + {file = "mdit_py_plugins-0.4.0.tar.gz", hash = "sha256:d8ab27e9aed6c38aa716819fedfde15ca275715955f8a185a8e1cf90fb1d2c1b"}, +] + +[package.dependencies] +markdown-it-py = ">=1.0.0,<4.0.0" + +[package.extras] +code-style = ["pre-commit"] +rtd = ["myst-parser", "sphinx-book-theme"] +testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] + [[package]] name = "mdurl" version = "0.1.2" @@ -845,6 +900,32 @@ rtd = ["ipython", "pydata-sphinx-theme (==v0.13.0rc4)", "sphinx-autodoc2 (>=0.4. testing = ["beautifulsoup4", "coverage[toml]", "pytest (>=7,<8)", "pytest-cov", "pytest-param-files (>=0.3.4,<0.4.0)", "pytest-regressions", "sphinx-pytest"] testing-docutils = ["pygments", "pytest (>=7,<8)", "pytest-param-files (>=0.3.4,<0.4.0)"] +[[package]] +name = "myst-parser" +version = "2.0.0" +description = "An extended [CommonMark](https://spec.commonmark.org/) compliant parser," +optional = false +python-versions = ">=3.8" +files = [ + {file = "myst_parser-2.0.0-py3-none-any.whl", hash = "sha256:7c36344ae39c8e740dad7fdabf5aa6fc4897a813083c6cc9990044eb93656b14"}, + {file = "myst_parser-2.0.0.tar.gz", hash = "sha256:ea929a67a6a0b1683cdbe19b8d2e724cd7643f8aa3e7bb18dd65beac3483bead"}, +] + +[package.dependencies] +docutils = ">=0.16,<0.21" +jinja2 = "*" +markdown-it-py = ">=3.0,<4.0" +mdit-py-plugins = ">=0.4,<1.0" +pyyaml = "*" +sphinx = ">=6,<8" + +[package.extras] +code-style = ["pre-commit (>=3.0,<4.0)"] +linkify = ["linkify-it-py (>=2.0,<3.0)"] +rtd = ["ipython", "pydata-sphinx-theme (==v0.13.0rc4)", "sphinx-autodoc2 (>=0.4.2,<0.5.0)", "sphinx-book-theme (==1.0.0rc2)", "sphinx-copybutton", "sphinx-design2", "sphinx-pyscript", "sphinx-tippy (>=0.3.1)", "sphinx-togglebutton", "sphinxext-opengraph (>=0.8.2,<0.9.0)", "sphinxext-rediraffe (>=0.2.7,<0.3.0)"] +testing = ["beautifulsoup4", "coverage[toml]", "pytest (>=7,<8)", "pytest-cov", "pytest-param-files (>=0.3.4,<0.4.0)", "pytest-regressions", "sphinx-pytest"] +testing-docutils = ["pygments", "pytest (>=7,<8)", "pytest-param-files (>=0.3.4,<0.4.0)"] + [[package]] name = "packaging" version = "23.1" @@ -898,13 +979,13 @@ files = [ [[package]] name = "pluggy" -version = "1.0.0" +version = "1.2.0" description = "plugin and hook calling mechanisms for python" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, + {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, + {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, ] [package.dependencies] @@ -955,47 +1036,47 @@ tests = ["pytest"] [[package]] name = "pydantic" -version = "1.10.9" +version = "1.10.10" description = "Data validation and settings management using python type hints" optional = true python-versions = ">=3.7" files = [ - {file = "pydantic-1.10.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e692dec4a40bfb40ca530e07805b1208c1de071a18d26af4a2a0d79015b352ca"}, - {file = "pydantic-1.10.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3c52eb595db83e189419bf337b59154bdcca642ee4b2a09e5d7797e41ace783f"}, - {file = "pydantic-1.10.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:939328fd539b8d0edf244327398a667b6b140afd3bf7e347cf9813c736211896"}, - {file = "pydantic-1.10.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b48d3d634bca23b172f47f2335c617d3fcb4b3ba18481c96b7943a4c634f5c8d"}, - {file = "pydantic-1.10.9-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f0b7628fb8efe60fe66fd4adadd7ad2304014770cdc1f4934db41fe46cc8825f"}, - {file = "pydantic-1.10.9-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e1aa5c2410769ca28aa9a7841b80d9d9a1c5f223928ca8bec7e7c9a34d26b1d4"}, - {file = "pydantic-1.10.9-cp310-cp310-win_amd64.whl", hash = "sha256:eec39224b2b2e861259d6f3c8b6290d4e0fbdce147adb797484a42278a1a486f"}, - {file = "pydantic-1.10.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d111a21bbbfd85c17248130deac02bbd9b5e20b303338e0dbe0faa78330e37e0"}, - {file = "pydantic-1.10.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2e9aec8627a1a6823fc62fb96480abe3eb10168fd0d859ee3d3b395105ae19a7"}, - {file = "pydantic-1.10.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07293ab08e7b4d3c9d7de4949a0ea571f11e4557d19ea24dd3ae0c524c0c334d"}, - {file = "pydantic-1.10.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ee829b86ce984261d99ff2fd6e88f2230068d96c2a582f29583ed602ef3fc2c"}, - {file = "pydantic-1.10.9-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4b466a23009ff5cdd7076eb56aca537c745ca491293cc38e72bf1e0e00de5b91"}, - {file = "pydantic-1.10.9-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7847ca62e581e6088d9000f3c497267868ca2fa89432714e21a4fb33a04d52e8"}, - {file = "pydantic-1.10.9-cp311-cp311-win_amd64.whl", hash = "sha256:7845b31959468bc5b78d7b95ec52fe5be32b55d0d09983a877cca6aedc51068f"}, - {file = "pydantic-1.10.9-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:517a681919bf880ce1dac7e5bc0c3af1e58ba118fd774da2ffcd93c5f96eaece"}, - {file = "pydantic-1.10.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67195274fd27780f15c4c372f4ba9a5c02dad6d50647b917b6a92bf00b3d301a"}, - {file = "pydantic-1.10.9-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2196c06484da2b3fded1ab6dbe182bdabeb09f6318b7fdc412609ee2b564c49a"}, - {file = "pydantic-1.10.9-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:6257bb45ad78abacda13f15bde5886efd6bf549dd71085e64b8dcf9919c38b60"}, - {file = "pydantic-1.10.9-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3283b574b01e8dbc982080d8287c968489d25329a463b29a90d4157de4f2baaf"}, - {file = "pydantic-1.10.9-cp37-cp37m-win_amd64.whl", hash = "sha256:5f8bbaf4013b9a50e8100333cc4e3fa2f81214033e05ac5aa44fa24a98670a29"}, - {file = "pydantic-1.10.9-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b9cd67fb763248cbe38f0593cd8611bfe4b8ad82acb3bdf2b0898c23415a1f82"}, - {file = "pydantic-1.10.9-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f50e1764ce9353be67267e7fd0da08349397c7db17a562ad036aa7c8f4adfdb6"}, - {file = "pydantic-1.10.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73ef93e5e1d3c8e83f1ff2e7fdd026d9e063c7e089394869a6e2985696693766"}, - {file = "pydantic-1.10.9-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:128d9453d92e6e81e881dd7e2484e08d8b164da5507f62d06ceecf84bf2e21d3"}, - {file = "pydantic-1.10.9-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ad428e92ab68798d9326bb3e5515bc927444a3d71a93b4a2ca02a8a5d795c572"}, - {file = "pydantic-1.10.9-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fab81a92f42d6d525dd47ced310b0c3e10c416bbfae5d59523e63ea22f82b31e"}, - {file = "pydantic-1.10.9-cp38-cp38-win_amd64.whl", hash = "sha256:963671eda0b6ba6926d8fc759e3e10335e1dc1b71ff2a43ed2efd6996634dafb"}, - {file = "pydantic-1.10.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:970b1bdc6243ef663ba5c7e36ac9ab1f2bfecb8ad297c9824b542d41a750b298"}, - {file = "pydantic-1.10.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7e1d5290044f620f80cf1c969c542a5468f3656de47b41aa78100c5baa2b8276"}, - {file = "pydantic-1.10.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83fcff3c7df7adff880622a98022626f4f6dbce6639a88a15a3ce0f96466cb60"}, - {file = "pydantic-1.10.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0da48717dc9495d3a8f215e0d012599db6b8092db02acac5e0d58a65248ec5bc"}, - {file = "pydantic-1.10.9-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:0a2aabdc73c2a5960e87c3ffebca6ccde88665616d1fd6d3db3178ef427b267a"}, - {file = "pydantic-1.10.9-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9863b9420d99dfa9c064042304868e8ba08e89081428a1c471858aa2af6f57c4"}, - {file = "pydantic-1.10.9-cp39-cp39-win_amd64.whl", hash = "sha256:e7c9900b43ac14110efa977be3da28931ffc74c27e96ee89fbcaaf0b0fe338e1"}, - {file = "pydantic-1.10.9-py3-none-any.whl", hash = "sha256:6cafde02f6699ce4ff643417d1a9223716ec25e228ddc3b436fe7e2d25a1f305"}, - {file = "pydantic-1.10.9.tar.gz", hash = "sha256:95c70da2cd3b6ddf3b9645ecaa8d98f3d80c606624b6d245558d202cd23ea3be"}, + {file = "pydantic-1.10.10-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:adad1ee4ab9888f12dac2529276704e719efcf472e38df7813f5284db699b4ec"}, + {file = "pydantic-1.10.10-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7a7db03339893feef2092ff7b1afc9497beed15ebd4af84c3042a74abce02d48"}, + {file = "pydantic-1.10.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67b3714b97ff84b2689654851c2426389bcabfac9080617bcf4306c69db606f6"}, + {file = "pydantic-1.10.10-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edfdf0a5abc5c9bf2052ebaec20e67abd52e92d257e4f2d30e02c354ed3e6030"}, + {file = "pydantic-1.10.10-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20a3b30fd255eeeb63caa9483502ba96b7795ce5bf895c6a179b3d909d9f53a6"}, + {file = "pydantic-1.10.10-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:db4c7f7e60ca6f7d6c1785070f3e5771fcb9b2d88546e334d2f2c3934d949028"}, + {file = "pydantic-1.10.10-cp310-cp310-win_amd64.whl", hash = "sha256:a2d5be50ac4a0976817144c7d653e34df2f9436d15555189f5b6f61161d64183"}, + {file = "pydantic-1.10.10-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:566a04ba755e8f701b074ffb134ddb4d429f75d5dced3fbd829a527aafe74c71"}, + {file = "pydantic-1.10.10-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f79db3652ed743309f116ba863dae0c974a41b688242482638b892246b7db21d"}, + {file = "pydantic-1.10.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c62376890b819bebe3c717a9ac841a532988372b7e600e76f75c9f7c128219d5"}, + {file = "pydantic-1.10.10-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4870f13a4fafd5bc3e93cff3169222534fad867918b188e83ee0496452978437"}, + {file = "pydantic-1.10.10-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:990027e77cda6072a566e433b6962ca3b96b4f3ae8bd54748e9d62a58284d9d7"}, + {file = "pydantic-1.10.10-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8c40964596809eb616d94f9c7944511f620a1103d63d5510440ed2908fc410af"}, + {file = "pydantic-1.10.10-cp311-cp311-win_amd64.whl", hash = "sha256:ea9eebc2ebcba3717e77cdeee3f6203ffc0e78db5f7482c68b1293e8cc156e5e"}, + {file = "pydantic-1.10.10-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:762aa598f79b4cac2f275d13336b2dd8662febee2a9c450a49a2ab3bec4b385f"}, + {file = "pydantic-1.10.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6dab5219659f95e357d98d70577b361383057fb4414cfdb587014a5f5c595f7b"}, + {file = "pydantic-1.10.10-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3d4ee957a727ccb5a36f1b0a6dbd9fad5dedd2a41eada99a8df55c12896e18d"}, + {file = "pydantic-1.10.10-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b69f9138dec566962ec65623c9d57bee44412d2fc71065a5f3ebb3820bdeee96"}, + {file = "pydantic-1.10.10-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7aa75d1bd9cc275cf9782f50f60cddaf74cbaae19b6ada2a28e737edac420312"}, + {file = "pydantic-1.10.10-cp37-cp37m-win_amd64.whl", hash = "sha256:9f62a727f5c590c78c2d12fda302d1895141b767c6488fe623098f8792255fe5"}, + {file = "pydantic-1.10.10-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:aac218feb4af73db8417ca7518fb3bade4534fcca6e3fb00f84966811dd94450"}, + {file = "pydantic-1.10.10-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:88546dc10a40b5b52cae87d64666787aeb2878f9a9b37825aedc2f362e7ae1da"}, + {file = "pydantic-1.10.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c41bbaae89e32fc582448e71974de738c055aef5ab474fb25692981a08df808a"}, + {file = "pydantic-1.10.10-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b71bd504d1573b0b722ae536e8ffb796bedeef978979d076bf206e77dcc55a5"}, + {file = "pydantic-1.10.10-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:e088e3865a2270ecbc369924cd7d9fbc565667d9158e7f304e4097ebb9cf98dd"}, + {file = "pydantic-1.10.10-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3403a090db45d4027d2344859d86eb797484dfda0706cf87af79ace6a35274ef"}, + {file = "pydantic-1.10.10-cp38-cp38-win_amd64.whl", hash = "sha256:e0014e29637125f4997c174dd6167407162d7af0da73414a9340461ea8573252"}, + {file = "pydantic-1.10.10-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9965e49c6905840e526e5429b09e4c154355b6ecc0a2f05492eda2928190311d"}, + {file = "pydantic-1.10.10-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:748d10ab6089c5d196e1c8be9de48274f71457b01e59736f7a09c9dc34f51887"}, + {file = "pydantic-1.10.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86936c383f7c38fd26d35107eb669c85d8f46dfceae873264d9bab46fe1c7dde"}, + {file = "pydantic-1.10.10-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7a26841be620309a9697f5b1ffc47dce74909e350c5315ccdac7a853484d468a"}, + {file = "pydantic-1.10.10-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:409b810f387610cc7405ab2fa6f62bdf7ea485311845a242ebc0bd0496e7e5ac"}, + {file = "pydantic-1.10.10-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ce937a2a2c020bcad1c9fde02892392a1123de6dda906ddba62bfe8f3e5989a2"}, + {file = "pydantic-1.10.10-cp39-cp39-win_amd64.whl", hash = "sha256:37ebddef68370e6f26243acc94de56d291e01227a67b2ace26ea3543cf53dd5f"}, + {file = "pydantic-1.10.10-py3-none-any.whl", hash = "sha256:a5939ec826f7faec434e2d406ff5e4eaf1716eb1f247d68cd3d0b3612f7b4c8a"}, + {file = "pydantic-1.10.10.tar.gz", hash = "sha256:3b8d5bd97886f9eb59260594207c9f57dce14a6f869c6ceea90188715d29921a"}, ] [package.dependencies] @@ -1162,13 +1243,13 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "setuptools" -version = "67.8.0" +version = "68.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.7" files = [ - {file = "setuptools-67.8.0-py3-none-any.whl", hash = "sha256:5df61bf30bb10c6f756eb19e7c9f3b473051f48db77fddbe06ff2ca307df9a6f"}, - {file = "setuptools-67.8.0.tar.gz", hash = "sha256:62642358adc77ffa87233bc4d2354c4b2682d214048f500964dbe760ccedf102"}, + {file = "setuptools-68.0.0-py3-none-any.whl", hash = "sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f"}, + {file = "setuptools-68.0.0.tar.gz", hash = "sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235"}, ] [package.extras] @@ -1257,20 +1338,20 @@ test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"] [[package]] name = "sphinx" -version = "6.2.1" +version = "7.0.1" description = "Python documentation generator" optional = false python-versions = ">=3.8" files = [ - {file = "Sphinx-6.2.1.tar.gz", hash = "sha256:6d56a34697bb749ffa0152feafc4b19836c755d90a7c59b72bc7dfd371b9cc6b"}, - {file = "sphinx-6.2.1-py3-none-any.whl", hash = "sha256:97787ff1fa3256a3eef9eda523a63dbf299f7b47e053cfcf684a1c2a8380c912"}, + {file = "Sphinx-7.0.1.tar.gz", hash = "sha256:61e025f788c5977d9412587e733733a289e2b9fdc2fef8868ddfbfc4ccfe881d"}, + {file = "sphinx-7.0.1-py3-none-any.whl", hash = "sha256:60c5e04756c1709a98845ed27a2eed7a556af3993afb66e77fec48189f742616"}, ] [package.dependencies] alabaster = ">=0.7,<0.8" babel = ">=2.9" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.18.1,<0.20" +docutils = ">=0.18.1,<0.21" imagesize = ">=1.3" importlib-metadata = {version = ">=4.8", markers = "python_version < \"3.10\""} Jinja2 = ">=3.0" @@ -1564,13 +1645,13 @@ test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6. [[package]] name = "typing-extensions" -version = "4.6.3" +version = "4.7.0" description = "Backported and Experimental Type Hints for Python 3.7+" optional = false python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.6.3-py3-none-any.whl", hash = "sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26"}, - {file = "typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5"}, + {file = "typing_extensions-4.7.0-py3-none-any.whl", hash = "sha256:5d8c9dac95c27d20df12fb1d97b9793ab8b2af8a3a525e68c80e21060c161771"}, + {file = "typing_extensions-4.7.0.tar.gz", hash = "sha256:935ccf31549830cda708b42289d44b6f74084d616a00be651601a4f968e77c82"}, ] [[package]] @@ -1641,4 +1722,4 @@ cli = ["PyYAML", "fastapi", "jinja2", "rich", "typer", "typer", "uvicorn"] [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "b240e9ef79587c5339396af9b3c235d245c9890a02514dc8709b1812e925ae94" +content-hash = "0f40a42c9d56548e66fdd882f0d90e8b1d2d3ac0bd0456e24ec4ae03512799ff" diff --git a/pyproject.toml b/pyproject.toml index c14f34e0..e1e5d621 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,11 +42,18 @@ httpx = "^0.24.0" [tool.poetry.group.docs.dependencies] Sphinx = [ { version = "^5.3", python = "<3.8" }, - { version = "^6.2", python = ">=3.8" }, + { version = "^7.0", python = ">=3.8" }, ] sphinx-prompt = "^1.5" sphinx-copybutton = "^0.5.0" -myst-parser = "^1.0" +myst-parser = [ + { version = "^1.0", python = "<3.8" }, + { version = "^2.0", python = ">=3.8" }, +] +markdown-it-py = [ + { version = "^2.2", python = "<3.8" }, + { version = "^3.0", python = ">=3.8" }, +] furo = "^2023.3" [tool.poetry.extras] From 467df79511583932571fb79f228b800d96418c6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jul 2023 02:31:28 +0000 Subject: [PATCH 25/52] Bump fastapi from 0.99.0 to 0.99.1 Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.99.0 to 0.99.1. - [Release notes](https://github.com/tiangolo/fastapi/releases) - [Commits](https://github.com/tiangolo/fastapi/compare/0.99.0...0.99.1) --- updated-dependencies: - dependency-name: fastapi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index ca67fbd4..e14678f6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -374,13 +374,13 @@ tests = ["asttokens", "littleutils", "pytest", "rich"] [[package]] name = "fastapi" -version = "0.99.0" +version = "0.99.1" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = true python-versions = ">=3.7" files = [ - {file = "fastapi-0.99.0-py3-none-any.whl", hash = "sha256:b87fffddf9c761c5618f638b492cfb73bba1d208ab170b89122cce52d1fb044a"}, - {file = "fastapi-0.99.0.tar.gz", hash = "sha256:eab70f072d6c424d16f02ba635dc0945fecab549210e7961c838f4b467f0b4a7"}, + {file = "fastapi-0.99.1-py3-none-any.whl", hash = "sha256:976df7bab51ac7beda9f68c4513b8c4490b5c1135c72aafd0a5ee4023ec5282e"}, + {file = "fastapi-0.99.1.tar.gz", hash = "sha256:ac78f717cd80d657bd183f94d33b9bda84aa376a46a9dab513586b8eef1dc6fc"}, ] [package.dependencies] @@ -1722,4 +1722,4 @@ cli = ["PyYAML", "fastapi", "jinja2", "rich", "typer", "typer", "uvicorn"] [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "0f40a42c9d56548e66fdd882f0d90e8b1d2d3ac0bd0456e24ec4ae03512799ff" +content-hash = "93a3a1225181386d79063eacbd8cdaefb20d86a79aa2dd88ed5169d506bba775" From 863e676c215cdcfb98d19e9571fdc54a10017daa Mon Sep 17 00:00:00 2001 From: Hirokazu Kiyomaru Date: Mon, 3 Jul 2023 15:13:19 +0900 Subject: [PATCH 26/52] fix method names according to naming convention --- examples/use_discourse_relation_analysis.py | 2 +- ...e_predicate_argument_structure_analysis.py | 2 +- src/rhoknp/cli/stats.py | 14 ++--- src/rhoknp/cohesion/argument.py | 9 ++-- src/rhoknp/cohesion/coreference.py | 4 +- src/rhoknp/cohesion/discourse.py | 13 +++-- src/rhoknp/cohesion/exophora.py | 1 - src/rhoknp/cohesion/pas.py | 1 - src/rhoknp/processors/jumanpp.py | 2 +- src/rhoknp/processors/knp.py | 12 +++-- src/rhoknp/units/base_phrase.py | 4 +- src/rhoknp/units/clause.py | 4 +- src/rhoknp/units/document.py | 50 ++++++++---------- src/rhoknp/units/morpheme.py | 2 +- src/rhoknp/units/phrase.py | 2 +- src/rhoknp/units/sentence.py | 44 +++++++--------- tests/cohesion/test_argument.py | 4 +- tests/cohesion/test_pas.py | 2 +- tests/units/test_clause.py | 4 +- tests/units/test_document.py | 52 +++++++++---------- tests/units/test_sentence.py | 30 +++++------ 21 files changed, 123 insertions(+), 135 deletions(-) diff --git a/examples/use_discourse_relation_analysis.py b/examples/use_discourse_relation_analysis.py index a00871a6..4a6ff765 100644 --- a/examples/use_discourse_relation_analysis.py +++ b/examples/use_discourse_relation_analysis.py @@ -14,7 +14,7 @@ sent = knp.apply_to_sentence(sys.argv[1]) # Get information. -if sent.need_clause_tag is True: +if sent.is_clause_tag_required is True: print("KNP might be too old; please update it.") sys.exit(1) diff --git a/examples/use_predicate_argument_structure_analysis.py b/examples/use_predicate_argument_structure_analysis.py index 5b22027d..5366b056 100644 --- a/examples/use_predicate_argument_structure_analysis.py +++ b/examples/use_predicate_argument_structure_analysis.py @@ -18,7 +18,7 @@ # Get information. for base_phrase in sent.base_phrases: pas = base_phrase.pas - if pas.is_empty is True: + if pas.is_empty() is True: continue all_arguments: Dict[str, List[Argument]] = pas.get_all_arguments() print(f"Predicate: {pas.predicate}") diff --git a/src/rhoknp/cli/stats.py b/src/rhoknp/cli/stats.py index a93497a3..3e72129b 100644 --- a/src/rhoknp/cli/stats.py +++ b/src/rhoknp/cli/stats.py @@ -15,17 +15,17 @@ def get_document_statistics(document: Document) -> Dict[str, Dict[str, int]]: """ stats: Dict[str, Any] = {"unit": {}, "cohesion": {}, "other": {}} # Unit - if document.need_senter is False: + if document.is_senter_required() is False: stats["unit"]["sentence"] = len(document.sentences) - if document.need_clause_tag is False: + if document.is_clause_tag_required() is False: stats["unit"]["clause"] = len(document.clauses) - if document.need_knp is False: + if document.is_knp_required() is False: stats["unit"]["phrase"] = len(document.phrases) stats["unit"]["base_phrase"] = len(document.base_phrases) - if document.need_jumanpp is False: + if document.is_jumanpp_required() is False: stats["unit"]["morpheme"] = len(document.morphemes) # Cohesion - if document.need_knp is False: + if document.is_knp_required() is False: stats["cohesion"]["predicate"] = sum( len([rel_tag for rel_tag in bp.rel_tags if rel_tag.type in CASE_TYPES]) > 0 for bp in document.base_phrases ) @@ -35,8 +35,8 @@ def get_document_statistics(document: Document) -> Dict[str, Dict[str, int]]: stats["cohesion"]["coreference"] = sum( len([rel_tag for rel_tag in bp.rel_tags if rel_tag.type in COREF_TYPES]) for bp in document.base_phrases ) - if document.need_clause_tag is False: + if document.is_clause_tag_required() is False: stats["cohesion"]["discourse"] = sum(len(clause.discourse_relations) for clause in document.clauses) - if document.need_senter is False: + if document.is_senter_required() is False: stats["other"]["named_entity"] = sum(len(sentence.named_entities) for sentence in document.sentences) return stats diff --git a/src/rhoknp/cohesion/argument.py b/src/rhoknp/cohesion/argument.py index f96bcab8..c3cc0963 100644 --- a/src/rhoknp/cohesion/argument.py +++ b/src/rhoknp/cohesion/argument.py @@ -55,11 +55,6 @@ def __repr__(self) -> str: def __eq__(self, other: Any) -> bool: raise NotImplementedError - @property - def is_special(self) -> bool: - """外界照応なら True.""" - return self.type == ArgumentType.EXOPHORA - @property def pas(self) -> "Pas": """述語項構造.""" @@ -71,6 +66,10 @@ def pas(self, pas: "Pas") -> None: """述語項構造.""" self._pas = pas + def is_special(self) -> bool: + """外界照応なら True.""" + return self.type == ArgumentType.EXOPHORA + class EndophoraArgument(BaseArgument): """文脈中の基本句に対応する項を表すクラス. diff --git a/src/rhoknp/cohesion/coreference.py b/src/rhoknp/cohesion/coreference.py index 80a023e6..268a19fb 100644 --- a/src/rhoknp/cohesion/coreference.py +++ b/src/rhoknp/cohesion/coreference.py @@ -108,7 +108,7 @@ def get_or_create_entity( Returns: Entity: 作成されたエンティティ. """ - if exophora_referent is not None and exophora_referent.is_singleton is True: + if exophora_referent is not None and exophora_referent.is_singleton() is True: entities = [e for e in cls.entities.values() if exophora_referent == e.exophora_referent] # If a singleton entity already exists, do not create a new entity, but return that entity. if entities: @@ -178,7 +178,7 @@ def merge_entities( source_entity.add_mention(tm, is_nonidentical=target_entity in tm.entities_nonidentical) # Arguments also have entity ids and will be updated. source_sentence = source_mention.sentence - pas_list = source_mention.document.pas_list if source_sentence.has_document else source_sentence.pas_list + pas_list = source_mention.document.pas_list if source_sentence.has_document() else source_sentence.pas_list for arg in [arg for pas in pas_list for args in pas.get_all_arguments(relax=False).values() for arg in args]: if isinstance(arg, ExophoraArgument) and arg.eid == target_entity.eid: arg.eid = source_entity.eid diff --git a/src/rhoknp/cohesion/discourse.py b/src/rhoknp/cohesion/discourse.py index 232e40e0..4f557a2d 100644 --- a/src/rhoknp/cohesion/discourse.py +++ b/src/rhoknp/cohesion/discourse.py @@ -103,8 +103,7 @@ def label(self) -> DiscourseRelationLabel: return DiscourseRelationLabel.EVIDENCE raise AssertionError # unreachable - @property - def need_swap(self) -> bool: + def is_swap_needed(self) -> bool: """談話関係が逆方向であれば True.""" return self in { DiscourseRelationTag.CAUSE_REASON_BACKWARD, @@ -161,7 +160,7 @@ def from_clause_function_fstring(cls, fstring: str, modifier: "Clause") -> Optio head = modifier.parent if head is None: return None - if tag.need_swap: + if tag.is_swap_needed(): # NOTE: Currently, no clause function requires swap. modifier, head = head, modifier # pragma: no cover return cls( @@ -193,12 +192,12 @@ def from_backward_clause_function_fstring(cls, fstring: str, head: "Clause") -> return None tag = DiscourseRelationTag(label) label = tag.label - if head.sentence.has_document is False: + if head.sentence.has_document() is False: return None # cannot find modifier if head.sentence.index == 0: return None # cannot find modifier modifier = head.sentence.document.sentences[head.sentence.index - 1].clauses[-1] - if tag.need_swap: + if tag.is_swap_needed(): modifier, head = head, modifier return cls( sid=head.sentence.sid, @@ -231,7 +230,7 @@ def from_discourse_relation_fstring(cls, fstring: str, modifier: "Clause") -> Op tag = DiscourseRelationTag(tag) category = tag.label head_sentence: Optional["Sentence"] = None - if modifier.sentence.has_document: + if modifier.sentence.has_document(): sentences = modifier.document.sentences else: sentences = [modifier.sentence] @@ -250,7 +249,7 @@ def from_discourse_relation_fstring(cls, fstring: str, modifier: "Clause") -> Op if head.end != head_base_phrase: logger.warning(f"invalid clause tag in {sid}") return None - if tag.need_swap: + if tag.is_swap_needed(): modifier, head = head, modifier return cls(sid, base_phrase_index, category, tag, modifier, head) diff --git a/src/rhoknp/cohesion/exophora.py b/src/rhoknp/cohesion/exophora.py index b551fd4d..4a7dd703 100644 --- a/src/rhoknp/cohesion/exophora.py +++ b/src/rhoknp/cohesion/exophora.py @@ -50,7 +50,6 @@ def text(self) -> str: assert self._other_text is not None return self._other_text - @property def is_singleton(self) -> bool: """文書中に1つしか存在しないエンティティであれば True.""" if self.type in (ExophoraReferentType.WRITER, ExophoraReferentType.READER): diff --git a/src/rhoknp/cohesion/pas.py b/src/rhoknp/cohesion/pas.py index ea11d4e4..2849144b 100644 --- a/src/rhoknp/cohesion/pas.py +++ b/src/rhoknp/cohesion/pas.py @@ -57,7 +57,6 @@ def sid(self) -> str: """文 ID.""" return self._predicate.sid - @property def is_empty(self) -> bool: """述語が項を持たなければ True.""" for args in self._arguments.values(): diff --git a/src/rhoknp/processors/jumanpp.py b/src/rhoknp/processors/jumanpp.py index ed71658b..66b1acf4 100644 --- a/src/rhoknp/processors/jumanpp.py +++ b/src/rhoknp/processors/jumanpp.py @@ -83,7 +83,7 @@ def apply_to_document(self, document: Union[Document, str]) -> Document: if isinstance(document, str): document = Document(document) - if document.need_senter is True: + if document.is_senter_required() is True: logger.debug("document needs to be split into sentences") if self.senter is None: logger.debug("senter is not specified; use RegexSenter") diff --git a/src/rhoknp/processors/knp.py b/src/rhoknp/processors/knp.py index 69e792c4..e5f98814 100644 --- a/src/rhoknp/processors/knp.py +++ b/src/rhoknp/processors/knp.py @@ -94,7 +94,7 @@ def apply_to_document(self, document: Union[Document, str]) -> Document: if isinstance(document, str): document = Document(document) - if document.need_senter is True: + if document.is_senter_required() is True: logger.debug("document needs to be split into sentences") if self.senter is None: logger.debug("senter is not specified; use RegexSenter") @@ -102,7 +102,7 @@ def apply_to_document(self, document: Union[Document, str]) -> Document: logger.debug(self.senter) document = self.senter.apply_to_document(document) - if document.need_jumanpp is True: + if document.is_jumanpp_required() is True: logger.debug("document needs to be processed by Juman++") if self.jumanpp is None: logger.info("jumanpp is not specified; use Jumanpp") @@ -113,7 +113,9 @@ def apply_to_document(self, document: Union[Document, str]) -> Document: with self._lock: knp_text = "" for sentence in document.sentences: - self._proc.stdin.write(sentence.to_jumanpp() if sentence.need_knp is True else sentence.to_knp()) + self._proc.stdin.write( + sentence.to_jumanpp() if sentence.is_knp_required() is True else sentence.to_knp() + ) self._proc.stdin.flush() while self.is_available(): line = self._proc.stdout.readline() @@ -141,7 +143,7 @@ def apply_to_sentence(self, sentence: Union[Sentence, str]) -> Sentence: if isinstance(sentence, str): sentence = Sentence(sentence) - if sentence.need_jumanpp is True: + if sentence.is_jumanpp_required() is True: logger.debug("sentence needs to be processed by Juman++") if self.jumanpp is None: logger.info("jumanpp is not specified when initializing KNP: use Jumanpp with no option") @@ -149,7 +151,7 @@ def apply_to_sentence(self, sentence: Union[Sentence, str]) -> Sentence: sentence = self.jumanpp.apply_to_sentence(sentence) with self._lock: - self._proc.stdin.write(sentence.to_jumanpp() if sentence.need_knp is True else sentence.to_knp()) + self._proc.stdin.write(sentence.to_jumanpp() if sentence.is_knp_required() is True else sentence.to_knp()) self._proc.stdin.flush() knp_text = "" while self.is_available(): diff --git a/src/rhoknp/units/base_phrase.py b/src/rhoknp/units/base_phrase.py index b6e87001..d194e6f3 100644 --- a/src/rhoknp/units/base_phrase.py +++ b/src/rhoknp/units/base_phrase.py @@ -102,7 +102,7 @@ def __eq__(self, other: Any) -> bool: @cached_property def global_index(self) -> int: """文書全体におけるインデックス.""" - if self.sentence.has_document is False: + if self.sentence.has_document() is False: return self.index if self.index > 0: return self.sentence.base_phrases[self.index - 1].global_index + 1 @@ -332,7 +332,7 @@ def _add_coreference(self, rel_tag: RelTag) -> None: def _get_target_base_phrase(self, rel_tag: RelTag) -> Optional["BasePhrase"]: """rel_tag が指す基本句を返す.見つからなければ None を返す.""" - sentences = self.document.sentences if self.sentence.has_document else [self.sentence] + sentences = self.document.sentences if self.sentence.has_document() else [self.sentence] sentences = [sent for sent in sentences if sent.sid == rel_tag.sid] if not sentences: logger.warning(f"{self.sentence.sid}: relation with unknown sid found: {rel_tag.sid}") diff --git a/src/rhoknp/units/clause.py b/src/rhoknp/units/clause.py index ac4834c3..b903f230 100644 --- a/src/rhoknp/units/clause.py +++ b/src/rhoknp/units/clause.py @@ -78,7 +78,7 @@ def __eq__(self, other: Any) -> bool: @cached_property def global_index(self) -> int: """文書全体におけるインデックス.""" - if self.sentence.has_document is False: + if self.sentence.has_document() is False: return self.index if self.index > 0: return self.sentence.clauses[self.index - 1].global_index + 1 @@ -184,12 +184,10 @@ def children(self) -> List["Clause"]: """この節に係っている節のリスト.""" return [clause for clause in self.sentence.clauses if clause.parent == self] - @cached_property def is_adnominal(self) -> bool: """連体修飾節なら True.""" return self.end.features.get("節-区切", "") == "連体修飾" - @cached_property def is_sentential_complement(self) -> bool: """補文節なら True.""" return self.end.features.get("節-区切", "") == "補文" diff --git a/src/rhoknp/units/document.py b/src/rhoknp/units/document.py index d810b470..a9b05cbd 100644 --- a/src/rhoknp/units/document.py +++ b/src/rhoknp/units/document.py @@ -44,7 +44,7 @@ def __post_init__(self) -> None: super().__post_init__() # Set doc_id. - if self.need_senter is False and len(self.sentences) > 0: + if self.is_senter_required() is False and len(self.sentences) > 0: doc_ids = [sentence.doc_id for sentence in self.sentences] self.doc_id = doc_ids[0] if not all(doc_id == self.doc_id for doc_id in doc_ids): @@ -157,26 +157,6 @@ def pas_list(self) -> List[Pas]: """ return [pas for sentence in self.sentences for pas in sentence.pas_list] - @property - def need_senter(self) -> bool: - """文分割がまだなら True.""" - return self._sentences is None - - @property - def need_jumanpp(self) -> bool: - """Juman++ による形態素解析がまだなら True.""" - return self.need_senter or any(sentence.need_jumanpp for sentence in self.sentences) - - @property - def need_knp(self) -> bool: - """KNP による構文解析がまだなら True.""" - return self.need_senter or any(sentence.need_knp for sentence in self.sentences) - - @property - def need_clause_tag(self) -> bool: - """KNP による節-主辞・節-区切のタグ付与がまだなら True.""" - return self.need_senter or any(sentence.need_clause_tag for sentence in self.sentences) - @classmethod def from_raw_text(cls, text: str) -> "Document": """文書クラスのインスタンスを文書の生テキストから初期化. @@ -244,9 +224,9 @@ def from_sentences(cls, sentences: Sequence[Union[Sentence, str]]) -> "Document" sentences_ = [] for sentence in sentences: if isinstance(sentence, Sentence): - if sentence.need_jumanpp is True: + if sentence.is_jumanpp_required() is True: sentences_.append(Sentence.from_raw_text(sentence.text, post_init=False)) - elif sentence.need_knp is True: + elif sentence.is_knp_required() is True: sentences_.append(Sentence.from_jumanpp(sentence.to_jumanpp(), post_init=False)) else: sentences_.append(Sentence.from_knp(sentence.to_knp(), post_init=False)) @@ -367,17 +347,33 @@ def from_knp(cls, knp_text: str) -> "Document": document.__post_init__() return document + def is_senter_required(self) -> bool: + """文分割がまだなら True.""" + return self._sentences is None + + def is_jumanpp_required(self) -> bool: + """Juman++ による形態素解析がまだなら True.""" + return self.is_senter_required() or any(sentence.is_jumanpp_required() for sentence in self.sentences) + + def is_knp_required(self) -> bool: + """KNP による構文解析がまだなら True.""" + return self.is_senter_required() or any(sentence.is_knp_required() for sentence in self.sentences) + + def is_clause_tag_required(self) -> bool: + """KNP による節-主辞・節-区切のタグ付与がまだなら True.""" + return self.is_senter_required() or any(sentence.is_clause_tag_required() for sentence in self.sentences) + def reparse(self) -> "Document": """文書を再構築. .. note:: 解析結果に対する編集を有効にする際に実行する必要がある. """ - if self.need_knp is False: + if self.is_knp_required() is False: return Document.from_knp(self.to_knp()) - if self.need_jumanpp is False: + if self.is_jumanpp_required() is False: return Document.from_jumanpp(self.to_jumanpp()) - if self.need_senter is False: + if self.is_senter_required() is False: return Document.from_line_by_line_text(self.to_raw_text()) return Document.from_raw_text(self.to_raw_text()) @@ -387,7 +383,7 @@ def to_raw_text(self) -> str: .. note:: 文分割済みの場合は一行一文の形式で出力. """ - if self.need_senter is True: + if self.is_senter_required() is True: return self.text.rstrip() + "\n" return "".join(sentence.to_raw_text() for sentence in self.sentences) diff --git a/src/rhoknp/units/morpheme.py b/src/rhoknp/units/morpheme.py index 41be3ad2..ae9d2e92 100644 --- a/src/rhoknp/units/morpheme.py +++ b/src/rhoknp/units/morpheme.py @@ -117,7 +117,7 @@ def __eq__(self, other: Any) -> bool: @cached_property def global_index(self) -> int: """文書全体におけるインデックス.""" - if self.sentence.has_document is False: + if self.sentence.has_document() is False: return self.index if self.index > 0: return self.sentence.morphemes[self.index - 1].global_index + 1 diff --git a/src/rhoknp/units/phrase.py b/src/rhoknp/units/phrase.py index 99bd13f7..86ff9e15 100644 --- a/src/rhoknp/units/phrase.py +++ b/src/rhoknp/units/phrase.py @@ -56,7 +56,7 @@ def __eq__(self, other: Any) -> bool: @cached_property def global_index(self) -> int: """文書全体におけるインデックス.""" - if self.sentence.has_document is False: + if self.sentence.has_document() is False: return self.index if self.index > 0: return self.sentence.phrases[self.index - 1].global_index + 1 diff --git a/src/rhoknp/units/sentence.py b/src/rhoknp/units/sentence.py index 632ee387..c51dd16e 100644 --- a/src/rhoknp/units/sentence.py +++ b/src/rhoknp/units/sentence.py @@ -63,7 +63,7 @@ def __post_init__(self) -> None: # Find named entities in the sentence. self.named_entities = [] - if self.need_knp is False: + if self.is_knp_required() is False: for base_phrase in self.base_phrases: if "NE" not in base_phrase.features: continue @@ -268,27 +268,7 @@ def pas_list(self) -> List[Pas]: Raises: AttributeError: 解析結果にアクセスできない場合. """ - return [base_phrase.pas for base_phrase in self.base_phrases if base_phrase.pas.is_empty is False] - - @property - def has_document(self) -> bool: - """文書が設定されていたら True.""" - return self._document is not None - - @property - def need_jumanpp(self) -> bool: - """Juman++ による形態素解析がまだなら True.""" - return self._morphemes is None and self._phrases is None and self._clauses is None - - @property - def need_knp(self) -> bool: - """KNP による構文解析がまだなら True.""" - return self._phrases is None and self._clauses is None - - @property - def need_clause_tag(self) -> bool: - """KNP による節-主辞・節-区切のタグ付与がまだなら True.""" - return self._clauses is None + return [base_phrase.pas for base_phrase in self.base_phrases if base_phrase.pas.is_empty() is False] @classmethod def from_raw_text(cls, text: str, post_init: bool = True) -> "Sentence": @@ -447,6 +427,22 @@ def from_knp(cls, knp_text: str, post_init: bool = True) -> "Sentence": sentence.__post_init__() return sentence + def has_document(self) -> bool: + """文書が設定されていたら True.""" + return self._document is not None + + def is_jumanpp_required(self) -> bool: + """Juman++ による形態素解析がまだなら True.""" + return self._morphemes is None and self._phrases is None and self._clauses is None + + def is_knp_required(self) -> bool: + """KNP による構文解析がまだなら True.""" + return self._phrases is None and self._clauses is None + + def is_clause_tag_required(self) -> bool: + """KNP による節-主辞・節-区切のタグ付与がまだなら True.""" + return self._clauses is None + def to_raw_text(self) -> str: """生テキストフォーマットに変換.""" ret = "" @@ -486,9 +482,9 @@ def reparse(self) -> "Sentence": .. note:: 解析結果に対する編集を有効にする際に実行する必要がある. """ - if self.need_knp is False: + if self.is_knp_required() is False: return Sentence.from_knp(self.to_knp()) - elif self.need_jumanpp is False: + elif self.is_jumanpp_required() is False: return Sentence.from_jumanpp(self.to_jumanpp()) return Sentence.from_raw_text(self.to_raw_text()) diff --git a/tests/cohesion/test_argument.py b/tests/cohesion/test_argument.py index a218aeb9..6703bc45 100644 --- a/tests/cohesion/test_argument.py +++ b/tests/cohesion/test_argument.py @@ -39,7 +39,7 @@ def test_endophora_argument() -> None: assert argument.case == "ガ" assert argument.type == arg_type assert argument.optional is False - assert argument.is_special is False + assert argument.is_special() is False assert argument.pas == pas assert argument.base_phrase == argument_base_phrase with pytest.raises(AssertionError): @@ -87,7 +87,7 @@ def test_exophora_argument() -> None: assert argument.case == "ガ" assert argument.type == ArgumentType.EXOPHORA assert argument.optional is False - assert argument.is_special is True + assert argument.is_special() is True assert argument.pas == pas assert argument.exophora_referent == exophora_referent assert argument.eid == 3 diff --git a/tests/cohesion/test_pas.py b/tests/cohesion/test_pas.py index 050f48eb..3eb608e3 100644 --- a/tests/cohesion/test_pas.py +++ b/tests/cohesion/test_pas.py @@ -319,7 +319,7 @@ def test_attribute(case: Dict[str, Any]) -> None: assert pas.sid == case["sid"] assert pas.predicate.cfid == case["cfid"] assert set(pas.cases) == set(case["arguments"].keys()) - assert pas.is_empty == (len(case["arguments"]) == 0) + assert pas.is_empty() == (len(case["arguments"]) == 0) @pytest.mark.parametrize("case", CASES) diff --git a/tests/units/test_clause.py b/tests/units/test_clause.py index 2d6e8777..914dc7a7 100644 --- a/tests/units/test_clause.py +++ b/tests/units/test_clause.py @@ -352,13 +352,13 @@ def test_end_text(case: Dict[str, str]) -> None: @pytest.mark.parametrize("case", KNP_SNIPPETS) def test_is_adnominal(case: Dict[str, str]) -> None: clause = Clause.from_knp(case["knp"]) - assert clause.is_adnominal == case["is_adnominal"] + assert clause.is_adnominal() == case["is_adnominal"] @pytest.mark.parametrize("case", KNP_SNIPPETS) def test_is_sentential_complement(case: Dict[str, str]) -> None: clause = Clause.from_knp(case["knp"]) - assert clause.is_sentential_complement == case["is_sentential_complement"] + assert clause.is_sentential_complement() == case["is_sentential_complement"] def test_invalid_head_0() -> None: diff --git a/tests/units/test_document.py b/tests/units/test_document.py index 96b0f6c7..5b420ce2 100644 --- a/tests/units/test_document.py +++ b/tests/units/test_document.py @@ -423,65 +423,65 @@ def test_from_knp_error(): @pytest.mark.parametrize("case", CASES) def test_need_senter(case: Dict[str, str]) -> None: doc = Document.from_raw_text(case["raw_text"]) - assert doc.need_senter is True + assert doc.is_senter_required() is True doc = Document.from_sentences(case["sentences"]) - assert doc.need_senter is False + assert doc.is_senter_required() is False doc = Document.from_line_by_line_text(case["line_by_line_text"]) - assert doc.need_senter is False + assert doc.is_senter_required() is False doc = Document.from_jumanpp(case["jumanpp"]) - assert doc.need_senter is False + assert doc.is_senter_required() is False doc = Document.from_knp(case["knp_with_no_clause_tag"]) - assert doc.need_senter is False + assert doc.is_senter_required() is False doc = Document.from_knp(case["knp"]) - assert doc.need_senter is False + assert doc.is_senter_required() is False @pytest.mark.parametrize("case", CASES) def test_need_jumanpp(case: Dict[str, str]) -> None: doc = Document.from_raw_text(case["raw_text"]) - assert doc.need_jumanpp is True + assert doc.is_jumanpp_required() is True doc = Document.from_sentences(case["sentences"]) - assert doc.need_jumanpp is True + assert doc.is_jumanpp_required() is True doc = Document.from_line_by_line_text(case["line_by_line_text"]) - assert doc.need_jumanpp is True + assert doc.is_jumanpp_required() is True doc = Document.from_jumanpp(case["jumanpp"]) - assert doc.need_jumanpp is False + assert doc.is_jumanpp_required() is False doc = Document.from_knp(case["knp_with_no_clause_tag"]) - assert doc.need_jumanpp is False + assert doc.is_jumanpp_required() is False doc = Document.from_knp(case["knp"]) - assert doc.need_jumanpp is False + assert doc.is_jumanpp_required() is False @pytest.mark.parametrize("case", CASES) def test_need_knp(case: Dict[str, str]) -> None: doc = Document.from_raw_text(case["raw_text"]) - assert doc.need_knp is True + assert doc.is_knp_required() is True doc = Document.from_sentences(case["sentences"]) - assert doc.need_knp is True + assert doc.is_knp_required() is True doc = Document.from_line_by_line_text(case["line_by_line_text"]) - assert doc.need_knp is True + assert doc.is_knp_required() is True doc = Document.from_jumanpp(case["jumanpp"]) - assert doc.need_knp is True + assert doc.is_knp_required() is True doc = Document.from_knp(case["knp_with_no_clause_tag"]) - assert doc.need_knp is False + assert doc.is_knp_required() is False doc = Document.from_knp(case["knp"]) - assert doc.need_knp is False + assert doc.is_knp_required() is False @pytest.mark.parametrize("case", CASES) def test_need_clause_tag(case: Dict[str, str]) -> None: doc = Document.from_raw_text(case["raw_text"]) - assert doc.need_clause_tag is True + assert doc.is_clause_tag_required() is True doc = Document.from_sentences(case["sentences"]) - assert doc.need_clause_tag is True + assert doc.is_clause_tag_required() is True doc = Document.from_line_by_line_text(case["line_by_line_text"]) - assert doc.need_clause_tag is True + assert doc.is_clause_tag_required() is True doc = Document.from_jumanpp(case["jumanpp"]) - assert doc.need_clause_tag is True + assert doc.is_clause_tag_required() is True doc = Document.from_knp(case["knp_with_no_clause_tag"]) - assert doc.need_clause_tag is True + assert doc.is_clause_tag_required() is True doc = Document.from_knp(case["knp"]) - assert doc.need_clause_tag is False + assert doc.is_clause_tag_required() is False @pytest.mark.parametrize("case", CASES) @@ -806,12 +806,12 @@ def test_cut_paste(case: Dict[str, str]) -> None: sub_docs = list(map(Document.from_sentences, [[sent] for sent in doc.sentences])) for sub_doc in sub_docs: assert len(sub_doc.sentences) == 1 - assert sub_doc.need_knp is False + assert sub_doc.is_knp_required() is False # Merge the sub-documents into a new document new_doc = Document.from_sentences([sent for sub_doc in sub_docs for sent in sub_doc.sentences]) assert len(new_doc.sentences) == len(doc.sentences) - assert new_doc.need_knp is False + assert new_doc.is_knp_required() is False @pytest.mark.parametrize("case", CASES) diff --git a/tests/units/test_sentence.py b/tests/units/test_sentence.py index 17952603..d93181e6 100644 --- a/tests/units/test_sentence.py +++ b/tests/units/test_sentence.py @@ -395,43 +395,43 @@ def test_from_knp_invalid_input(): @pytest.mark.parametrize("case", CASES) def test_need_jumanpp(case: Dict[str, str]) -> None: sent = Sentence.from_raw_text(case["raw_text"]) - assert sent.need_jumanpp is True + assert sent.is_jumanpp_required() is True sent = Sentence.from_raw_text(case["line_by_line_text"]) - assert sent.need_jumanpp is True + assert sent.is_jumanpp_required() is True sent = Sentence.from_jumanpp(case["jumanpp"]) - assert sent.need_jumanpp is False + assert sent.is_jumanpp_required() is False sent = Sentence.from_knp(case["knp_with_no_clause_tag"]) - assert sent.need_jumanpp is False + assert sent.is_jumanpp_required() is False sent = Sentence.from_knp(case["knp"]) - assert sent.need_jumanpp is False + assert sent.is_jumanpp_required() is False @pytest.mark.parametrize("case", CASES) def test_need_knp(case: Dict[str, str]) -> None: sent = Sentence.from_raw_text(case["raw_text"]) - assert sent.need_knp is True + assert sent.is_knp_required() is True sent = Sentence.from_raw_text(case["line_by_line_text"]) - assert sent.need_knp is True + assert sent.is_knp_required() is True sent = Sentence.from_jumanpp(case["jumanpp"]) - assert sent.need_knp is True + assert sent.is_knp_required() is True sent = Sentence.from_knp(case["knp_with_no_clause_tag"]) - assert sent.need_knp is False + assert sent.is_knp_required() is False sent = Sentence.from_knp(case["knp"]) - assert sent.need_knp is False + assert sent.is_knp_required() is False @pytest.mark.parametrize("case", CASES) def test_need_clause_tag(case: Dict[str, str]) -> None: sent = Sentence.from_raw_text(case["raw_text"]) - assert sent.need_clause_tag is True + assert sent.is_clause_tag_required() is True sent = Sentence.from_raw_text(case["line_by_line_text"]) - assert sent.need_clause_tag is True + assert sent.is_clause_tag_required() is True sent = Sentence.from_jumanpp(case["jumanpp"]) - assert sent.need_clause_tag is True + assert sent.is_clause_tag_required() is True sent = Sentence.from_knp(case["knp_with_no_clause_tag"]) - assert sent.need_clause_tag is True + assert sent.is_clause_tag_required() is True sent = Sentence.from_knp(case["knp"]) - assert sent.need_clause_tag is False + assert sent.is_clause_tag_required() is False @pytest.mark.parametrize("case", CASES) From 724277883c384d164ebd42ed653fe94478458ff2 Mon Sep 17 00:00:00 2001 From: Hirokazu Kiyomaru Date: Wed, 5 Jul 2023 10:58:52 +0900 Subject: [PATCH 27/52] rename utils/util.py to utils/comment.py and move comment-related functions --- src/rhoknp/processors/kwja.py | 5 +++-- src/rhoknp/units/document.py | 3 ++- src/rhoknp/units/sentence.py | 22 +++++-------------- src/rhoknp/utils/{util.py => comment.py} | 16 +++++++++++++- src/rhoknp/utils/reader.py | 4 ++-- tests/utils/{test_util.py => test_comment.py} | 20 +++++++++++++++-- 6 files changed, 45 insertions(+), 25 deletions(-) rename src/rhoknp/utils/{util.py => comment.py} (69%) rename tests/utils/{test_util.py => test_comment.py} (64%) diff --git a/src/rhoknp/processors/kwja.py b/src/rhoknp/processors/kwja.py index 0a34faa9..5fe38700 100644 --- a/src/rhoknp/processors/kwja.py +++ b/src/rhoknp/processors/kwja.py @@ -6,6 +6,7 @@ from rhoknp.processors.processor import Processor from rhoknp.units import Document, Morpheme, Sentence +from rhoknp.utils.comment import is_comment_line logger = logging.getLogger(__name__) @@ -110,7 +111,7 @@ def apply_to_document(self, document: Union[Document, str]) -> Document: for line in out_text.split("\n"): if line.strip() == "": continue - if Sentence.is_comment_line(line) and sentence_lines: + if is_comment_line(line) and sentence_lines: sentences.append( self._create_sentence_from_words_format("\n".join(sentence_lines) + "\n", post_init=False) ) @@ -171,7 +172,7 @@ def _create_sentence_from_words_format(text: str, post_init: bool = True) -> Sen for line in text.split("\n"): if line.strip() == "": continue - if Sentence.is_comment_line(line): + if is_comment_line(line): sentence.comment = line continue words: List[str] = line.split(" ") diff --git a/src/rhoknp/units/document.py b/src/rhoknp/units/document.py index a9b05cbd..985cf4b3 100644 --- a/src/rhoknp/units/document.py +++ b/src/rhoknp/units/document.py @@ -9,6 +9,7 @@ from rhoknp.units.phrase import Phrase from rhoknp.units.sentence import Sentence from rhoknp.units.unit import Unit +from rhoknp.utils.comment import is_comment_line logger = logging.getLogger(__name__) @@ -200,7 +201,7 @@ def from_line_by_line_text(cls, text: str) -> "Document": if line.strip() == "": continue sentence_lines.append(line) - if Sentence.is_comment_line(line): + if is_comment_line(line): continue sentences.append(Sentence.from_raw_text("\n".join(sentence_lines), post_init=False)) sentence_lines = [] diff --git a/src/rhoknp/units/sentence.py b/src/rhoknp/units/sentence.py index c51dd16e..a4ce87ee 100644 --- a/src/rhoknp/units/sentence.py +++ b/src/rhoknp/units/sentence.py @@ -9,7 +9,7 @@ from rhoknp.units.morpheme import Morpheme from rhoknp.units.phrase import Phrase from rhoknp.units.unit import Unit -from rhoknp.utils.util import _extract_did_and_sid +from rhoknp.utils.comment import extract_did_and_sid, is_comment_line if TYPE_CHECKING: from rhoknp.units.document import Document @@ -252,7 +252,7 @@ def comment(self, comment: str) -> None: Args: comment: コメント行. """ - doc_id, sent_id, rest = _extract_did_and_sid( + doc_id, sent_id, rest = extract_did_and_sid( comment, patterns=[self.SID_PAT_KWDLC, self.SID_PAT_WAC, self.SID_PAT] ) if sent_id is not None: @@ -287,7 +287,7 @@ def from_raw_text(cls, text: str, post_init: bool = True) -> "Sentence": for line in text.split("\n"): if line.strip() == "": continue - if cls.is_comment_line(line): + if is_comment_line(line): sentence.comment = line else: sentence.text += line.replace("\r", "") @@ -327,7 +327,7 @@ def from_jumanpp(cls, jumanpp_text: str, post_init: bool = True) -> "Sentence": for line in jumanpp_text.split("\n"): if line.strip() == "": continue - if cls.is_comment_line(line): + if is_comment_line(line): sentence.comment = line continue if Morpheme.is_morpheme_line(line): @@ -391,7 +391,7 @@ def from_knp(cls, knp_text: str, post_init: bool = True) -> "Sentence": for line in lines: if line.strip() == "": continue - if cls.is_comment_line(line): + if is_comment_line(line): sentence.comment = line continue if Phrase.is_phrase_line(line): @@ -487,15 +487,3 @@ def reparse(self) -> "Sentence": elif self.is_jumanpp_required() is False: return Sentence.from_jumanpp(self.to_jumanpp()) return Sentence.from_raw_text(self.to_raw_text()) - - @staticmethod - def is_comment_line(line: str) -> bool: - """コメント行なら True を返す. - - Args: - line: 解析結果の一行. - - .. note:: - JUMAN/KNP では # から始まる行がコメントとみなされる. - """ - return line.startswith("#") and not Morpheme.is_morpheme_line(line) diff --git a/src/rhoknp/utils/util.py b/src/rhoknp/utils/comment.py similarity index 69% rename from src/rhoknp/utils/util.py rename to src/rhoknp/utils/comment.py index 32459d2e..ec788be6 100644 --- a/src/rhoknp/utils/util.py +++ b/src/rhoknp/utils/comment.py @@ -2,10 +2,24 @@ import re from typing import List, Optional, Tuple +from rhoknp.units.morpheme import Morpheme + logger = logging.getLogger(__name__) -def _extract_did_and_sid(comment_line: str, patterns: List[re.Pattern]) -> Tuple[Optional[str], Optional[str], str]: +def is_comment_line(line: str) -> bool: + """行がコメント行かどうかを判定する. + + Args: + line: 行. + + Returns: + bool: コメント行ならTrue. + """ + return line.startswith("#") and not Morpheme.is_morpheme_line(line) + + +def extract_did_and_sid(comment_line: str, patterns: List[re.Pattern]) -> Tuple[Optional[str], Optional[str], str]: """コメント行から文書IDおよび文IDを抽出する. Args: diff --git a/src/rhoknp/utils/reader.py b/src/rhoknp/utils/reader.py index cdf2aee0..761cc508 100644 --- a/src/rhoknp/utils/reader.py +++ b/src/rhoknp/utils/reader.py @@ -4,7 +4,7 @@ from typing import Callable, Iterator, List, Optional, TextIO, Union from rhoknp import Sentence -from rhoknp.utils.util import _extract_did_and_sid +from rhoknp.utils.comment import extract_did_and_sid logger = logging.getLogger(__name__) @@ -98,5 +98,5 @@ def _extract_doc_id(line: str, pat: re.Pattern) -> Optional[str]: line: 文IDが含まれるコメント行. pat: 文書IDを抽出する正規表現. """ - did, _, _ = _extract_did_and_sid(line, [pat]) + did, _, _ = extract_did_and_sid(line, [pat]) return did diff --git a/tests/utils/test_util.py b/tests/utils/test_comment.py similarity index 64% rename from tests/utils/test_util.py rename to tests/utils/test_comment.py index a9ae6ac2..098cce71 100644 --- a/tests/utils/test_util.py +++ b/tests/utils/test_comment.py @@ -4,7 +4,23 @@ import pytest from rhoknp import Sentence -from rhoknp.utils.util import _extract_did_and_sid +from rhoknp.utils.comment import extract_did_and_sid, is_comment_line + + +@pytest.mark.parametrize( + "line, expected", + [ + ("# S-ID:1", True), + ("# foo-bar", True), + ("#", True), + ("// S-ID:1", False), + ("// foo-bar", False), + ("//", False), + ('# # # 未定義語 15 その他 1 * 0 * 0 "未知語:その他 品詞推定:特殊"', False), + ], +) +def test_is_comment_line(line: str, expected: bool) -> None: + assert is_comment_line(line) == expected @pytest.mark.parametrize( @@ -24,6 +40,6 @@ ], ) def test_extract_doc_id(pat: re.Pattern, line: str, doc_id: Optional[str], sent_id: Optional[str]) -> None: - did, sid, _ = _extract_did_and_sid(line, [pat]) + did, sid, _ = extract_did_and_sid(line, [pat]) assert did == doc_id assert sid == sent_id From 720a46963fe12f1eafbb0f598868ec06b2d5646c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 02:45:45 +0000 Subject: [PATCH 28/52] Bump fastapi from 0.99.1 to 0.100.0 Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.99.1 to 0.100.0. - [Release notes](https://github.com/tiangolo/fastapi/releases) - [Commits](https://github.com/tiangolo/fastapi/compare/0.99.1...0.100.0) --- updated-dependencies: - dependency-name: fastapi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index e14678f6..18e5c066 100644 --- a/poetry.lock +++ b/poetry.lock @@ -374,22 +374,22 @@ tests = ["asttokens", "littleutils", "pytest", "rich"] [[package]] name = "fastapi" -version = "0.99.1" +version = "0.100.0" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = true python-versions = ">=3.7" files = [ - {file = "fastapi-0.99.1-py3-none-any.whl", hash = "sha256:976df7bab51ac7beda9f68c4513b8c4490b5c1135c72aafd0a5ee4023ec5282e"}, - {file = "fastapi-0.99.1.tar.gz", hash = "sha256:ac78f717cd80d657bd183f94d33b9bda84aa376a46a9dab513586b8eef1dc6fc"}, + {file = "fastapi-0.100.0-py3-none-any.whl", hash = "sha256:271662daf986da8fa98dc2b7c7f61c4abdfdccfb4786d79ed8b2878f172c6d5f"}, + {file = "fastapi-0.100.0.tar.gz", hash = "sha256:acb5f941ea8215663283c10018323ba7ea737c571b67fc7e88e9469c7eb1d12e"}, ] [package.dependencies] -pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0" +pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<3.0.0" starlette = ">=0.27.0,<0.28.0" typing-extensions = ">=4.5.0" [package.extras] -all = ["email-validator (>=1.1.1)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "python-multipart (>=0.0.5)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] +all = ["email-validator (>=2.0.0)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.5)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] [[package]] name = "furo" From 611892c85c1c6f88287bb18232140d59782cbc1c Mon Sep 17 00:00:00 2001 From: nobu-g Date: Tue, 18 Jul 2023 02:58:05 +0900 Subject: [PATCH 29/52] update dependency specification --- poetry.lock | 394 +++++++++++++++++++++++++++++++------------------ pyproject.toml | 5 +- 2 files changed, 257 insertions(+), 142 deletions(-) diff --git a/poetry.lock b/poetry.lock index 18e5c066..cea56c00 100644 --- a/poetry.lock +++ b/poetry.lock @@ -11,15 +11,29 @@ files = [ {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, ] +[[package]] +name = "annotated-types" +version = "0.5.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = true +python-versions = ">=3.7" +files = [ + {file = "annotated_types-0.5.0-py3-none-any.whl", hash = "sha256:58da39888f92c276ad970249761ebea80ba544b77acddaa1a4d6cf78287d45fd"}, + {file = "annotated_types-0.5.0.tar.gz", hash = "sha256:47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} + [[package]] name = "anyio" -version = "3.7.0" +version = "3.7.1" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.7" files = [ - {file = "anyio-3.7.0-py3-none-any.whl", hash = "sha256:eddca883c4175f14df8aedce21054bfca3adb70ffe76a9f607aef9d7fa2ea7f0"}, - {file = "anyio-3.7.0.tar.gz", hash = "sha256:275d9973793619a5374e1c89a4f4ad3f4b0a5510a2b5b939444bee8f4c4d37ce"}, + {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"}, + {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"}, ] [package.dependencies] @@ -29,7 +43,7 @@ sniffio = ">=1.1" typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [package.extras] -doc = ["Sphinx (>=6.1.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme", "sphinxcontrib-jquery"] +doc = ["Sphinx", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme (>=1.2.2)", "sphinxcontrib-jquery"] test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] trio = ["trio (<0.22)"] @@ -128,97 +142,97 @@ files = [ [[package]] name = "charset-normalizer" -version = "3.1.0" +version = "3.2.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7.0" files = [ - {file = "charset-normalizer-3.1.0.tar.gz", hash = "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-win32.whl", hash = "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448"}, - {file = "charset_normalizer-3.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-win32.whl", hash = "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909"}, - {file = "charset_normalizer-3.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-win32.whl", hash = "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974"}, - {file = "charset_normalizer-3.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-win32.whl", hash = "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0"}, - {file = "charset_normalizer-3.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-win32.whl", hash = "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1"}, - {file = "charset_normalizer-3.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b"}, - {file = "charset_normalizer-3.1.0-py3-none-any.whl", hash = "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d"}, + {file = "charset-normalizer-3.2.0.tar.gz", hash = "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-win32.whl", hash = "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-win32.whl", hash = "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-win32.whl", hash = "sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-win32.whl", hash = "sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-win32.whl", hash = "sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80"}, + {file = "charset_normalizer-3.2.0-py3-none-any.whl", hash = "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6"}, ] [[package]] name = "click" -version = "8.1.3" +version = "8.1.5" description = "Composable command line interface toolkit" optional = true python-versions = ">=3.7" files = [ - {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, - {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, + {file = "click-8.1.5-py3-none-any.whl", hash = "sha256:e576aa487d679441d7d30abb87e1b43d24fc53bffb8758443b1a9e1cee504548"}, + {file = "click-8.1.5.tar.gz", hash = "sha256:4be4b1af8d665c6d942909916d31a213a106800c47d0eeba73d34da3cbc11367"}, ] [package.dependencies] @@ -346,13 +360,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.1.1" +version = "1.1.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"}, - {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"}, + {file = "exceptiongroup-1.1.2-py3-none-any.whl", hash = "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"}, + {file = "exceptiongroup-1.1.2.tar.gz", hash = "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5"}, ] [package.extras] @@ -441,13 +455,13 @@ typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "httpcore" -version = "0.17.2" +version = "0.17.3" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.7" files = [ - {file = "httpcore-0.17.2-py3-none-any.whl", hash = "sha256:5581b9c12379c4288fe70f43c710d16060c10080617001e6b22a3b6dbcbefd36"}, - {file = "httpcore-0.17.2.tar.gz", hash = "sha256:125f8375ab60036db632f34f4b627a9ad085048eef7cb7d2616fea0f739f98af"}, + {file = "httpcore-0.17.3-py3-none-any.whl", hash = "sha256:c2789b767ddddfa2a5782e3199b2b7f6894540b17b16ec26b2c4d8e103510b87"}, + {file = "httpcore-0.17.3.tar.gz", hash = "sha256:a6f30213335e34c1ade7be6ec7c47f19f50c56db36abef1a9dfa3815b1cb3888"}, ] [package.dependencies] @@ -997,13 +1011,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "prompt-toolkit" -version = "3.0.38" +version = "3.0.39" description = "Library for building powerful interactive command lines in Python" optional = false python-versions = ">=3.7.0" files = [ - {file = "prompt_toolkit-3.0.38-py3-none-any.whl", hash = "sha256:45ea77a2f7c60418850331366c81cf6b5b9cf4c7fd34616f733c5427e6abbb1f"}, - {file = "prompt_toolkit-3.0.38.tar.gz", hash = "sha256:23ac5d50538a9a38c8bde05fecb47d0b403ecd0662857a86f886f798563d5b9b"}, + {file = "prompt_toolkit-3.0.39-py3-none-any.whl", hash = "sha256:9dffbe1d8acf91e3de75f3b544e4842382fc06c6babe903ac9acb74dc6e08d88"}, + {file = "prompt_toolkit-3.0.39.tar.gz", hash = "sha256:04505ade687dc26dc4284b1ad19a83be2f2afe83e7a828ace0c72f3a1df72aac"}, ] [package.dependencies] @@ -1036,55 +1050,135 @@ tests = ["pytest"] [[package]] name = "pydantic" -version = "1.10.10" -description = "Data validation and settings management using python type hints" +version = "2.0.3" +description = "Data validation using Python type hints" optional = true python-versions = ">=3.7" files = [ - {file = "pydantic-1.10.10-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:adad1ee4ab9888f12dac2529276704e719efcf472e38df7813f5284db699b4ec"}, - {file = "pydantic-1.10.10-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7a7db03339893feef2092ff7b1afc9497beed15ebd4af84c3042a74abce02d48"}, - {file = "pydantic-1.10.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67b3714b97ff84b2689654851c2426389bcabfac9080617bcf4306c69db606f6"}, - {file = "pydantic-1.10.10-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edfdf0a5abc5c9bf2052ebaec20e67abd52e92d257e4f2d30e02c354ed3e6030"}, - {file = "pydantic-1.10.10-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20a3b30fd255eeeb63caa9483502ba96b7795ce5bf895c6a179b3d909d9f53a6"}, - {file = "pydantic-1.10.10-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:db4c7f7e60ca6f7d6c1785070f3e5771fcb9b2d88546e334d2f2c3934d949028"}, - {file = "pydantic-1.10.10-cp310-cp310-win_amd64.whl", hash = "sha256:a2d5be50ac4a0976817144c7d653e34df2f9436d15555189f5b6f61161d64183"}, - {file = "pydantic-1.10.10-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:566a04ba755e8f701b074ffb134ddb4d429f75d5dced3fbd829a527aafe74c71"}, - {file = "pydantic-1.10.10-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f79db3652ed743309f116ba863dae0c974a41b688242482638b892246b7db21d"}, - {file = "pydantic-1.10.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c62376890b819bebe3c717a9ac841a532988372b7e600e76f75c9f7c128219d5"}, - {file = "pydantic-1.10.10-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4870f13a4fafd5bc3e93cff3169222534fad867918b188e83ee0496452978437"}, - {file = "pydantic-1.10.10-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:990027e77cda6072a566e433b6962ca3b96b4f3ae8bd54748e9d62a58284d9d7"}, - {file = "pydantic-1.10.10-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8c40964596809eb616d94f9c7944511f620a1103d63d5510440ed2908fc410af"}, - {file = "pydantic-1.10.10-cp311-cp311-win_amd64.whl", hash = "sha256:ea9eebc2ebcba3717e77cdeee3f6203ffc0e78db5f7482c68b1293e8cc156e5e"}, - {file = "pydantic-1.10.10-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:762aa598f79b4cac2f275d13336b2dd8662febee2a9c450a49a2ab3bec4b385f"}, - {file = "pydantic-1.10.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6dab5219659f95e357d98d70577b361383057fb4414cfdb587014a5f5c595f7b"}, - {file = "pydantic-1.10.10-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3d4ee957a727ccb5a36f1b0a6dbd9fad5dedd2a41eada99a8df55c12896e18d"}, - {file = "pydantic-1.10.10-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b69f9138dec566962ec65623c9d57bee44412d2fc71065a5f3ebb3820bdeee96"}, - {file = "pydantic-1.10.10-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7aa75d1bd9cc275cf9782f50f60cddaf74cbaae19b6ada2a28e737edac420312"}, - {file = "pydantic-1.10.10-cp37-cp37m-win_amd64.whl", hash = "sha256:9f62a727f5c590c78c2d12fda302d1895141b767c6488fe623098f8792255fe5"}, - {file = "pydantic-1.10.10-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:aac218feb4af73db8417ca7518fb3bade4534fcca6e3fb00f84966811dd94450"}, - {file = "pydantic-1.10.10-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:88546dc10a40b5b52cae87d64666787aeb2878f9a9b37825aedc2f362e7ae1da"}, - {file = "pydantic-1.10.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c41bbaae89e32fc582448e71974de738c055aef5ab474fb25692981a08df808a"}, - {file = "pydantic-1.10.10-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b71bd504d1573b0b722ae536e8ffb796bedeef978979d076bf206e77dcc55a5"}, - {file = "pydantic-1.10.10-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:e088e3865a2270ecbc369924cd7d9fbc565667d9158e7f304e4097ebb9cf98dd"}, - {file = "pydantic-1.10.10-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3403a090db45d4027d2344859d86eb797484dfda0706cf87af79ace6a35274ef"}, - {file = "pydantic-1.10.10-cp38-cp38-win_amd64.whl", hash = "sha256:e0014e29637125f4997c174dd6167407162d7af0da73414a9340461ea8573252"}, - {file = "pydantic-1.10.10-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9965e49c6905840e526e5429b09e4c154355b6ecc0a2f05492eda2928190311d"}, - {file = "pydantic-1.10.10-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:748d10ab6089c5d196e1c8be9de48274f71457b01e59736f7a09c9dc34f51887"}, - {file = "pydantic-1.10.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86936c383f7c38fd26d35107eb669c85d8f46dfceae873264d9bab46fe1c7dde"}, - {file = "pydantic-1.10.10-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7a26841be620309a9697f5b1ffc47dce74909e350c5315ccdac7a853484d468a"}, - {file = "pydantic-1.10.10-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:409b810f387610cc7405ab2fa6f62bdf7ea485311845a242ebc0bd0496e7e5ac"}, - {file = "pydantic-1.10.10-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ce937a2a2c020bcad1c9fde02892392a1123de6dda906ddba62bfe8f3e5989a2"}, - {file = "pydantic-1.10.10-cp39-cp39-win_amd64.whl", hash = "sha256:37ebddef68370e6f26243acc94de56d291e01227a67b2ace26ea3543cf53dd5f"}, - {file = "pydantic-1.10.10-py3-none-any.whl", hash = "sha256:a5939ec826f7faec434e2d406ff5e4eaf1716eb1f247d68cd3d0b3612f7b4c8a"}, - {file = "pydantic-1.10.10.tar.gz", hash = "sha256:3b8d5bd97886f9eb59260594207c9f57dce14a6f869c6ceea90188715d29921a"}, + {file = "pydantic-2.0.3-py3-none-any.whl", hash = "sha256:614eb3321eb600c81899a88fa9858b008e3c79e0d4f1b49ab1f516b4b0c27cfb"}, + {file = "pydantic-2.0.3.tar.gz", hash = "sha256:94f13e0dcf139a5125e88283fc999788d894e14ed90cf478bcc2ee50bd4fc630"}, ] [package.dependencies] -typing-extensions = ">=4.2.0" +annotated-types = ">=0.4.0" +pydantic-core = "2.3.0" +typing-extensions = ">=4.6.1" [package.extras] -dotenv = ["python-dotenv (>=0.10.4)"] -email = ["email-validator (>=1.0.3)"] +email = ["email-validator (>=2.0.0)"] + +[[package]] +name = "pydantic-core" +version = "2.3.0" +description = "" +optional = true +python-versions = ">=3.7" +files = [ + {file = "pydantic_core-2.3.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:4542c98b8364b976593703a2dda97377433b102f380b61bc3a2cbc2fbdae1d1f"}, + {file = "pydantic_core-2.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9342de50824b40f55d2600f66c6f9a91a3a24851eca39145a749a3dc804ee599"}, + {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:539432f911686cb80284c30b33eaf9f4fd9a11e1111fe0dc98fdbdce69b49821"}, + {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38a0e7ee65c8999394d92d9c724434cb629279d19844f2b69d9bbc46dc8b8b61"}, + {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_24_armv7l.whl", hash = "sha256:e3ed6834cc005798187a56c248a2240207cb8ffdda1c89e9afda4c3d526c2ea0"}, + {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_24_ppc64le.whl", hash = "sha256:e72ac299a6bf732a60852d052acf3999d234686755a02ba111e85e7ebf8155b1"}, + {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_24_s390x.whl", hash = "sha256:616b3451b05ca63b8f433c627f68046b39543faeaa4e50d8c6699a2a1e4b85a5"}, + {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:adcb9c8848e15c613e483e0b99767ae325af27fe0dbd866df01fe5849d06e6e1"}, + {file = "pydantic_core-2.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:464bf799b422be662e5e562e62beeffc9eaa907d381a9d63a2556615bbda286d"}, + {file = "pydantic_core-2.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4638ebc17de08c2f3acba557efeb6f195c88b7299d8c55c0bb4e20638bbd4d03"}, + {file = "pydantic_core-2.3.0-cp310-none-win32.whl", hash = "sha256:9ff322c7e1030543d35d83bb521b69114d3d150750528d7757544f639def9ad6"}, + {file = "pydantic_core-2.3.0-cp310-none-win_amd64.whl", hash = "sha256:4824eb018f0a4680b1e434697a9bf3f41c7799b80076d06530cbbd212e040ccc"}, + {file = "pydantic_core-2.3.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:0aa429578e23885b3984c49d687cd05ab06f0b908ea1711a8bf7e503b7f97160"}, + {file = "pydantic_core-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:20d710c1f79af930b8891bcebd84096798e4387ab64023ef41521d58f21277d3"}, + {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:309f45d4d7481d6f09cb9e35c72caa0e50add4a30bb08c04c5fe5956a0158633"}, + {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bcfb7be905aa849bd882262e1df3f75b564e2f708b4b4c7ad2d3deaf5410562"}, + {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_24_armv7l.whl", hash = "sha256:85cd9c0af34e371390e3cb2f3a470b0b40cc07568c1e966c638c49062be6352d"}, + {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_24_ppc64le.whl", hash = "sha256:37c5028cebdf731298724070838fb3a71ef1fbd201d193d311ac2cbdbca25a23"}, + {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_24_s390x.whl", hash = "sha256:e4208f23f12d0ad206a07a489ef4cb15722c10b62774c4460ee4123250be938e"}, + {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c24465dd11b65c8510f251b095fc788c7c91481c81840112fe3f76c30793a455"}, + {file = "pydantic_core-2.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:3cd7ee8bbfab277ab56e272221886fd33a1b5943fbf45ae9195aa6a48715a8a0"}, + {file = "pydantic_core-2.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0fc7e0b056b66cc536e97ef60f48b3b289f6b3b62ac225afd4b22a42434617bf"}, + {file = "pydantic_core-2.3.0-cp311-none-win32.whl", hash = "sha256:4788135db4bd83a5edc3522b11544b013be7d25b74b155e08dd3b20cd6663bbb"}, + {file = "pydantic_core-2.3.0-cp311-none-win_amd64.whl", hash = "sha256:f93c867e5e85584a28c6a6feb6f2086d717266eb5d1210d096dd717b7f4dec04"}, + {file = "pydantic_core-2.3.0-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:73f62bb7fd862d9bcd886e10612bade6fe042eda8b47e8c129892bcfb7b45e84"}, + {file = "pydantic_core-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4d889d498fce64bfcd8adf1a78579a7f626f825cbeb2956a24a29b35f9a1df32"}, + {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7d55e38a89ec2ae17b2fa7ffeda6b70f63afab1888bd0d57aaa7b7879760acb4"}, + {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1aefebb506bc1fe355d91d25f12bcdea7f4d7c2d9f0f6716dd025543777c99a5"}, + {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_24_armv7l.whl", hash = "sha256:6441a29f42585f085db0c04cd0557d4cbbb46fa68a0972409b1cfe9f430280c1"}, + {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_24_ppc64le.whl", hash = "sha256:47e8f034be31390a8f525431eb5e803a78ce7e2e11b32abf5361a972e14e6b61"}, + {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_24_s390x.whl", hash = "sha256:ad814864aba263be9c83ada44a95f72d10caabbf91589321f95c29c902bdcff0"}, + {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9eff3837d447fccf2ac38c259b14ab9cbde700df355a45a1f3ff244d5e78f8b6"}, + {file = "pydantic_core-2.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:534f3f63c000f08050c6f7f4378bf2b52d7ba9214e9d35e3f60f7ad24a4d6425"}, + {file = "pydantic_core-2.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ef6a222d54f742c24f6b143aab088702db3a827b224e75b9dd28b38597c595fe"}, + {file = "pydantic_core-2.3.0-cp312-none-win32.whl", hash = "sha256:4e26944e64ecc1d7b19db954c0f7b471f3b141ec8e1a9f57cfe27671525cd248"}, + {file = "pydantic_core-2.3.0-cp312-none-win_amd64.whl", hash = "sha256:019c5c41941438570dfc7d3f0ae389b2425add1775a357ce1e83ed1434f943d6"}, + {file = "pydantic_core-2.3.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:27c1bbfb9d84a75cf33b7f19b53c29eb7ead99b235fce52aced5507174ab8f98"}, + {file = "pydantic_core-2.3.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:7cb496e934b71f1ade844ab91d6ccac78a3520e5df02fdb2357f85a71e541e69"}, + {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5af2d43b1978958d91351afbcc9b4d0cfe144c46c61740e82aaac8bb39ab1a4d"}, + {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d3097c39d7d4e8dba2ef86de171dcccad876c36d8379415ba18a5a4d0533510"}, + {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_24_armv7l.whl", hash = "sha256:dd3b023f3317dbbbc775e43651ce1a31a9cea46216ad0b5be37afc18a2007699"}, + {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_24_ppc64le.whl", hash = "sha256:27babb9879bf2c45ed655d02639f4c30e2b9ef1b71ce59c2305bbf7287910a18"}, + {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_24_s390x.whl", hash = "sha256:2183a9e18cdc0de53bdaa1675f237259162abeb62d6ac9e527c359c1074dc55d"}, + {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c089d8e7f1b4db08b2f8e4107304eec338df046275dad432635a9be9531e2fc8"}, + {file = "pydantic_core-2.3.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:2f10aa5452b865818dd0137f568d443f5e93b60a27080a01aa4b7512c7ba13a3"}, + {file = "pydantic_core-2.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:f642313d559f9d9a00c4de6820124059cc3342a0d0127b18301de2c680d5ea40"}, + {file = "pydantic_core-2.3.0-cp37-none-win32.whl", hash = "sha256:45327fc57afbe3f2c3d7f54a335d5cecee8a9fdb3906a2fbed8af4092f4926df"}, + {file = "pydantic_core-2.3.0-cp37-none-win_amd64.whl", hash = "sha256:e427b66596a6441a5607dfc0085b47d36073f88da7ac48afd284263b9b99e6ce"}, + {file = "pydantic_core-2.3.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:0b3d781c71b8bfb621ef23b9c874933e2cd33237c1a65cc20eeb37437f8e7e18"}, + {file = "pydantic_core-2.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ad46027dbd5c1db87dc0b49becbe23093b143a20302028d387dae37ee5ef95f5"}, + {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39aa09ed7ce2a648c904f79032d16dda29e6913112af8465a7bf710eef23c7ca"}, + {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05b4bf8c58409586a7a04c858a86ab10f28c6c1a7c33da65e0326c59d5b0ab16"}, + {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_24_armv7l.whl", hash = "sha256:ba2b807d2b62c446120906b8580cddae1d76d3de4efbb95ccc87f5e35c75b4b2"}, + {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_24_ppc64le.whl", hash = "sha256:ea955e4ed21f4bbb9b83fea09fc6af0bed82e69ecf6b35ec89237a0a49633033"}, + {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_24_s390x.whl", hash = "sha256:06884c07956526ac9ebfef40fe21a11605569b8fc0e2054a375fb39c978bf48f"}, + {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f868e731a18b403b88aa434d960489ceeed0ddeb44ebc02389540731a67705e0"}, + {file = "pydantic_core-2.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cb08fab0fc1db15c277b72e33ac74ad9c0c789413da8984a3eacb22a94b42ef4"}, + {file = "pydantic_core-2.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6ca34c29fbd6592de5fd39e80c1993634d704c4e7e14ba54c87b2c7c53da68fe"}, + {file = "pydantic_core-2.3.0-cp38-none-win32.whl", hash = "sha256:cd782807d35c8a41aaa7d30b5107784420eefd9fdc1c760d86007d43ae00b15d"}, + {file = "pydantic_core-2.3.0-cp38-none-win_amd64.whl", hash = "sha256:01f56d5ee70b1d39c0fd08372cc5142274070ab7181d17c86035f130eebc05b8"}, + {file = "pydantic_core-2.3.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:78b1ac0151271ce62bc2b33755f1043eda6a310373143a2f27e2bcd3d5fc8633"}, + {file = "pydantic_core-2.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:64bfd2c35a2c350f73ac52dc134d8775f93359c4c969280a6fe5301b5b6e7431"}, + {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:937c0fe9538f1212b62df6a68f8d78df3572fe3682d9a0dd8851eac8a4e46063"}, + {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d965c7c4b40d1cedec9188782e98bd576f9a04868835604200c3a6e817b824f"}, + {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_24_armv7l.whl", hash = "sha256:ad442b8585ed4a3c2d22e4bf7b465d9b7d281e055b09719a8aeb5b576422dc9b"}, + {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_24_ppc64le.whl", hash = "sha256:4bf20c9722821fce766e685718e739deeccc60d6bc7be5029281db41f999ee0c"}, + {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_24_s390x.whl", hash = "sha256:f3dd5333049b5b3faa739e0f40b77cc8b7a1aded2f2da0e28794c81586d7b08a"}, + {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dc5f516b24d24bc9e8dd9305460899f38302b3c4f9752663b396ef9848557bf"}, + {file = "pydantic_core-2.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:055f7ea6b1fbb37880d66d70eefd22dd319b09c79d2cb99b1dbfeb34b653b0b2"}, + {file = "pydantic_core-2.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:af693a89db6d6ac97dd84dd7769b3f2bd9007b578127d0e7dda03053f4d3b34b"}, + {file = "pydantic_core-2.3.0-cp39-none-win32.whl", hash = "sha256:f60e31e3e15e8c294bf70c60f8ae4d0c3caf3af8f26466e9aa8ea4c01302749b"}, + {file = "pydantic_core-2.3.0-cp39-none-win_amd64.whl", hash = "sha256:2b79f3681481f4424d7845cc7a261d5a4baa810d656b631fa844dc9967b36a7b"}, + {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:a666134b41712e30a71afaa26deeb4da374179f769fa49784cdf0e7698880fab"}, + {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c119e9227487ad3d7c3c737d896afe548a6be554091f9745da1f4b489c40561"}, + {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73929a2fb600a2333fce2efd92596cff5e6bf8946e20e93c067b220760064862"}, + {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:41bbc2678a5b6a19371b2cb51f30ccea71f0c14b26477d2d884fed761cea42c7"}, + {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:dcbff997f47d45bf028bda4c3036bb3101e89a3df271281d392b6175f71c71d1"}, + {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:afa8808159169368b66e4fbeafac6c6fd8f26246dc4d0dcc2caf94bd9cf1b828"}, + {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:12be3b5f54f8111ca38e6b7277f26c23ba5cb3344fae06f879a0a93dfc8b479e"}, + {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:ed5babdcd3d052ba5cf8832561f18df20778c7ccf12587b2d82f7bf3bf259a0e"}, + {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d642e5c029e2acfacf6aa0a7a3e822086b3b777c70d364742561f9ca64c1ffc"}, + {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ba3073eb38a1294e8c7902989fb80a7a147a69db2396818722bd078476586a0"}, + {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d5146a6749b1905e04e62e0ad4622f079e5582f8b3abef5fb64516c623127908"}, + {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:deeb64335f489c3c11949cbd1d1668b3f1fb2d1c6a5bf40e126ef7bf95f9fa40"}, + {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:31acc37288b8e69e4849f618c3d5cf13b58077c1a1ff9ade0b3065ba974cd385"}, + {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:e09d9f6d722de9d4c1c5f122ea9bc6b25a05f975457805af4dcab7b0128aacbf"}, + {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:ba6a8cf089222a171b8f84e6ec2d10f7a9d14f26be3a347b14775a8741810676"}, + {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef1fd1b24e9bcddcb168437686677104e205c8e25b066e73ffdf331d3bb8792b"}, + {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eda1a89c4526826c0a87d33596a4cd15b8f58e9250f503e39af1699ba9c878e8"}, + {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a3e9a18401a28db4358da2e191508702dbf065f2664c710708cdf9552b9fa50c"}, + {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:a439fd0d45d51245bbde799726adda5bd18aed3fa2b01ab2e6a64d6d13776fa3"}, + {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:bf6a1d2c920cc9528e884850a4b2ee7629e3d362d5c44c66526d4097bbb07a1a"}, + {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e33fcbea3b63a339dd94de0fc442fefacfe681cc7027ce63f67af9f7ceec7422"}, + {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:bf3ed993bdf4754909f175ff348cf8f78d4451215b8aa338633f149ca3b1f37a"}, + {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7584171eb3115acd4aba699bc836634783f5bd5aab131e88d8eeb8a3328a4a72"}, + {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1624baa76d1740711b2048f302ae9a6d73d277c55a8c3e88b53b773ebf73a971"}, + {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:06f33f695527f5a86e090f208978f9fd252c9cfc7e869d3b679bd71f7cb2c1fa"}, + {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7ecf0a67b212900e92f328181fed02840d74ed39553cdb38d27314e2b9c89dfa"}, + {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:45fa1e8ad6f4367ad73674ca560da8e827cc890eaf371f3ee063d6d7366a207b"}, + {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:8d0dbcc57839831ae79fd24b1b83d42bc9448d79feaf3ed3fb5cbf94ffbf3eb7"}, + {file = "pydantic_core-2.3.0.tar.gz", hash = "sha256:5cfb5ac4e82c47d5dc25b209dd4c3989e284b80109f9e08b33c895080c424b4f"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pygments" @@ -1373,13 +1467,13 @@ test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] [[package]] name = "sphinx-basic-ng" -version = "1.0.0b1" +version = "1.0.0b2" description = "A modern skeleton for Sphinx themes." optional = false python-versions = ">=3.7" files = [ - {file = "sphinx_basic_ng-1.0.0b1-py3-none-any.whl", hash = "sha256:ade597a3029c7865b24ad0eda88318766bcc2f9f4cef60df7e28126fde94db2a"}, - {file = "sphinx_basic_ng-1.0.0b1.tar.gz", hash = "sha256:89374bd3ccd9452a301786781e28c8718e99960f2d4f411845ea75fc7bb5a9b0"}, + {file = "sphinx_basic_ng-1.0.0b2-py3-none-any.whl", hash = "sha256:eb09aedbabfb650607e9b4b68c9d240b90b1e1be221d6ad71d61c52e29f7932b"}, + {file = "sphinx_basic_ng-1.0.0b2.tar.gz", hash = "sha256:9ec55a47c90c8c002b5960c57492ec3021f5193cb26cebc2dc4ea226848651c9"}, ] [package.dependencies] @@ -1645,13 +1739,13 @@ test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6. [[package]] name = "typing-extensions" -version = "4.7.0" +version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" optional = false python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.7.0-py3-none-any.whl", hash = "sha256:5d8c9dac95c27d20df12fb1d97b9793ab8b2af8a3a525e68c80e21060c161771"}, - {file = "typing_extensions-4.7.0.tar.gz", hash = "sha256:935ccf31549830cda708b42289d44b6f74084d616a00be651601a4f968e77c82"}, + {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, + {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, ] [[package]] @@ -1690,6 +1784,24 @@ typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [package.extras] standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] +[[package]] +name = "uvicorn" +version = "0.23.0" +description = "The lightning-fast ASGI server." +optional = true +python-versions = ">=3.8" +files = [ + {file = "uvicorn-0.23.0-py3-none-any.whl", hash = "sha256:479599b2c0bb1b9b394c6d43901a1eb0c1ec72c7d237b5bafea23c5b2d4cdf10"}, + {file = "uvicorn-0.23.0.tar.gz", hash = "sha256:d38ab90c0e2c6fe3a054cddeb962cfd5d0e0e6608eaaff4a01d5c36a67f3168c"}, +] + +[package.dependencies] +click = ">=7.0" +h11 = ">=0.8" + +[package.extras] +standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] + [[package]] name = "wcwidth" version = "0.2.6" @@ -1717,9 +1829,9 @@ docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [extras] -cli = ["PyYAML", "fastapi", "jinja2", "rich", "typer", "typer", "uvicorn"] +cli = ["PyYAML", "fastapi", "jinja2", "rich", "typer", "typer", "uvicorn", "uvicorn"] [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "93a3a1225181386d79063eacbd8cdaefb20d86a79aa2dd88ed5169d506bba775" +content-hash = "ba66cceae08bdb6f01f94cfbccdcbb46ed395f913726909e5489e24185b89c60" diff --git a/pyproject.toml b/pyproject.toml index e1e5d621..35f9492a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,10 @@ typer = [ ] PyYAML = { version = "^6.0", optional = true } rich = { version = ">=12.6", optional = true } -uvicorn = { version = ">=0.21.0,<1", optional = true } +uvicorn = [ + { version = ">=0.21.0,<0.23.0", python = "<3.8", optional = true }, + { version = ">=0.21.0", python = ">=3.8", optional = true }, +] fastapi = { version = ">=0.92.0,<1", optional = true } jinja2 = { version = "^3.1", optional = true } From 6379547717b8fae7bc57acb486c292ed54f08678 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 03:01:38 +0000 Subject: [PATCH 30/52] Bump pyyaml from 6.0 to 6.0.1 Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0 to 6.0.1. - [Changelog](https://github.com/yaml/pyyaml/blob/6.0.1/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/6.0...6.0.1) --- updated-dependencies: - dependency-name: pyyaml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 82 ++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/poetry.lock b/poetry.lock index cea56c00..2cc138af 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1248,51 +1248,51 @@ files = [ [[package]] name = "pyyaml" -version = "6.0" +version = "6.0.1" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.6" files = [ - {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, - {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, - {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, - {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, - {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, - {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, - {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, - {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, - {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, - {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, - {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, - {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, - {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, - {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, - {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, - {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, - {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, - {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, - {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, - {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, + {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, + {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, + {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, + {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, + {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, + {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, + {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, + {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, + {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, ] [[package]] From 36577005ca8b4513589e336a3386485aadf93a9a Mon Sep 17 00:00:00 2001 From: nobu-g Date: Fri, 21 Jul 2023 19:06:21 +0900 Subject: [PATCH 31/52] tweak --- tests/units/test_phrase.py | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/tests/units/test_phrase.py b/tests/units/test_phrase.py index 08c47b46..c667e363 100644 --- a/tests/units/test_phrase.py +++ b/tests/units/test_phrase.py @@ -32,23 +32,21 @@ }, { "knp": textwrap.dedent( - textwrap.dedent( - """\ - # S-ID:1 - * 1D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS> - + 2D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><名詞項候補><先行詞候補><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS><解析格:ガ> - EOS EOS EOS 名詞 6 組織名 6 * 0 * 0 "未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS 品詞変更:EOS-EOS-EOS-15-3-0-0" <未知語><品詞推定:名詞><疑似代表表記><代表表記:EOS/EOS><正規化代表表記:EOS/EOS><品詞変更:EOS-EOS-EOS-15-3-0-0-"未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS"><品曖><品曖-アルファベット><品曖-組織名><記英数カ><英記号><記号><名詞相当語><文頭><自立><内容語><タグ単位始><文節始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> - は は は 助詞 9 副助詞 2 * 0 * 0 NIL <かな漢字><ひらがな><付属> - * -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><正規化代表表記:特殊/とくしゅa+記号/きごう><主辞代表表記:記号/きごう> - + 2D <文節内><係:文節内><名詞的形容詞語幹><体言><名詞項候補><先行詞候補><非用言格解析:形><正規化代表表記:特殊/とくしゅa> - 特殊 とくしゅ 特殊だ 形容詞 3 * 0 ナノ形容詞 22 語幹 1 "代表表記:特殊/とくしゅa 代表表記変更:特殊だ/とくしゅだ 反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん" <代表表記:特殊/とくしゅa><反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん><正規化代表表記:特殊/とくしゅa><漢字><かな漢字><名詞的形容詞語幹><代表表記変更:特殊だ/とくしゅだ><名詞相当語><自立><内容語><タグ単位始><文節始><用言表記先頭><用言表記末尾><用言意味表記末尾> - + -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><判定詞句><名詞項候補><先行詞候補><正規化代表表記:記号/きごう><主辞代表表記:記号/きごう><用言代表表記:記号/きごう><節-区切><節-主辞><時制:非過去><格関係0:ガ:EOS><格解析結果:記号/きごう:判3:ガ/N/EOS/0/0/1><標準用言代表表記:記号/きごう> - 記号 きごう 記号 名詞 6 普通名詞 1 * 0 * 0 "代表表記:記号/きごう カテゴリ:抽象物" <代表表記:記号/きごう><カテゴリ:抽象物><正規化代表表記:記号/きごう><漢字><かな漢字><名詞相当語><自立><複合←><内容語><タグ単位始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> - です です だ 判定詞 4 * 0 判定詞 25 デス列基本形 27 NIL <かな漢字><ひらがな><活用語><表現文末><付属> - 。 。 。 特殊 1 句点 1 * 0 * 0 NIL <英記号><記号><文末><付属> - EOS - """ - ) + """\ + # S-ID:1 + * 1D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS> + + 2D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><名詞項候補><先行詞候補><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS><解析格:ガ> + EOS EOS EOS 名詞 6 組織名 6 * 0 * 0 "未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS 品詞変更:EOS-EOS-EOS-15-3-0-0" <未知語><品詞推定:名詞><疑似代表表記><代表表記:EOS/EOS><正規化代表表記:EOS/EOS><品詞変更:EOS-EOS-EOS-15-3-0-0-"未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS"><品曖><品曖-アルファベット><品曖-組織名><記英数カ><英記号><記号><名詞相当語><文頭><自立><内容語><タグ単位始><文節始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> + は は は 助詞 9 副助詞 2 * 0 * 0 NIL <かな漢字><ひらがな><付属> + * -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><正規化代表表記:特殊/とくしゅa+記号/きごう><主辞代表表記:記号/きごう> + + 2D <文節内><係:文節内><名詞的形容詞語幹><体言><名詞項候補><先行詞候補><非用言格解析:形><正規化代表表記:特殊/とくしゅa> + 特殊 とくしゅ 特殊だ 形容詞 3 * 0 ナノ形容詞 22 語幹 1 "代表表記:特殊/とくしゅa 代表表記変更:特殊だ/とくしゅだ 反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん" <代表表記:特殊/とくしゅa><反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん><正規化代表表記:特殊/とくしゅa><漢字><かな漢字><名詞的形容詞語幹><代表表記変更:特殊だ/とくしゅだ><名詞相当語><自立><内容語><タグ単位始><文節始><用言表記先頭><用言表記末尾><用言意味表記末尾> + + -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><判定詞句><名詞項候補><先行詞候補><正規化代表表記:記号/きごう><主辞代表表記:記号/きごう><用言代表表記:記号/きごう><節-区切><節-主辞><時制:非過去><格関係0:ガ:EOS><格解析結果:記号/きごう:判3:ガ/N/EOS/0/0/1><標準用言代表表記:記号/きごう> + 記号 きごう 記号 名詞 6 普通名詞 1 * 0 * 0 "代表表記:記号/きごう カテゴリ:抽象物" <代表表記:記号/きごう><カテゴリ:抽象物><正規化代表表記:記号/きごう><漢字><かな漢字><名詞相当語><自立><複合←><内容語><タグ単位始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> + です です だ 判定詞 4 * 0 判定詞 25 デス列基本形 27 NIL <かな漢字><ひらがな><活用語><表現文末><付属> + 。 。 。 特殊 1 句点 1 * 0 * 0 NIL <英記号><記号><文末><付属> + EOS + """ ), "num": 2, "parent_ids": [1, -1], @@ -80,7 +78,6 @@ }, ] - KNP_SNIPPETS = [ { "knp": textwrap.dedent( From af4385c79a5fba45baebe3bccf5ddf2f4518dbab Mon Sep 17 00:00:00 2001 From: nobu-g Date: Fri, 21 Jul 2023 20:12:40 +0900 Subject: [PATCH 32/52] fix initialization of KWJA processor --- src/rhoknp/processors/kwja.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rhoknp/processors/kwja.py b/src/rhoknp/processors/kwja.py index 5fe38700..3581c00c 100644 --- a/src/rhoknp/processors/kwja.py +++ b/src/rhoknp/processors/kwja.py @@ -37,6 +37,7 @@ def __init__( self.options: List[str] = options or [] #: KWJA のオプション. self._proc: Optional[Popen] = None self._output_format = "knp" + self._lock = Lock() if "--tasks" in self.options: tasks: List[str] = self.options[self.options.index("--tasks") + 1].split(",") if "word" in tasks: @@ -57,7 +58,6 @@ def __init__( _ = self.apply(Sentence.from_raw_text("")) except Exception as e: logger.warning(f"failed to start KWJA: {e}") - self._lock = Lock() def __repr__(self) -> str: arg_string = f"executable={repr(self.executable)}" From a07ebb60b8c1922ca5700bf8b6602375568d1684 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Fri, 21 Jul 2023 21:40:59 +0900 Subject: [PATCH 33/52] escepe ">" in fstrings --- src/rhoknp/props/feature.py | 15 +++-- src/rhoknp/props/named_entity.py | 7 ++- src/rhoknp/units/sentence.py | 4 +- tests/props/test_features.py | 8 ++- tests/props/test_named_entity.py | 101 ++++++++++++++++++++++++++++--- 5 files changed, 116 insertions(+), 19 deletions(-) diff --git a/src/rhoknp/props/feature.py b/src/rhoknp/props/feature.py index 883d42fd..7fb51dfe 100644 --- a/src/rhoknp/props/feature.py +++ b/src/rhoknp/props/feature.py @@ -9,8 +9,10 @@ class FeatureDict(Dict[str, Union[str, bool]]): """文節,基本句,形態素の素性情報を表すクラス.""" IGNORE_TAG_PREFIXES = {"rel ", "memo "} - PAT = re.compile(r'(?P(<([^>"]|"[^"]*?")+>)*)') - FEATURE_PAT = re.compile(rf"<(?!({'|'.join(IGNORE_TAG_PREFIXES)}))(?P([^:\"]|\".*?\")+?)(:(?P.+?))?>") + PAT = re.compile(r'(?P(<([^>"\\]|"[^"]*?"|\\>?)+>)*)') + FEATURE_PAT = re.compile( + rf"<(?!({'|'.join(IGNORE_TAG_PREFIXES)}))(?P([^:\"]|\".*?\")+?)(:(?P([^>\\]|\\>?)+))?>" + ) def __setitem__(self, key: str, value: Union[str, bool]) -> None: if key == "rel": @@ -36,10 +38,10 @@ def from_fstring(cls, fstring: str) -> "FeatureDict": Args: fstring: KNP 形式における素性文字列. """ - features = {} + features = cls() for match in cls.FEATURE_PAT.finditer(fstring): - features[match["key"]] = match["value"] or True - return cls(features) + features[match["key"]] = match["value"].replace(r"\>", ">") if match["value"] is not None else True + return features def to_fstring(self) -> str: """素性文字列に変換.""" @@ -51,4 +53,5 @@ def _item_to_fstring(key: str, value: Union[str, bool]) -> str: return "" if value is True: return f"<{key}>" - return f"<{key}:{value}>" + escaped_value = value.replace(">", r"\>") # escape ">" + return f"<{key}:{escaped_value}>" diff --git a/src/rhoknp/props/named_entity.py b/src/rhoknp/props/named_entity.py index 022dafc9..aa1db990 100644 --- a/src/rhoknp/props/named_entity.py +++ b/src/rhoknp/props/named_entity.py @@ -37,7 +37,7 @@ def has_value(cls, value: str) -> bool: class NamedEntity: """固有表現を表すクラス.""" - PAT: ClassVar[re.Pattern] = re.compile(r"\w+):(?P[^>]+)>") + PAT: ClassVar[re.Pattern] = re.compile(r"\w+):(?P([^>\\]|\\>?)+)>") category: NamedEntityCategory morphemes: List["Morpheme"] @@ -61,7 +61,7 @@ def from_fstring(cls, fstring: str, candidate_morphemes: List["Morpheme"]) -> Op if not NamedEntityCategory.has_value(category): logger.warning(f"{candidate_morphemes[0].sentence.sid}: unknown NE category: {category}") return None - name: str = match["name"] + name: str = match["name"].replace(r"\>", ">") span = cls._find_morpheme_span(name, candidate_morphemes) if span is None: logger.warning(f"{candidate_morphemes[0].sentence.sid}: morpheme span of '{name}' not found") @@ -70,7 +70,8 @@ def from_fstring(cls, fstring: str, candidate_morphemes: List["Morpheme"]) -> Op def to_fstring(self) -> str: """素性文字列に変換.""" - return f"" + escaped_text = self.text.replace(">", r"\>") # escape ">" + return f"" @staticmethod def _find_morpheme_span(name: str, candidates: List["Morpheme"]) -> Optional[range]: diff --git a/src/rhoknp/units/sentence.py b/src/rhoknp/units/sentence.py index a4ce87ee..52b49032 100644 --- a/src/rhoknp/units/sentence.py +++ b/src/rhoknp/units/sentence.py @@ -67,7 +67,9 @@ def __post_init__(self) -> None: for base_phrase in self.base_phrases: if "NE" not in base_phrase.features: continue - fstring = f'' + assert isinstance(base_phrase.features["NE"], str) + ne_value = base_phrase.features["NE"].replace(">", r"\>") + fstring = f"" candidate_morphemes = self.morphemes[: base_phrase.morphemes[-1].index + 1] named_entity = NamedEntity.from_fstring(fstring, candidate_morphemes) if named_entity is not None: diff --git a/tests/props/test_features.py b/tests/props/test_features.py index 18036e69..6ef8c85f 100644 --- a/tests/props/test_features.py +++ b/tests/props/test_features.py @@ -35,6 +35,13 @@ class FeaturesTestCase: }, length=1, ), + FeaturesTestCase( + fstring=r"""タグ>""", + features={ + "NE": r"OPTIONAL:html>タグ", + }, + length=1, + ), ] @@ -55,7 +62,6 @@ class FeaturesTestCase: def test_from_fstring(fstring: str, features: Dict[str, Union[str, bool]], length: int) -> None: fs = FeatureDict.from_fstring(fstring) assert len(fs) == length - print(dict(fs)) assert dict(fs) == features assert fs.get("dummy") is None diff --git a/tests/props/test_named_entity.py b/tests/props/test_named_entity.py index 3d211c67..d1351e0a 100644 --- a/tests/props/test_named_entity.py +++ b/tests/props/test_named_entity.py @@ -79,10 +79,7 @@ def test_unknown_category() -> None: """ ) ) - ne = NamedEntity.from_fstring( - fstring, - sentence.morphemes, - ) + ne = NamedEntity.from_fstring(fstring, sentence.morphemes) assert ne is None @@ -101,8 +98,96 @@ def test_span_not_found() -> None: """ ) ) - ne = NamedEntity.from_fstring( - fstring, - sentence.morphemes, - ) + ne = NamedEntity.from_fstring(fstring, sentence.morphemes) assert ne is None + + +@pytest.mark.parametrize( + "case", + [ + dict( + fstring=r"タグ>", + category=NamedEntityCategory.OPTIONAL, + text="html>タグ", + knp=textwrap.dedent( + """\ + # S-ID:1 + * -1D + + 1D + < < < 特殊 1 括弧始 3 * 0 * 0 + html html html 名詞 6 普通名詞 1 * 0 * 0 + > > > 特殊 1 括弧終 4 * 0 * 0 + + -1D + タグ たぐ タグ 名詞 6 普通名詞 1 * 0 * 0 + EOS + """ + ), + ), + dict( + fstring=r"", + category=NamedEntityCategory.OPTIONAL, + text=" > > 特殊 1 括弧終 4 * 0 * 0 + + -1D + タグ たぐ タグ 名詞 6 普通名詞 1 * 0 * 0 + EOS + """ + ), + ), + dict( + fstring=r"", + category=NamedEntityCategory.OPTIONAL, + text=r"バック\スラッシュ", + knp=textwrap.dedent( + r""" + * 1D + + 2D + バック ばっく バック 名詞 6 サ変名詞 2 * 0 * 0 + + 2D + \ \ \ 特殊 1 記号 5 * 0 * 0 + * -1D + + -1D + スラッシュ すらっしゅ スラッシュ 名詞 6 普通名詞 1 * 0 * 0 + EOS + """.lstrip( + "\n" + ) + ), + ), + ], +) +def test_escape(case: Dict[str, Any]) -> None: + sentence = Sentence.from_knp(case["knp"]) + ne = NamedEntity.from_fstring(case["fstring"], sentence.morphemes) + assert ne is not None + assert ne.category == case["category"] + assert ne.text == case["text"] + assert ne.to_fstring() == case["fstring"] + + +def test_escape_in_knp() -> None: + knp_text = textwrap.dedent( + r""" + # S-ID:1 + * -1D + + 1D + < < < 特殊 1 括弧始 3 * 0 * 0 + html html html 名詞 6 普通名詞 1 * 0 * 0 + > > > 特殊 1 括弧終 4 * 0 * 0 + + -1D タグ> + タグ たぐ タグ 名詞 6 普通名詞 1 * 0 * 0 + EOS + """.lstrip( + "\n" + ) + ) + sentence = Sentence.from_knp(knp_text) + assert sentence.named_entities[0].text == "html>タグ" + assert sentence.to_knp() == knp_text From d64264e82825d1a13f0f96c75ecc8565290c5639 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Fri, 21 Jul 2023 21:49:07 +0900 Subject: [PATCH 34/52] refactor tests --- tests/cli/test_serve.py | 50 +++++++++---------- tests/units/test_base_phrase.py | 33 ++++++------- tests/units/test_clause.py | 87 +++++++++++++++------------------ tests/units/test_morpheme.py | 55 ++++++++++----------- 4 files changed, 104 insertions(+), 121 deletions(-) diff --git a/tests/cli/test_serve.py b/tests/cli/test_serve.py index 0f2a5f1e..0199e462 100644 --- a/tests/cli/test_serve.py +++ b/tests/cli/test_serve.py @@ -158,32 +158,30 @@ def test_get_string_diff(pre_text: str, post_text: str, expected: List[_Span]) - def test_draw_tree() -> None: knp_text = textwrap.dedent( - textwrap.dedent( - """\ - # S-ID:001-0-0 - * 1D - + 1D - クロール くろーる クロール 名詞 6 普通名詞 1 * 0 * 0 "代表表記:クロール/くろーる カテゴリ:抽象物 ドメイン:スポーツ" - で で で 助詞 9 格助詞 1 * 0 * 0 "代表表記:で/で" - * 3D - + 3D - 泳いで およいで 泳ぐ 動詞 2 * 0 子音動詞ガ行 4 タ系連用テ形 14 "代表表記:泳ぐ/およぐ" - いる いる いる 接尾辞 14 動詞性接尾辞 7 母音動詞 1 基本形 2 "代表表記:いる/いる" - * 3P - + 3P - 太郎 たろう 太郎 名詞 6 人名 5 * 0 * 0 "代表表記:太郎/たろう 人名:日本:名:45:0.00106" - と と と 助詞 9 格助詞 1 * 0 * 0 "代表表記:と/と" - * 4D - + 4D - 次郎 じろう 次郎 名詞 6 人名 5 * 0 * 0 "代表表記:次郎/じろう 人名:日本:名:135:0.00068" - を を を 助詞 9 格助詞 1 * 0 * 0 "代表表記:を/を" - * -1D - + -1D - 見た みた 見る 動詞 2 * 0 母音動詞 1 タ形 10 "代表表記:見る/みる 補文ト 自他動詞:自:見える/みえる" - 。 。 。 特殊 1 句点 1 * 0 * 0 "代表表記:。/。" - EOS - """ - ) + """\ + # S-ID:001-0-0 + * 1D + + 1D + クロール くろーる クロール 名詞 6 普通名詞 1 * 0 * 0 "代表表記:クロール/くろーる カテゴリ:抽象物 ドメイン:スポーツ" + で で で 助詞 9 格助詞 1 * 0 * 0 "代表表記:で/で" + * 3D + + 3D + 泳いで およいで 泳ぐ 動詞 2 * 0 子音動詞ガ行 4 タ系連用テ形 14 "代表表記:泳ぐ/およぐ" + いる いる いる 接尾辞 14 動詞性接尾辞 7 母音動詞 1 基本形 2 "代表表記:いる/いる" + * 3P + + 3P + 太郎 たろう 太郎 名詞 6 人名 5 * 0 * 0 "代表表記:太郎/たろう 人名:日本:名:45:0.00106" + と と と 助詞 9 格助詞 1 * 0 * 0 "代表表記:と/と" + * 4D + + 4D + 次郎 じろう 次郎 名詞 6 人名 5 * 0 * 0 "代表表記:次郎/じろう 人名:日本:名:135:0.00068" + を を を 助詞 9 格助詞 1 * 0 * 0 "代表表記:を/を" + * -1D + + -1D + 見た みた 見る 動詞 2 * 0 母音動詞 1 タ形 10 "代表表記:見る/みる 補文ト 自他動詞:自:見える/みえる" + 。 。 。 特殊 1 句点 1 * 0 * 0 "代表表記:。/。" + EOS + """ ) document = Document.from_knp(knp_text) _ = _draw_tree(document) diff --git a/tests/units/test_base_phrase.py b/tests/units/test_base_phrase.py index d4fc931c..31e97a15 100644 --- a/tests/units/test_base_phrase.py +++ b/tests/units/test_base_phrase.py @@ -32,23 +32,21 @@ }, { "knp": textwrap.dedent( - textwrap.dedent( - """\ - # S-ID:1 - * 1D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS> - + 2D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><名詞項候補><先行詞候補><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS><解析格:ガ> - EOS EOS EOS 名詞 6 組織名 6 * 0 * 0 "未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS 品詞変更:EOS-EOS-EOS-15-3-0-0" <未知語><品詞推定:名詞><疑似代表表記><代表表記:EOS/EOS><正規化代表表記:EOS/EOS><品詞変更:EOS-EOS-EOS-15-3-0-0-"未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS"><品曖><品曖-アルファベット><品曖-組織名><記英数カ><英記号><記号><名詞相当語><文頭><自立><内容語><タグ単位始><文節始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> - は は は 助詞 9 副助詞 2 * 0 * 0 NIL <かな漢字><ひらがな><付属> - * -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><正規化代表表記:特殊/とくしゅa+記号/きごう><主辞代表表記:記号/きごう> - + 2D <文節内><係:文節内><名詞的形容詞語幹><体言><名詞項候補><先行詞候補><非用言格解析:形><正規化代表表記:特殊/とくしゅa> - 特殊 とくしゅ 特殊だ 形容詞 3 * 0 ナノ形容詞 22 語幹 1 "代表表記:特殊/とくしゅa 代表表記変更:特殊だ/とくしゅだ 反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん" <代表表記:特殊/とくしゅa><反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん><正規化代表表記:特殊/とくしゅa><漢字><かな漢字><名詞的形容詞語幹><代表表記変更:特殊だ/とくしゅだ><名詞相当語><自立><内容語><タグ単位始><文節始><用言表記先頭><用言表記末尾><用言意味表記末尾> - + -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><判定詞句><名詞項候補><先行詞候補><正規化代表表記:記号/きごう><主辞代表表記:記号/きごう><用言代表表記:記号/きごう><節-区切><節-主辞><時制:非過去><格関係0:ガ:EOS><格解析結果:記号/きごう:判3:ガ/N/EOS/0/0/1><標準用言代表表記:記号/きごう> - 記号 きごう 記号 名詞 6 普通名詞 1 * 0 * 0 "代表表記:記号/きごう カテゴリ:抽象物" <代表表記:記号/きごう><カテゴリ:抽象物><正規化代表表記:記号/きごう><漢字><かな漢字><名詞相当語><自立><複合←><内容語><タグ単位始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> - です です だ 判定詞 4 * 0 判定詞 25 デス列基本形 27 NIL <かな漢字><ひらがな><活用語><表現文末><付属> - 。 。 。 特殊 1 句点 1 * 0 * 0 NIL <英記号><記号><文末><付属> - EOS - """ - ) + """\ + # S-ID:1 + * 1D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS> + + 2D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><名詞項候補><先行詞候補><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS><解析格:ガ> + EOS EOS EOS 名詞 6 組織名 6 * 0 * 0 "未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS 品詞変更:EOS-EOS-EOS-15-3-0-0" <未知語><品詞推定:名詞><疑似代表表記><代表表記:EOS/EOS><正規化代表表記:EOS/EOS><品詞変更:EOS-EOS-EOS-15-3-0-0-"未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS"><品曖><品曖-アルファベット><品曖-組織名><記英数カ><英記号><記号><名詞相当語><文頭><自立><内容語><タグ単位始><文節始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> + は は は 助詞 9 副助詞 2 * 0 * 0 NIL <かな漢字><ひらがな><付属> + * -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><正規化代表表記:特殊/とくしゅa+記号/きごう><主辞代表表記:記号/きごう> + + 2D <文節内><係:文節内><名詞的形容詞語幹><体言><名詞項候補><先行詞候補><非用言格解析:形><正規化代表表記:特殊/とくしゅa> + 特殊 とくしゅ 特殊だ 形容詞 3 * 0 ナノ形容詞 22 語幹 1 "代表表記:特殊/とくしゅa 代表表記変更:特殊だ/とくしゅだ 反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん" <代表表記:特殊/とくしゅa><反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん><正規化代表表記:特殊/とくしゅa><漢字><かな漢字><名詞的形容詞語幹><代表表記変更:特殊だ/とくしゅだ><名詞相当語><自立><内容語><タグ単位始><文節始><用言表記先頭><用言表記末尾><用言意味表記末尾> + + -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><判定詞句><名詞項候補><先行詞候補><正規化代表表記:記号/きごう><主辞代表表記:記号/きごう><用言代表表記:記号/きごう><節-区切><節-主辞><時制:非過去><格関係0:ガ:EOS><格解析結果:記号/きごう:判3:ガ/N/EOS/0/0/1><標準用言代表表記:記号/きごう> + 記号 きごう 記号 名詞 6 普通名詞 1 * 0 * 0 "代表表記:記号/きごう カテゴリ:抽象物" <代表表記:記号/きごう><カテゴリ:抽象物><正規化代表表記:記号/きごう><漢字><かな漢字><名詞相当語><自立><複合←><内容語><タグ単位始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> + です です だ 判定詞 4 * 0 判定詞 25 デス列基本形 27 NIL <かな漢字><ひらがな><活用語><表現文末><付属> + 。 。 。 特殊 1 句点 1 * 0 * 0 NIL <英記号><記号><文末><付属> + EOS + """ ), "num": 3, "parent_ids": [2, 2, -1], @@ -138,7 +136,6 @@ }, ] - KNP_SNIPPETS = [ { "knp": textwrap.dedent( diff --git a/tests/units/test_clause.py b/tests/units/test_clause.py index 914dc7a7..4b1996df 100644 --- a/tests/units/test_clause.py +++ b/tests/units/test_clause.py @@ -32,23 +32,21 @@ }, { "knp": textwrap.dedent( - textwrap.dedent( - """\ - # S-ID:1 - * 1D - + 2D - EOS EOS EOS 名詞 6 組織名 6 * 0 * 0 - は は は 助詞 9 副助詞 2 * 0 * 0 - * -1D - + 2D - 特殊 とくしゅ 特殊だ 形容詞 3 * 0 ナノ形容詞 22 語幹 1 - + -1D <節-区切><節-主辞> - 記号 きごう 記号 名詞 6 普通名詞 1 * 0 * 0 "代表表記:記号/きごう カテゴリ:抽象物" - です です だ 判定詞 4 * 0 判定詞 25 デス列基本形 27 - 。 。 。 特殊 1 句点 1 * 0 * 0 - EOS - """ - ) + """\ + # S-ID:1 + * 1D + + 2D + EOS EOS EOS 名詞 6 組織名 6 * 0 * 0 + は は は 助詞 9 副助詞 2 * 0 * 0 + * -1D + + 2D + 特殊 とくしゅ 特殊だ 形容詞 3 * 0 ナノ形容詞 22 語幹 1 + + -1D <節-区切><節-主辞> + 記号 きごう 記号 名詞 6 普通名詞 1 * 0 * 0 "代表表記:記号/きごう カテゴリ:抽象物" + です です だ 判定詞 4 * 0 判定詞 25 デス列基本形 27 + 。 。 。 特殊 1 句点 1 * 0 * 0 + EOS + """ ), "num": 1, "parent_ids": [-1], @@ -56,31 +54,29 @@ }, { "knp": textwrap.dedent( - textwrap.dedent( - """\ - # S-ID:1 - * 1D - + 1D - ご飯 ごはん ご飯 名詞 6 普通名詞 1 * 0 * 0 - を を を 助詞 9 格助詞 1 * 0 * 0 - * 2D - + 2D <節-主辞> - 食べて たべて 食べる 動詞 2 * 0 母音動詞 1 タ系連用テ形 14 - いる いる いる 接尾辞 14 動詞性接尾辞 7 母音動詞 1 基本形 2 - * 4D - + 4D <節-区切> - ところ ところ ところ 名詞 6 副詞的名詞 9 * 0 * 0 - に に に 助詞 9 格助詞 1 * 0 * 0 - * 4D - + 4D - 彼 かれ 彼 名詞 6 普通名詞 1 * 0 * 0 - が が が 助詞 9 格助詞 1 * 0 * 0 - * -1D - + -1D <節-区切><節-主辞> - 来た 来た 来る 動詞 2 * 0 カ変動詞来 15 タ形 10 - EOS - """ - ) + """\ + # S-ID:1 + * 1D + + 1D + ご飯 ごはん ご飯 名詞 6 普通名詞 1 * 0 * 0 + を を を 助詞 9 格助詞 1 * 0 * 0 + * 2D + + 2D <節-主辞> + 食べて たべて 食べる 動詞 2 * 0 母音動詞 1 タ系連用テ形 14 + いる いる いる 接尾辞 14 動詞性接尾辞 7 母音動詞 1 基本形 2 + * 4D + + 4D <節-区切> + ところ ところ ところ 名詞 6 副詞的名詞 9 * 0 * 0 + に に に 助詞 9 格助詞 1 * 0 * 0 + * 4D + + 4D + 彼 かれ 彼 名詞 6 普通名詞 1 * 0 * 0 + が が が 助詞 9 格助詞 1 * 0 * 0 + * -1D + + -1D <節-区切><節-主辞> + 来た 来た 来る 動詞 2 * 0 カ変動詞来 15 タ形 10 + EOS + """ ), "num": 2, "parent_ids": [1, -1], @@ -88,7 +84,6 @@ }, ] - KNP_SNIPPETS = [ { "knp": textwrap.dedent( @@ -362,7 +357,7 @@ def test_is_sentential_complement(case: Dict[str, str]) -> None: def test_invalid_head_0() -> None: - knp_text = textwrap.dedent( + clause = Clause.from_knp( textwrap.dedent( """\ * 1D @@ -376,12 +371,11 @@ def test_invalid_head_0() -> None: """ ) ) - clause = Clause.from_knp(knp_text) assert clause.head.text == "いいので" def test_invalid_head_1() -> None: - knp_text = textwrap.dedent( + clause = Clause.from_knp( textwrap.dedent( """\ * 1D @@ -395,5 +389,4 @@ def test_invalid_head_1() -> None: """ ) ) - clause = Clause.from_knp(knp_text) assert clause.head.text == "いいので" diff --git a/tests/units/test_morpheme.py b/tests/units/test_morpheme.py index 3b197d67..fea11c05 100644 --- a/tests/units/test_morpheme.py +++ b/tests/units/test_morpheme.py @@ -45,37 +45,33 @@ }, { "knp": textwrap.dedent( - textwrap.dedent( - """\ - # S-ID:1 - * 1D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS> - + 2D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><名詞項候補><先行詞候補><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS><解析格:ガ> - EOS EOS EOS 名詞 6 組織名 6 * 0 * 0 "未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS 品詞変更:EOS-EOS-EOS-15-3-0-0" <未知語><品詞推定:名詞><疑似代表表記><代表表記:EOS/EOS><正規化代表表記:EOS/EOS><品詞変更:EOS-EOS-EOS-15-3-0-0-"未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS"><品曖><品曖-アルファベット><品曖-組織名><記英数カ><英記号><記号><名詞相当語><文頭><自立><内容語><タグ単位始><文節始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> - は は は 助詞 9 副助詞 2 * 0 * 0 NIL <かな漢字><ひらがな><付属> - * -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><正規化代表表記:特殊/とくしゅa+記号/きごう><主辞代表表記:記号/きごう> - + 2D <文節内><係:文節内><名詞的形容詞語幹><体言><名詞項候補><先行詞候補><非用言格解析:形><正規化代表表記:特殊/とくしゅa> - 特殊 とくしゅ 特殊だ 形容詞 3 * 0 ナノ形容詞 22 語幹 1 "代表表記:特殊/とくしゅa 代表表記変更:特殊だ/とくしゅだ 反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん" <代表表記:特殊/とくしゅa><反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん><正規化代表表記:特殊/とくしゅa><漢字><かな漢字><名詞的形容詞語幹><代表表記変更:特殊だ/とくしゅだ><名詞相当語><自立><内容語><タグ単位始><文節始><用言表記先頭><用言表記末尾><用言意味表記末尾> - + -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><判定詞句><名詞項候補><先行詞候補><正規化代表表記:記号/きごう><主辞代表表記:記号/きごう><用言代表表記:記号/きごう><節-区切><節-主辞><時制:非過去><格関係0:ガ:EOS><格解析結果:記号/きごう:判3:ガ/N/EOS/0/0/1><標準用言代表表記:記号/きごう> - 記号 きごう 記号 名詞 6 普通名詞 1 * 0 * 0 "代表表記:記号/きごう カテゴリ:抽象物" <代表表記:記号/きごう><カテゴリ:抽象物><正規化代表表記:記号/きごう><漢字><かな漢字><名詞相当語><自立><複合←><内容語><タグ単位始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> - です です だ 判定詞 4 * 0 判定詞 25 デス列基本形 27 NIL <かな漢字><ひらがな><活用語><表現文末><付属> - 。 。 。 特殊 1 句点 1 * 0 * 0 NIL <英記号><記号><文末><付属> - EOS - """ - ) + """\ + # S-ID:1 + * 1D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS> + + 2D <文頭><組織名疑><ハ><助詞><体言><係:未格><提題><区切:3-5><主題表現><格要素><連用要素><名詞項候補><先行詞候補><正規化代表表記:EOS/EOS><主辞代表表記:EOS/EOS><解析格:ガ> + EOS EOS EOS 名詞 6 組織名 6 * 0 * 0 "未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS 品詞変更:EOS-EOS-EOS-15-3-0-0" <未知語><品詞推定:名詞><疑似代表表記><代表表記:EOS/EOS><正規化代表表記:EOS/EOS><品詞変更:EOS-EOS-EOS-15-3-0-0-"未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS"><品曖><品曖-アルファベット><品曖-組織名><記英数カ><英記号><記号><名詞相当語><文頭><自立><内容語><タグ単位始><文節始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> + は は は 助詞 9 副助詞 2 * 0 * 0 NIL <かな漢字><ひらがな><付属> + * -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><正規化代表表記:特殊/とくしゅa+記号/きごう><主辞代表表記:記号/きごう> + + 2D <文節内><係:文節内><名詞的形容詞語幹><体言><名詞項候補><先行詞候補><非用言格解析:形><正規化代表表記:特殊/とくしゅa> + 特殊 とくしゅ 特殊だ 形容詞 3 * 0 ナノ形容詞 22 語幹 1 "代表表記:特殊/とくしゅa 代表表記変更:特殊だ/とくしゅだ 反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん" <代表表記:特殊/とくしゅa><反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん><正規化代表表記:特殊/とくしゅa><漢字><かな漢字><名詞的形容詞語幹><代表表記変更:特殊だ/とくしゅだ><名詞相当語><自立><内容語><タグ単位始><文節始><用言表記先頭><用言表記末尾><用言意味表記末尾> + + -1D <文末><句点><体言><判定詞><用言:判><レベル:C><区切:5-5><裸名詞><係:文末><提題受:30><主節><格要素><連用要素><状態述語><敬語:丁寧表現><判定詞句><名詞項候補><先行詞候補><正規化代表表記:記号/きごう><主辞代表表記:記号/きごう><用言代表表記:記号/きごう><節-区切><節-主辞><時制:非過去><格関係0:ガ:EOS><格解析結果:記号/きごう:判3:ガ/N/EOS/0/0/1><標準用言代表表記:記号/きごう> + 記号 きごう 記号 名詞 6 普通名詞 1 * 0 * 0 "代表表記:記号/きごう カテゴリ:抽象物" <代表表記:記号/きごう><カテゴリ:抽象物><正規化代表表記:記号/きごう><漢字><かな漢字><名詞相当語><自立><複合←><内容語><タグ単位始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> + です です だ 判定詞 4 * 0 判定詞 25 デス列基本形 27 NIL <かな漢字><ひらがな><活用語><表現文末><付属> + 。 。 。 特殊 1 句点 1 * 0 * 0 NIL <英記号><記号><文末><付属> + EOS + """ ), "jumanpp": textwrap.dedent( - textwrap.dedent( - """\ - # S-ID:1 - EOS EOS EOS 名詞 6 組織名 6 * 0 * 0 "未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS 品詞変更:EOS-EOS-EOS-15-3-0-0" <未知語><品詞推定:名詞><疑似代表表記><代表表記:EOS/EOS><正規化代表表記:EOS/EOS><品詞変更:EOS-EOS-EOS-15-3-0-0-"未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS"><品曖><品曖-アルファベット><品曖-組織名><記英数カ><英記号><記号><名詞相当語><文頭><自立><内容語><タグ単位始><文節始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> - は は は 助詞 9 副助詞 2 * 0 * 0 NIL <かな漢字><ひらがな><付属> - 特殊 とくしゅ 特殊だ 形容詞 3 * 0 ナノ形容詞 22 語幹 1 "代表表記:特殊/とくしゅa 代表表記変更:特殊だ/とくしゅだ 反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん" <代表表記:特殊/とくしゅa><反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん><正規化代表表記:特殊/とくしゅa><漢字><かな漢字><名詞的形容詞語幹><代表表記変更:特殊だ/とくしゅだ><名詞相当語><自立><内容語><タグ単位始><文節始><用言表記先頭><用言表記末尾><用言意味表記末尾> - 記号 きごう 記号 名詞 6 普通名詞 1 * 0 * 0 "代表表記:記号/きごう カテゴリ:抽象物" <代表表記:記号/きごう><カテゴリ:抽象物><正規化代表表記:記号/きごう><漢字><かな漢字><名詞相当語><自立><複合←><内容語><タグ単位始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> - です です だ 判定詞 4 * 0 判定詞 25 デス列基本形 27 NIL <かな漢字><ひらがな><活用語><表現文末><付属> - 。 。 。 特殊 1 句点 1 * 0 * 0 NIL <英記号><記号><文末><付属> - EOS - """ - ) + """\ + # S-ID:1 + EOS EOS EOS 名詞 6 組織名 6 * 0 * 0 "未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS 品詞変更:EOS-EOS-EOS-15-3-0-0" <未知語><品詞推定:名詞><疑似代表表記><代表表記:EOS/EOS><正規化代表表記:EOS/EOS><品詞変更:EOS-EOS-EOS-15-3-0-0-"未知語:ローマ字 品詞推定:名詞 疑似代表表記 代表表記:EOS/EOS"><品曖><品曖-アルファベット><品曖-組織名><記英数カ><英記号><記号><名詞相当語><文頭><自立><内容語><タグ単位始><文節始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> + は は は 助詞 9 副助詞 2 * 0 * 0 NIL <かな漢字><ひらがな><付属> + 特殊 とくしゅ 特殊だ 形容詞 3 * 0 ナノ形容詞 22 語幹 1 "代表表記:特殊/とくしゅa 代表表記変更:特殊だ/とくしゅだ 反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん" <代表表記:特殊/とくしゅa><反義:名詞-普通名詞:一般/いっぱん;名詞-普通名詞:普遍/ふへん><正規化代表表記:特殊/とくしゅa><漢字><かな漢字><名詞的形容詞語幹><代表表記変更:特殊だ/とくしゅだ><名詞相当語><自立><内容語><タグ単位始><文節始><用言表記先頭><用言表記末尾><用言意味表記末尾> + 記号 きごう 記号 名詞 6 普通名詞 1 * 0 * 0 "代表表記:記号/きごう カテゴリ:抽象物" <代表表記:記号/きごう><カテゴリ:抽象物><正規化代表表記:記号/きごう><漢字><かな漢字><名詞相当語><自立><複合←><内容語><タグ単位始><文節主辞><用言表記先頭><用言表記末尾><用言意味表記末尾> + です です だ 判定詞 4 * 0 判定詞 25 デス列基本形 27 NIL <かな漢字><ひらがな><活用語><表現文末><付属> + 。 。 。 特殊 1 句点 1 * 0 * 0 NIL <英記号><記号><文末><付属> + EOS + """ ), "num": 6, "parent_ids": [3, 0, 3, -1, 3, 3], @@ -83,7 +79,6 @@ }, ] - JUMANPP_SNIPPETS = [ { "jumanpp": '外国 がいこく 外国 名詞 6 普通名詞 1 * 0 * 0 "代表表記:外国/がいこく ドメイン:政治 カテゴリ:場所-その他"\n', From d6f8157cd98fc092d71f6c5cb1b197493719f849 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 02:46:45 +0000 Subject: [PATCH 35/52] Bump fastapi from 0.100.0 to 0.100.1 Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.100.0 to 0.100.1. - [Release notes](https://github.com/tiangolo/fastapi/releases) - [Commits](https://github.com/tiangolo/fastapi/compare/0.100.0...0.100.1) --- updated-dependencies: - dependency-name: fastapi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2cc138af..7029f836 100644 --- a/poetry.lock +++ b/poetry.lock @@ -388,13 +388,13 @@ tests = ["asttokens", "littleutils", "pytest", "rich"] [[package]] name = "fastapi" -version = "0.100.0" +version = "0.100.1" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = true python-versions = ">=3.7" files = [ - {file = "fastapi-0.100.0-py3-none-any.whl", hash = "sha256:271662daf986da8fa98dc2b7c7f61c4abdfdccfb4786d79ed8b2878f172c6d5f"}, - {file = "fastapi-0.100.0.tar.gz", hash = "sha256:acb5f941ea8215663283c10018323ba7ea737c571b67fc7e88e9469c7eb1d12e"}, + {file = "fastapi-0.100.1-py3-none-any.whl", hash = "sha256:ec6dd52bfc4eff3063cfcd0713b43c87640fefb2687bbbe3d8a08d94049cdf32"}, + {file = "fastapi-0.100.1.tar.gz", hash = "sha256:522700d7a469e4a973d92321ab93312448fbe20fca9c8da97effc7e7bc56df23"}, ] [package.dependencies] From a1c5178c6b622b4d626439a79752e7db45599185 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 02:34:44 +0000 Subject: [PATCH 36/52] Bump rich from 13.4.2 to 13.5.0 Bumps [rich](https://github.com/Textualize/rich) from 13.4.2 to 13.5.0. - [Release notes](https://github.com/Textualize/rich/releases) - [Changelog](https://github.com/Textualize/rich/blob/master/CHANGELOG.md) - [Commits](https://github.com/Textualize/rich/compare/v13.4.2...v13.5.0) --- updated-dependencies: - dependency-name: rich dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7029f836..0550ce2a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1318,13 +1318,13 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "rich" -version = "13.4.2" +version = "13.5.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = true python-versions = ">=3.7.0" files = [ - {file = "rich-13.4.2-py3-none-any.whl", hash = "sha256:8f87bc7ee54675732fa66a05ebfe489e27264caeeff3728c945d25971b6485ec"}, - {file = "rich-13.4.2.tar.gz", hash = "sha256:d653d6bccede5844304c605d5aac802c7cf9621efd700b46c7ec2b51ea914898"}, + {file = "rich-13.5.0-py3-none-any.whl", hash = "sha256:996670a7618ccce27c55ba6fc0142e6e343773e11d34c96566a17b71b0e6f179"}, + {file = "rich-13.5.0.tar.gz", hash = "sha256:62c81e88dc078d2372858660e3d5566746870133e51321f852ccc20af5c7e7b2"}, ] [package.dependencies] From a0a1de5ea90bf9817b04684381c7c42d98d39888 Mon Sep 17 00:00:00 2001 From: Hirokazu Kiyomaru Date: Mon, 31 Jul 2023 11:59:37 +0900 Subject: [PATCH 37/52] allow empty input in Sentence.from_knp() --- src/rhoknp/units/sentence.py | 9 +++++---- tests/units/test_sentence.py | 12 ++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/rhoknp/units/sentence.py b/src/rhoknp/units/sentence.py index 52b49032..d8189cda 100644 --- a/src/rhoknp/units/sentence.py +++ b/src/rhoknp/units/sentence.py @@ -415,10 +415,11 @@ def from_knp(cls, knp_text: str, post_init: bool = True) -> "Sentence": child_lines.append(line) continue if line.strip() == cls.EOS: - if has_clause_boundary: - clauses.append(Clause.from_knp("\n".join(child_lines))) - else: - phrases.append(Phrase.from_knp("\n".join(child_lines))) + if child_lines: + if has_clause_boundary: + clauses.append(Clause.from_knp("\n".join(child_lines))) + else: + phrases.append(Phrase.from_knp("\n".join(child_lines))) break raise ValueError(f"malformed line: {line}") if has_clause_boundary is True: diff --git a/tests/units/test_sentence.py b/tests/units/test_sentence.py index d93181e6..2700c2f6 100644 --- a/tests/units/test_sentence.py +++ b/tests/units/test_sentence.py @@ -353,6 +353,18 @@ def test_from_knp_with_no_clause_tag(case: Dict[str, str]) -> None: _ = Sentence.from_knp(case["knp_with_no_clause_tag"]) +def test_from_knp_empty(): + _ = Sentence.from_knp("") + _ = Sentence.from_knp( + textwrap.dedent( + """\ + # S-ID:1 + EOS + """ + ) + ) + + def test_from_knp_empty_line(): _ = Sentence.from_knp( textwrap.dedent( From 18818e6de6a0e9cc2ed6909fdf6a6c81600143ae Mon Sep 17 00:00:00 2001 From: nobu-g Date: Wed, 16 Aug 2023 22:55:24 +0900 Subject: [PATCH 38/52] fix a bug where documents with rel tags cannot be unpickled --- examples/use_coreference_resolution.py | 4 +-- src/rhoknp/cohesion/coreference.py | 22 +++++++++----- src/rhoknp/units/base_phrase.py | 42 ++++++++++++++++++-------- tests/cohesion/test_coreference.py | 10 +++--- tests/units/test_document.py | 15 +++++++++ tests/units/test_sentence.py | 8 +++++ 6 files changed, 74 insertions(+), 27 deletions(-) diff --git a/examples/use_coreference_resolution.py b/examples/use_coreference_resolution.py index 05f9591f..9a8b292d 100644 --- a/examples/use_coreference_resolution.py +++ b/examples/use_coreference_resolution.py @@ -4,7 +4,7 @@ $ python examples/use_coreference_resolution.py "ソビエト連邦はソ連ともよばれる。同国の首都はモスクワである。" """ import sys -from typing import Set +from typing import List from rhoknp import KWJA, BasePhrase @@ -16,7 +16,7 @@ # Get information. for base_phrase in doc.base_phrases: - coreferents: Set[BasePhrase] = base_phrase.get_coreferents() + coreferents: List[BasePhrase] = base_phrase.get_coreferents() if len(coreferents) > 0: print(f"Mention {base_phrase}") for coreferring_mention in coreferents: diff --git a/src/rhoknp/cohesion/coreference.py b/src/rhoknp/cohesion/coreference.py index 268a19fb..ff6fcbcc 100644 --- a/src/rhoknp/cohesion/coreference.py +++ b/src/rhoknp/cohesion/coreference.py @@ -1,5 +1,5 @@ import logging -from typing import TYPE_CHECKING, Dict, Optional, Set +from typing import TYPE_CHECKING, Dict, List, Optional from rhoknp.cohesion.argument import ExophoraArgument from rhoknp.cohesion.exophora import ExophoraReferent @@ -21,13 +21,17 @@ class Entity: def __init__(self, eid: int, exophora_referent: Optional[ExophoraReferent] = None) -> None: self.eid = eid #: エンティティ ID. self.exophora_referent = exophora_referent #: 外界照応の照応先.対応するものがなければ None. - self.mentions: Set["BasePhrase"] = set() #: このエンティティを参照するメンションの集合. - self.mentions_nonidentical: Set["BasePhrase"] = set() #: このエンティティを≒関係で参照するメンションの集合. + self.mentions: List["BasePhrase"] = [] #: このエンティティを参照するメンションのリスト. + self.mentions_nonidentical: List["BasePhrase"] = [] #: このエンティティを≒関係で参照するメンションのリスト. @property - def mentions_all(self) -> Set["BasePhrase"]: - """nonidentical を含めたこのエンティティを参照する全てのメンションの集合.""" - return self.mentions | self.mentions_nonidentical + def mentions_all(self) -> List["BasePhrase"]: + """nonidentical を含めたこのエンティティを参照する全てのメンションのリスト.""" + ret = self.mentions.copy() + for mention in self.mentions_nonidentical: + if mention not in ret: + ret.append(mention) + return ret def add_mention(self, mention: "BasePhrase", is_nonidentical: bool = False) -> None: """このエンティティを参照するメンションを追加. @@ -44,12 +48,14 @@ def add_mention(self, mention: "BasePhrase", is_nonidentical: bool = False) -> N if mention in self.mentions_all: return mention.entities_nonidentical.add(self) - self.mentions_nonidentical.add(mention) + self.mentions_nonidentical.append(mention) else: if mention in self.mentions_nonidentical: self.remove_mention(mention) + if mention in self.mentions: + return mention.entities.add(self) - self.mentions.add(mention) + self.mentions.append(mention) def remove_mention(self, mention: "BasePhrase") -> None: """このエンティティを参照するメンションを削除. diff --git a/src/rhoknp/units/base_phrase.py b/src/rhoknp/units/base_phrase.py index d194e6f3..b4f0f228 100644 --- a/src/rhoknp/units/base_phrase.py +++ b/src/rhoknp/units/base_phrase.py @@ -2,7 +2,7 @@ import itertools import logging import re -from typing import TYPE_CHECKING, Any, List, Optional, Set +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set try: from functools import cached_property # type: ignore @@ -66,6 +66,24 @@ def __init__( self.index = self.count #: 文内におけるインデックス. BasePhrase.count += 1 + def __getstate__(self) -> Dict[str, Any]: + state = self.__dict__.copy() + # Dump a tuple instead of a set so that the __hash__ function won't be called. + # `eids` is used to hash uninitialized Entity objects. + state["entities"] = tuple(self.entities) + state["eids"] = tuple(entity.eid for entity in state["entities"]) + state["entities_nonidentical"] = tuple(self.entities_nonidentical) + state["eids_nonidentical"] = tuple(entity.eid for entity in state["entities_nonidentical"]) + return state + + def __setstate__(self, state) -> None: + # Restore eids to Entity objects for hashing. + for entity, eid in zip(state["entities"], state.pop("eids")): + entity.eid = eid + for entity, eid in zip(state["entities_nonidentical"], state.pop("eids_nonidentical")): + entity.eid = eid + self.__dict__.update(state) # Entity objects are hashed by eid. + def __post_init__(self) -> None: super().__post_init__() @@ -259,7 +277,7 @@ def to_knp(self) -> str: ret += "".join(morpheme.to_knp() for morpheme in self.morphemes) return ret - def get_coreferents(self, include_nonidentical: bool = False, include_self: bool = False) -> Set["BasePhrase"]: + def get_coreferents(self, include_nonidentical: bool = False, include_self: bool = False) -> List["BasePhrase"]: """この基本句と共参照している基本句の集合を返却. Args: @@ -269,14 +287,17 @@ def get_coreferents(self, include_nonidentical: bool = False, include_self: bool Returns: 共参照している基本句の集合. """ - mentions: Set["BasePhrase"] = set() - for entity in self.entities: - mentions.update(entity.mentions) + mentions: List["BasePhrase"] = [] + for mention in itertools.chain.from_iterable(entity.mentions for entity in self.entities): + if mention not in mentions: + mentions.append(mention) if include_nonidentical is True: - for entity in self.entities_nonidentical: - mentions.update(entity.mentions) - if include_self is False and self in mentions: - mentions.remove(self) + for mention in itertools.chain.from_iterable(entity.mentions for entity in self.entities_nonidentical): + if mention not in mentions: + mentions.append(mention) + if include_self is False: + while self in mentions: + mentions.remove(self) return mentions def _add_argument(self, rel_tag: RelTag) -> None: @@ -349,9 +370,6 @@ def _get_target_base_phrase(self, rel_tag: RelTag) -> Optional["BasePhrase"]: ) return target_base_phrase - def __hash__(self) -> int: - return hash((self.global_index, self.sentence.sid)) - @staticmethod def is_base_phrase_line(line: str) -> bool: """基本句行なら True を返す.""" diff --git a/tests/cohesion/test_coreference.py b/tests/cohesion/test_coreference.py index 1b8a3b7b..2be2ee18 100644 --- a/tests/cohesion/test_coreference.py +++ b/tests/cohesion/test_coreference.py @@ -38,23 +38,23 @@ def test_entity() -> None: entity.add_mention(base_phrase_0) assert entity.eid == eid assert entity.exophora_referent is None - assert entity.mentions_all == {base_phrase_0} + assert entity.mentions_all == [base_phrase_0] assert str(entity) == "天気が" assert repr(entity) == "" entity.add_mention(base_phrase_0, is_nonidentical=True) - assert entity.mentions_all == {base_phrase_0} + assert entity.mentions_all == [base_phrase_0] assert str(entity) == "天気が" assert repr(entity) == "" base_phrase_1 = document.base_phrases[1] entity.add_mention(base_phrase_1, is_nonidentical=True) - assert entity.mentions_all == {base_phrase_0, base_phrase_1} + assert entity.mentions_all == [base_phrase_0, base_phrase_1] assert str(entity) == "天気が" assert repr(entity) == "" entity.remove_mention(base_phrase_0) - assert entity.mentions_all == {base_phrase_1} + assert entity.mentions_all == [base_phrase_1] assert str(entity) == "いいので" assert repr(entity) == "" @@ -65,7 +65,7 @@ def test_exophora_entity() -> None: entity = Entity(eid, exophora_referent=exophora_referent) assert entity.eid == eid assert entity.exophora_referent == exophora_referent - assert entity.mentions_all == set() + assert entity.mentions_all == [] assert str(entity) == "不特定:物1" diff --git a/tests/units/test_document.py b/tests/units/test_document.py index 5b420ce2..afcf57c1 100644 --- a/tests/units/test_document.py +++ b/tests/units/test_document.py @@ -1,4 +1,5 @@ import multiprocessing +import pickle import textwrap from pathlib import Path from typing import Dict @@ -901,3 +902,17 @@ def test_eq_raw_text() -> None: doc1 = Document.from_raw_text("天気がいいので散歩した。") doc2 = Document.from_raw_text("天気がいいので散歩した。") assert doc1 == doc2 + + +@pytest.mark.parametrize("case", CASES) +def test_pickle_unpickle(case: Dict[str, str]) -> None: + doc1 = Document.from_knp(case["knp"]) + doc2 = pickle.loads(pickle.dumps(doc1)) + assert doc1.to_knp() == doc2.to_knp() + + +@pytest.mark.parametrize("path", Path("tests/data").glob("*.knp")) +def test_pickle_unpickle_annotated_corpora(path: Path) -> None: + doc1 = Document.from_knp(path.read_text()) + doc2 = pickle.loads(pickle.dumps(doc1)) + assert doc1.to_knp() == doc2.to_knp() diff --git a/tests/units/test_sentence.py b/tests/units/test_sentence.py index 2700c2f6..a9da0692 100644 --- a/tests/units/test_sentence.py +++ b/tests/units/test_sentence.py @@ -1,3 +1,4 @@ +import pickle import textwrap from typing import Dict @@ -762,3 +763,10 @@ def test_eq_raw_text(case: Dict[str, str]) -> None: sent1 = Sentence.from_raw_text(case["raw_text"]) sent2 = Sentence.from_raw_text(case["raw_text"]) assert sent1 == sent2 + + +@pytest.mark.parametrize("case", CASES) +def test_pickle_unpickle(case: Dict[str, str]) -> None: + sent1 = Sentence.from_knp(case["knp"]) + sent2 = pickle.loads(pickle.dumps(sent1)) + assert sent1.to_knp() == sent2.to_knp() From 791f3f90987310363774c76eed7baddaa378c8d3 Mon Sep 17 00:00:00 2001 From: Hirokazu Kiyomaru Date: Thu, 17 Aug 2023 15:26:50 +0900 Subject: [PATCH 39/52] raise NotImplementedError in KWJA.apply_to_sentence --- src/rhoknp/processors/kwja.py | 34 +---------- tests/processors/test_kwja.py | 109 ++++++++++++++-------------------- 2 files changed, 45 insertions(+), 98 deletions(-) diff --git a/src/rhoknp/processors/kwja.py b/src/rhoknp/processors/kwja.py index 3581c00c..550ff97f 100644 --- a/src/rhoknp/processors/kwja.py +++ b/src/rhoknp/processors/kwja.py @@ -55,7 +55,7 @@ def __init__( try: self._proc = Popen(self.run_command, stdin=PIPE, stdout=PIPE, stderr=PIPE, encoding="utf-8") if skip_sanity_check is False: - _ = self.apply(Sentence.from_raw_text("")) + _ = self.apply(Document.from_raw_text("")) except Exception as e: logger.warning(f"failed to start KWJA: {e}") @@ -133,37 +133,7 @@ def apply_to_sentence(self, sentence: Union[Sentence, str]) -> Sentence: Args: sentence: 文. """ - if not self.is_available(): - raise RuntimeError("KWJA is not available.") - assert self._proc is not None - assert self._proc.stdin is not None - assert self._proc.stdout is not None - - if isinstance(sentence, str): - sentence = Sentence(sentence) - - with self._lock: - self._proc.stdout.flush() - self._proc.stdin.write(sentence.text.rstrip("\n") + "\n") # TODO: Keep the sentence ID - self._proc.stdin.write(Document.EOD + "\n") - self._proc.stdin.flush() - out_text = "" - while self.is_available(): - line = self._proc.stdout.readline() - if line.strip() == Document.EOD: - break - out_text += line - if self._output_format == "raw": - return Sentence.from_raw_text(out_text) - elif self._output_format == "line_by_line": - return Sentence.from_raw_text(out_text) - elif self._output_format == "jumanpp": - return Sentence.from_jumanpp(out_text) - elif self._output_format == "words": - return self._create_sentence_from_words_format(out_text) - else: - assert self._output_format == "knp" - return Sentence.from_knp(out_text) + raise NotImplementedError("KWJA does not support apply_to_sentence() currently.") @staticmethod def _create_sentence_from_words_format(text: str, post_init: bool = True) -> Sentence: diff --git a/tests/processors/test_kwja.py b/tests/processors/test_kwja.py index 3d826927..520d6faa 100644 --- a/tests/processors/test_kwja.py +++ b/tests/processors/test_kwja.py @@ -33,74 +33,67 @@ def test_is_available() -> None: def test_typo() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "typo"]) text = "人口知能" - for doc_or_sent in (kwja.apply_to_document(text), kwja.apply_to_sentence(text)): - assert doc_or_sent.text == "人工知能" + doc = kwja.apply_to_document(text) + assert doc.text == "人工知能" @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_senter() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter"]) - document = kwja.apply_to_document("こんにちは。さようなら。") + text = "こんにちは。さようなら。" + document = kwja.apply_to_document(text) sentences = document.sentences assert len(sentences) == 2 assert sentences[0].text == "こんにちは。" assert sentences[1].text == "さようなら。" - sentence = kwja.apply_to_sentence("こんにちは。") - assert sentence.text == "こんにちは。" @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_seq2seq() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,seq2seq"]) - for doc_or_sent, text in zip( - (kwja.apply_to_document("こんにちは。さようなら"), kwja.apply_to_sentence("さようなら")), - ("こんにちは。さようなら", "さようなら"), - ): - assert isinstance(doc_or_sent, (Document, Sentence)) - morphemes = doc_or_sent.morphemes - assert len(morphemes) > 0 - morpheme = morphemes[0] - assert text.startswith(morpheme.text) - assert text.startswith(morpheme.reading) - assert text.startswith(morpheme.lemma) + text = "こんにちは。さようなら。" + doc = kwja.apply_to_document(text) + assert isinstance(doc, Document) + morphemes = doc.morphemes + assert len(morphemes) > 0 + morpheme = morphemes[0] + assert text.startswith(morpheme.text) + assert text.startswith(morpheme.reading) + assert text.startswith(morpheme.lemma) @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_char() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char"]) - for doc_or_sent, text in zip( - (kwja.apply_to_document("こんにちは。さようなら"), kwja.apply_to_sentence("さようなら")), - ("こんにちは。さようなら", "さようなら"), - ): - assert isinstance(doc_or_sent, (Document, Sentence)) - morphemes = doc_or_sent.morphemes - assert len(morphemes) > 0 - morpheme = morphemes[0] - assert text.startswith(morpheme.text) - assert morpheme.reading == "*" - assert morpheme.lemma == "*" + text = "こんにちは。さようなら。" + doc = kwja.apply_to_document(text) + assert isinstance(doc, Document) + morphemes = doc.morphemes + assert len(morphemes) > 0 + morpheme = morphemes[0] + assert text.startswith(morpheme.text) + assert morpheme.reading == "*" + assert morpheme.lemma == "*" @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") def test_word() -> None: kwja = KWJA(options=["--model-size", "tiny", "--tasks", "senter,char,word"]) - for doc_or_sent, text in zip( - (kwja.apply_to_document("こんにちは。さようなら"), kwja.apply_to_sentence("さようなら")), - ("こんにちは。さようなら", "さようなら"), - ): - assert isinstance(doc_or_sent, (Document, Sentence)) - morphemes = doc_or_sent.morphemes - assert len(morphemes) > 0 - assert text.startswith(morphemes[0].text) - base_phrases = doc_or_sent.base_phrases - assert len(base_phrases) > 0 - assert text.startswith(base_phrases[0].text) - phrases = doc_or_sent.phrases - assert len(phrases) > 0 - assert text.startswith(phrases[0].text) - clauses = doc_or_sent.clauses - assert len(clauses) > 0 - assert text.startswith(clauses[0].text) + text = "こんにちは。さようなら。" + doc = kwja.apply_to_document(text) + assert isinstance(doc, Document) + morphemes = doc.morphemes + assert len(morphemes) > 0 + assert text.startswith(morphemes[0].text) + base_phrases = doc.base_phrases + assert len(base_phrases) > 0 + assert text.startswith(base_phrases[0].text) + phrases = doc.phrases + assert len(phrases) > 0 + assert text.startswith(phrases[0].text) + clauses = doc.clauses + assert len(clauses) > 0 + assert text.startswith(clauses[0].text) @pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") @@ -109,9 +102,10 @@ def test_apply() -> None: text = "外国人参政権" assert isinstance(kwja.apply(text), Document) assert isinstance(kwja.apply(Document.from_raw_text(text)), Document) - assert isinstance(kwja.apply(Sentence.from_raw_text(text)), Sentence) + with pytest.raises(NotImplementedError): + _ = kwja.apply(Sentence.from_raw_text(text)) with pytest.raises(TypeError): - kwja.apply(1) # type: ignore + _ = kwja.apply(1) # type: ignore def test_unsupported_option() -> None: @@ -119,27 +113,10 @@ def test_unsupported_option() -> None: _ = KWJA(options=["--model-size", "tiny", "--tasks", "wakati"]) -@pytest.mark.skipif(not is_kwja_available, reason="KWJA is not available") -@pytest.mark.parametrize( - "text", - [ - "外国人参政権", - "望遠鏡で泳いでいる少女を見た。", - "エネルギーを素敵にENEOS", # EOS - "Canon EOS 80Dを買った", # EOS - "文書終端記号は EOD", # EOD - '"最高"の気分', # double quotes - "<tag>\\エス'ケープ", # escape - "\\エス'ケープ", # backslash - "キャリッジ\rリターン", # carriage return - "ライン\nフィード", # line feed - "CR\r\nLF", # CR+LF - ], -) -def test_apply_to_sentence(text: str) -> None: +def test_apply_to_sentence() -> None: kwja = KWJA(options=["--model-size", "tiny"]) - sent = kwja.apply_to_sentence(text) - assert sent.text == text.replace('"', "”").replace(" ", "␣").replace("\r", "").replace("\n", "") + with pytest.raises(NotImplementedError): + _ = kwja.apply_to_sentence("外国人参政権") def test_repr() -> None: From 01b506bde09410e3146fd93ed244031b1cf9d494 Mon Sep 17 00:00:00 2001 From: Hirokazu Kiyomaru Date: Thu, 17 Aug 2023 15:44:32 +0900 Subject: [PATCH 40/52] refactoring --- src/rhoknp/processors/jumanpp.py | 15 ++++----------- src/rhoknp/processors/knp.py | 25 ++++--------------------- 2 files changed, 8 insertions(+), 32 deletions(-) diff --git a/src/rhoknp/processors/jumanpp.py b/src/rhoknp/processors/jumanpp.py index 66b1acf4..83d32abd 100644 --- a/src/rhoknp/processors/jumanpp.py +++ b/src/rhoknp/processors/jumanpp.py @@ -90,17 +90,10 @@ def apply_to_document(self, document: Union[Document, str]) -> Document: self.senter = RegexSenter() document = self.senter.apply_to_document(document) - with self._lock: - jumanpp_text = "" - for sentence in document.sentences: - self._proc.stdin.write(sentence.to_raw_text()) - self._proc.stdin.flush() - while self.is_available(): - line = self._proc.stdout.readline() - jumanpp_text += line - if line.strip() == Sentence.EOS: - break - return Document.from_jumanpp(jumanpp_text) + sentences: List[Sentence] = [] + for sentence in document.sentences: + sentences.append(self.apply_to_sentence(sentence)) + return Document.from_sentences(sentences) def apply_to_sentence(self, sentence: Union[Sentence, str]) -> Sentence: """文に Jumanpp を適用する. diff --git a/src/rhoknp/processors/knp.py b/src/rhoknp/processors/knp.py index e5f98814..1dcf6e1c 100644 --- a/src/rhoknp/processors/knp.py +++ b/src/rhoknp/processors/knp.py @@ -102,27 +102,10 @@ def apply_to_document(self, document: Union[Document, str]) -> Document: logger.debug(self.senter) document = self.senter.apply_to_document(document) - if document.is_jumanpp_required() is True: - logger.debug("document needs to be processed by Juman++") - if self.jumanpp is None: - logger.info("jumanpp is not specified; use Jumanpp") - self.jumanpp = Jumanpp() - logger.debug(self.jumanpp) - document = self.jumanpp.apply_to_document(document) - - with self._lock: - knp_text = "" - for sentence in document.sentences: - self._proc.stdin.write( - sentence.to_jumanpp() if sentence.is_knp_required() is True else sentence.to_knp() - ) - self._proc.stdin.flush() - while self.is_available(): - line = self._proc.stdout.readline() - knp_text += line - if line.strip() == Sentence.EOS: - break - return Document.from_knp(knp_text) + sentences: List[Sentence] = [] + for sentence in document.sentences: + sentences.append(self.apply_to_sentence(sentence)) + return Document.from_sentences(sentences) def apply_to_sentence(self, sentence: Union[Sentence, str]) -> Sentence: """文に KNP を適用する. From eaaa6952f3ab4ce9551a2964e4d71d868781eb14 Mon Sep 17 00:00:00 2001 From: Hirokazu Kiyomaru Date: Thu, 17 Aug 2023 15:56:07 +0900 Subject: [PATCH 41/52] raise ValueError in KNP.apply_to_sentence when error is output in stderr --- src/rhoknp/processors/knp.py | 10 ++++++++++ tests/cli/test_serve.py | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/rhoknp/processors/knp.py b/src/rhoknp/processors/knp.py index 1dcf6e1c..72b0a382 100644 --- a/src/rhoknp/processors/knp.py +++ b/src/rhoknp/processors/knp.py @@ -1,4 +1,5 @@ import logging +import select import subprocess from subprocess import PIPE, Popen from threading import Lock @@ -122,6 +123,7 @@ def apply_to_sentence(self, sentence: Union[Sentence, str]) -> Sentence: assert self._proc is not None assert self._proc.stdin is not None assert self._proc.stdout is not None + assert self._proc.stderr is not None if isinstance(sentence, str): sentence = Sentence(sentence) @@ -142,6 +144,14 @@ def apply_to_sentence(self, sentence: Union[Sentence, str]) -> Sentence: knp_text += line if line.strip() == Sentence.EOS: break + + # Non-blocking read from stderr + while self._proc.stderr in select.select([self._proc.stderr], [], [], 0)[0]: + line = self._proc.stderr.readline() + if line.strip() != "": + raise ValueError(line.strip()) + else: + break return Sentence.from_knp(knp_text) def get_version(self) -> str: diff --git a/tests/cli/test_serve.py b/tests/cli/test_serve.py index 0199e462..41fde3c5 100644 --- a/tests/cli/test_serve.py +++ b/tests/cli/test_serve.py @@ -87,7 +87,6 @@ def test_analyze_knp_error_long(knp_client: TestClient) -> None: json = response.json() assert "error" in json assert json["error"]["code"] == 500 - assert json["error"]["message"] == "malformed phrase line: " @pytest.mark.skipif(not is_knp_available, reason="KNP is not available") From cf8698a5c0827b1c2b4479dbffe16eccd0462bd8 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 17:36:12 +0900 Subject: [PATCH 42/52] fix KWJA Processor so that it remains available after initialization --- src/rhoknp/processors/kwja.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rhoknp/processors/kwja.py b/src/rhoknp/processors/kwja.py index 550ff97f..a196d782 100644 --- a/src/rhoknp/processors/kwja.py +++ b/src/rhoknp/processors/kwja.py @@ -55,7 +55,8 @@ def __init__( try: self._proc = Popen(self.run_command, stdin=PIPE, stdout=PIPE, stderr=PIPE, encoding="utf-8") if skip_sanity_check is False: - _ = self.apply(Document.from_raw_text("")) + # TODO: replace "あ" with an empty string after KWJA v2.2.0 is released + _ = self.apply(Document.from_raw_text("あ")) except Exception as e: logger.warning(f"failed to start KWJA: {e}") From c982b5b0d0d793bfcad6dfd0af316d6e988119f6 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 18:14:09 +0900 Subject: [PATCH 43/52] update deps --- poetry.lock | 303 ++++++++++++++++++++++++++----------------------- pyproject.toml | 8 +- 2 files changed, 166 insertions(+), 145 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0550ce2a..e78cb8e2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -131,13 +131,13 @@ files = [ [[package]] name = "certifi" -version = "2023.5.7" +version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"}, - {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"}, + {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, + {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, ] [[package]] @@ -226,13 +226,13 @@ files = [ [[package]] name = "click" -version = "8.1.5" +version = "8.1.6" description = "Composable command line interface toolkit" optional = true python-versions = ">=3.7" files = [ - {file = "click-8.1.5-py3-none-any.whl", hash = "sha256:e576aa487d679441d7d30abb87e1b43d24fc53bffb8758443b1a9e1cee504548"}, - {file = "click-8.1.5.tar.gz", hash = "sha256:4be4b1af8d665c6d942909916d31a213a106800c47d0eeba73d34da3cbc11367"}, + {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"}, + {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"}, ] [package.dependencies] @@ -360,13 +360,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.1.2" +version = "1.1.3" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.1.2-py3-none-any.whl", hash = "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"}, - {file = "exceptiongroup-1.1.2.tar.gz", hash = "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5"}, + {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, + {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, ] [package.extras] @@ -388,17 +388,17 @@ tests = ["asttokens", "littleutils", "pytest", "rich"] [[package]] name = "fastapi" -version = "0.100.1" +version = "0.101.1" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = true python-versions = ">=3.7" files = [ - {file = "fastapi-0.100.1-py3-none-any.whl", hash = "sha256:ec6dd52bfc4eff3063cfcd0713b43c87640fefb2687bbbe3d8a08d94049cdf32"}, - {file = "fastapi-0.100.1.tar.gz", hash = "sha256:522700d7a469e4a973d92321ab93312448fbe20fca9c8da97effc7e7bc56df23"}, + {file = "fastapi-0.101.1-py3-none-any.whl", hash = "sha256:aef5f8676eb1b8389952e1fe734abe20f04b71f6936afcc53b320ba79b686a4b"}, + {file = "fastapi-0.101.1.tar.gz", hash = "sha256:7b32000d14ca9992f7461117b81e4ef9ff0c07936af641b4fe40e67d5f9d63cb"}, ] [package.dependencies] -pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<3.0.0" +pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" starlette = ">=0.27.0,<0.28.0" typing-extensions = ">=4.5.0" @@ -424,13 +424,13 @@ sphinx-basic-ng = "*" [[package]] name = "furo" -version = "2023.5.20" +version = "2023.7.26" description = "A clean customisable Sphinx documentation theme." optional = false python-versions = ">=3.7" files = [ - {file = "furo-2023.5.20-py3-none-any.whl", hash = "sha256:594a8436ddfe0c071f3a9e9a209c314a219d8341f3f1af33fdf7c69544fab9e6"}, - {file = "furo-2023.5.20.tar.gz", hash = "sha256:40e09fa17c6f4b22419d122e933089226dcdb59747b5b6c79363089827dea16f"}, + {file = "furo-2023.7.26-py3-none-any.whl", hash = "sha256:1c7936929ec57c5ddecc7c85f07fa8b2ce536b5c89137764cca508be90e11efd"}, + {file = "furo-2023.7.26.tar.gz", hash = "sha256:257f63bab97aa85213a1fa24303837a3c3f30be92901ec732fea74290800f59e"}, ] [package.dependencies] @@ -682,21 +682,21 @@ test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pa [[package]] name = "jedi" -version = "0.18.2" +version = "0.19.0" description = "An autocompletion tool for Python that can be used for text editors." optional = false python-versions = ">=3.6" files = [ - {file = "jedi-0.18.2-py2.py3-none-any.whl", hash = "sha256:203c1fd9d969ab8f2119ec0a3342e0b49910045abe6af0a3ae83a5764d54639e"}, - {file = "jedi-0.18.2.tar.gz", hash = "sha256:bae794c30d07f6d910d32a7048af09b5a39ed740918da923c6b780790ebac612"}, + {file = "jedi-0.19.0-py2.py3-none-any.whl", hash = "sha256:cb8ce23fbccff0025e9386b5cf85e892f94c9b822378f8da49970471335ac64e"}, + {file = "jedi-0.19.0.tar.gz", hash = "sha256:bcf9894f1753969cbac8022a8c2eaee06bfa3724e4192470aaffe7eb6272b0c4"}, ] [package.dependencies] -parso = ">=0.8.0,<0.9.0" +parso = ">=0.8.3,<0.9.0" [package.extras] docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alabaster (==0.7.12)", "babel (==2.9.1)", "chardet (==4.0.0)", "commonmark (==0.8.1)", "docutils (==0.17.1)", "future (==0.18.2)", "idna (==2.10)", "imagesize (==1.2.0)", "mock (==1.0.1)", "packaging (==20.9)", "pyparsing (==2.4.7)", "pytz (==2021.1)", "readthedocs-sphinx-ext (==2.1.4)", "recommonmark (==0.5.0)", "requests (==2.25.1)", "six (==1.15.0)", "snowballstemmer (==2.1.0)", "sphinx (==1.8.5)", "sphinx-rtd-theme (==0.4.3)", "sphinxcontrib-serializinghtml (==1.1.4)", "sphinxcontrib-websupport (==1.2.4)", "urllib3 (==1.26.4)"] -qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] testing = ["Django (<3.1)", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] [[package]] @@ -1050,18 +1050,18 @@ tests = ["pytest"] [[package]] name = "pydantic" -version = "2.0.3" +version = "2.1.1" description = "Data validation using Python type hints" optional = true python-versions = ">=3.7" files = [ - {file = "pydantic-2.0.3-py3-none-any.whl", hash = "sha256:614eb3321eb600c81899a88fa9858b008e3c79e0d4f1b49ab1f516b4b0c27cfb"}, - {file = "pydantic-2.0.3.tar.gz", hash = "sha256:94f13e0dcf139a5125e88283fc999788d894e14ed90cf478bcc2ee50bd4fc630"}, + {file = "pydantic-2.1.1-py3-none-any.whl", hash = "sha256:43bdbf359d6304c57afda15c2b95797295b702948082d4c23851ce752f21da70"}, + {file = "pydantic-2.1.1.tar.gz", hash = "sha256:22d63db5ce4831afd16e7c58b3192d3faf8f79154980d9397d9867254310ba4b"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.3.0" +pydantic-core = "2.4.0" typing-extensions = ">=4.6.1" [package.extras] @@ -1069,112 +1069,112 @@ email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.3.0" +version = "2.4.0" description = "" optional = true python-versions = ">=3.7" files = [ - {file = "pydantic_core-2.3.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:4542c98b8364b976593703a2dda97377433b102f380b61bc3a2cbc2fbdae1d1f"}, - {file = "pydantic_core-2.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9342de50824b40f55d2600f66c6f9a91a3a24851eca39145a749a3dc804ee599"}, - {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:539432f911686cb80284c30b33eaf9f4fd9a11e1111fe0dc98fdbdce69b49821"}, - {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38a0e7ee65c8999394d92d9c724434cb629279d19844f2b69d9bbc46dc8b8b61"}, - {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_24_armv7l.whl", hash = "sha256:e3ed6834cc005798187a56c248a2240207cb8ffdda1c89e9afda4c3d526c2ea0"}, - {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_24_ppc64le.whl", hash = "sha256:e72ac299a6bf732a60852d052acf3999d234686755a02ba111e85e7ebf8155b1"}, - {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_24_s390x.whl", hash = "sha256:616b3451b05ca63b8f433c627f68046b39543faeaa4e50d8c6699a2a1e4b85a5"}, - {file = "pydantic_core-2.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:adcb9c8848e15c613e483e0b99767ae325af27fe0dbd866df01fe5849d06e6e1"}, - {file = "pydantic_core-2.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:464bf799b422be662e5e562e62beeffc9eaa907d381a9d63a2556615bbda286d"}, - {file = "pydantic_core-2.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4638ebc17de08c2f3acba557efeb6f195c88b7299d8c55c0bb4e20638bbd4d03"}, - {file = "pydantic_core-2.3.0-cp310-none-win32.whl", hash = "sha256:9ff322c7e1030543d35d83bb521b69114d3d150750528d7757544f639def9ad6"}, - {file = "pydantic_core-2.3.0-cp310-none-win_amd64.whl", hash = "sha256:4824eb018f0a4680b1e434697a9bf3f41c7799b80076d06530cbbd212e040ccc"}, - {file = "pydantic_core-2.3.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:0aa429578e23885b3984c49d687cd05ab06f0b908ea1711a8bf7e503b7f97160"}, - {file = "pydantic_core-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:20d710c1f79af930b8891bcebd84096798e4387ab64023ef41521d58f21277d3"}, - {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:309f45d4d7481d6f09cb9e35c72caa0e50add4a30bb08c04c5fe5956a0158633"}, - {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bcfb7be905aa849bd882262e1df3f75b564e2f708b4b4c7ad2d3deaf5410562"}, - {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_24_armv7l.whl", hash = "sha256:85cd9c0af34e371390e3cb2f3a470b0b40cc07568c1e966c638c49062be6352d"}, - {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_24_ppc64le.whl", hash = "sha256:37c5028cebdf731298724070838fb3a71ef1fbd201d193d311ac2cbdbca25a23"}, - {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_24_s390x.whl", hash = "sha256:e4208f23f12d0ad206a07a489ef4cb15722c10b62774c4460ee4123250be938e"}, - {file = "pydantic_core-2.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c24465dd11b65c8510f251b095fc788c7c91481c81840112fe3f76c30793a455"}, - {file = "pydantic_core-2.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:3cd7ee8bbfab277ab56e272221886fd33a1b5943fbf45ae9195aa6a48715a8a0"}, - {file = "pydantic_core-2.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0fc7e0b056b66cc536e97ef60f48b3b289f6b3b62ac225afd4b22a42434617bf"}, - {file = "pydantic_core-2.3.0-cp311-none-win32.whl", hash = "sha256:4788135db4bd83a5edc3522b11544b013be7d25b74b155e08dd3b20cd6663bbb"}, - {file = "pydantic_core-2.3.0-cp311-none-win_amd64.whl", hash = "sha256:f93c867e5e85584a28c6a6feb6f2086d717266eb5d1210d096dd717b7f4dec04"}, - {file = "pydantic_core-2.3.0-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:73f62bb7fd862d9bcd886e10612bade6fe042eda8b47e8c129892bcfb7b45e84"}, - {file = "pydantic_core-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4d889d498fce64bfcd8adf1a78579a7f626f825cbeb2956a24a29b35f9a1df32"}, - {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7d55e38a89ec2ae17b2fa7ffeda6b70f63afab1888bd0d57aaa7b7879760acb4"}, - {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1aefebb506bc1fe355d91d25f12bcdea7f4d7c2d9f0f6716dd025543777c99a5"}, - {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_24_armv7l.whl", hash = "sha256:6441a29f42585f085db0c04cd0557d4cbbb46fa68a0972409b1cfe9f430280c1"}, - {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_24_ppc64le.whl", hash = "sha256:47e8f034be31390a8f525431eb5e803a78ce7e2e11b32abf5361a972e14e6b61"}, - {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_24_s390x.whl", hash = "sha256:ad814864aba263be9c83ada44a95f72d10caabbf91589321f95c29c902bdcff0"}, - {file = "pydantic_core-2.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9eff3837d447fccf2ac38c259b14ab9cbde700df355a45a1f3ff244d5e78f8b6"}, - {file = "pydantic_core-2.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:534f3f63c000f08050c6f7f4378bf2b52d7ba9214e9d35e3f60f7ad24a4d6425"}, - {file = "pydantic_core-2.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ef6a222d54f742c24f6b143aab088702db3a827b224e75b9dd28b38597c595fe"}, - {file = "pydantic_core-2.3.0-cp312-none-win32.whl", hash = "sha256:4e26944e64ecc1d7b19db954c0f7b471f3b141ec8e1a9f57cfe27671525cd248"}, - {file = "pydantic_core-2.3.0-cp312-none-win_amd64.whl", hash = "sha256:019c5c41941438570dfc7d3f0ae389b2425add1775a357ce1e83ed1434f943d6"}, - {file = "pydantic_core-2.3.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:27c1bbfb9d84a75cf33b7f19b53c29eb7ead99b235fce52aced5507174ab8f98"}, - {file = "pydantic_core-2.3.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:7cb496e934b71f1ade844ab91d6ccac78a3520e5df02fdb2357f85a71e541e69"}, - {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5af2d43b1978958d91351afbcc9b4d0cfe144c46c61740e82aaac8bb39ab1a4d"}, - {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d3097c39d7d4e8dba2ef86de171dcccad876c36d8379415ba18a5a4d0533510"}, - {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_24_armv7l.whl", hash = "sha256:dd3b023f3317dbbbc775e43651ce1a31a9cea46216ad0b5be37afc18a2007699"}, - {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_24_ppc64le.whl", hash = "sha256:27babb9879bf2c45ed655d02639f4c30e2b9ef1b71ce59c2305bbf7287910a18"}, - {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_24_s390x.whl", hash = "sha256:2183a9e18cdc0de53bdaa1675f237259162abeb62d6ac9e527c359c1074dc55d"}, - {file = "pydantic_core-2.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c089d8e7f1b4db08b2f8e4107304eec338df046275dad432635a9be9531e2fc8"}, - {file = "pydantic_core-2.3.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:2f10aa5452b865818dd0137f568d443f5e93b60a27080a01aa4b7512c7ba13a3"}, - {file = "pydantic_core-2.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:f642313d559f9d9a00c4de6820124059cc3342a0d0127b18301de2c680d5ea40"}, - {file = "pydantic_core-2.3.0-cp37-none-win32.whl", hash = "sha256:45327fc57afbe3f2c3d7f54a335d5cecee8a9fdb3906a2fbed8af4092f4926df"}, - {file = "pydantic_core-2.3.0-cp37-none-win_amd64.whl", hash = "sha256:e427b66596a6441a5607dfc0085b47d36073f88da7ac48afd284263b9b99e6ce"}, - {file = "pydantic_core-2.3.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:0b3d781c71b8bfb621ef23b9c874933e2cd33237c1a65cc20eeb37437f8e7e18"}, - {file = "pydantic_core-2.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ad46027dbd5c1db87dc0b49becbe23093b143a20302028d387dae37ee5ef95f5"}, - {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39aa09ed7ce2a648c904f79032d16dda29e6913112af8465a7bf710eef23c7ca"}, - {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05b4bf8c58409586a7a04c858a86ab10f28c6c1a7c33da65e0326c59d5b0ab16"}, - {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_24_armv7l.whl", hash = "sha256:ba2b807d2b62c446120906b8580cddae1d76d3de4efbb95ccc87f5e35c75b4b2"}, - {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_24_ppc64le.whl", hash = "sha256:ea955e4ed21f4bbb9b83fea09fc6af0bed82e69ecf6b35ec89237a0a49633033"}, - {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_24_s390x.whl", hash = "sha256:06884c07956526ac9ebfef40fe21a11605569b8fc0e2054a375fb39c978bf48f"}, - {file = "pydantic_core-2.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f868e731a18b403b88aa434d960489ceeed0ddeb44ebc02389540731a67705e0"}, - {file = "pydantic_core-2.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cb08fab0fc1db15c277b72e33ac74ad9c0c789413da8984a3eacb22a94b42ef4"}, - {file = "pydantic_core-2.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6ca34c29fbd6592de5fd39e80c1993634d704c4e7e14ba54c87b2c7c53da68fe"}, - {file = "pydantic_core-2.3.0-cp38-none-win32.whl", hash = "sha256:cd782807d35c8a41aaa7d30b5107784420eefd9fdc1c760d86007d43ae00b15d"}, - {file = "pydantic_core-2.3.0-cp38-none-win_amd64.whl", hash = "sha256:01f56d5ee70b1d39c0fd08372cc5142274070ab7181d17c86035f130eebc05b8"}, - {file = "pydantic_core-2.3.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:78b1ac0151271ce62bc2b33755f1043eda6a310373143a2f27e2bcd3d5fc8633"}, - {file = "pydantic_core-2.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:64bfd2c35a2c350f73ac52dc134d8775f93359c4c969280a6fe5301b5b6e7431"}, - {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:937c0fe9538f1212b62df6a68f8d78df3572fe3682d9a0dd8851eac8a4e46063"}, - {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d965c7c4b40d1cedec9188782e98bd576f9a04868835604200c3a6e817b824f"}, - {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_24_armv7l.whl", hash = "sha256:ad442b8585ed4a3c2d22e4bf7b465d9b7d281e055b09719a8aeb5b576422dc9b"}, - {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_24_ppc64le.whl", hash = "sha256:4bf20c9722821fce766e685718e739deeccc60d6bc7be5029281db41f999ee0c"}, - {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_24_s390x.whl", hash = "sha256:f3dd5333049b5b3faa739e0f40b77cc8b7a1aded2f2da0e28794c81586d7b08a"}, - {file = "pydantic_core-2.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dc5f516b24d24bc9e8dd9305460899f38302b3c4f9752663b396ef9848557bf"}, - {file = "pydantic_core-2.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:055f7ea6b1fbb37880d66d70eefd22dd319b09c79d2cb99b1dbfeb34b653b0b2"}, - {file = "pydantic_core-2.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:af693a89db6d6ac97dd84dd7769b3f2bd9007b578127d0e7dda03053f4d3b34b"}, - {file = "pydantic_core-2.3.0-cp39-none-win32.whl", hash = "sha256:f60e31e3e15e8c294bf70c60f8ae4d0c3caf3af8f26466e9aa8ea4c01302749b"}, - {file = "pydantic_core-2.3.0-cp39-none-win_amd64.whl", hash = "sha256:2b79f3681481f4424d7845cc7a261d5a4baa810d656b631fa844dc9967b36a7b"}, - {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:a666134b41712e30a71afaa26deeb4da374179f769fa49784cdf0e7698880fab"}, - {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c119e9227487ad3d7c3c737d896afe548a6be554091f9745da1f4b489c40561"}, - {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73929a2fb600a2333fce2efd92596cff5e6bf8946e20e93c067b220760064862"}, - {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:41bbc2678a5b6a19371b2cb51f30ccea71f0c14b26477d2d884fed761cea42c7"}, - {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:dcbff997f47d45bf028bda4c3036bb3101e89a3df271281d392b6175f71c71d1"}, - {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:afa8808159169368b66e4fbeafac6c6fd8f26246dc4d0dcc2caf94bd9cf1b828"}, - {file = "pydantic_core-2.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:12be3b5f54f8111ca38e6b7277f26c23ba5cb3344fae06f879a0a93dfc8b479e"}, - {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:ed5babdcd3d052ba5cf8832561f18df20778c7ccf12587b2d82f7bf3bf259a0e"}, - {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d642e5c029e2acfacf6aa0a7a3e822086b3b777c70d364742561f9ca64c1ffc"}, - {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ba3073eb38a1294e8c7902989fb80a7a147a69db2396818722bd078476586a0"}, - {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d5146a6749b1905e04e62e0ad4622f079e5582f8b3abef5fb64516c623127908"}, - {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:deeb64335f489c3c11949cbd1d1668b3f1fb2d1c6a5bf40e126ef7bf95f9fa40"}, - {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:31acc37288b8e69e4849f618c3d5cf13b58077c1a1ff9ade0b3065ba974cd385"}, - {file = "pydantic_core-2.3.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:e09d9f6d722de9d4c1c5f122ea9bc6b25a05f975457805af4dcab7b0128aacbf"}, - {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:ba6a8cf089222a171b8f84e6ec2d10f7a9d14f26be3a347b14775a8741810676"}, - {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef1fd1b24e9bcddcb168437686677104e205c8e25b066e73ffdf331d3bb8792b"}, - {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eda1a89c4526826c0a87d33596a4cd15b8f58e9250f503e39af1699ba9c878e8"}, - {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a3e9a18401a28db4358da2e191508702dbf065f2664c710708cdf9552b9fa50c"}, - {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:a439fd0d45d51245bbde799726adda5bd18aed3fa2b01ab2e6a64d6d13776fa3"}, - {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:bf6a1d2c920cc9528e884850a4b2ee7629e3d362d5c44c66526d4097bbb07a1a"}, - {file = "pydantic_core-2.3.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e33fcbea3b63a339dd94de0fc442fefacfe681cc7027ce63f67af9f7ceec7422"}, - {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:bf3ed993bdf4754909f175ff348cf8f78d4451215b8aa338633f149ca3b1f37a"}, - {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7584171eb3115acd4aba699bc836634783f5bd5aab131e88d8eeb8a3328a4a72"}, - {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1624baa76d1740711b2048f302ae9a6d73d277c55a8c3e88b53b773ebf73a971"}, - {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:06f33f695527f5a86e090f208978f9fd252c9cfc7e869d3b679bd71f7cb2c1fa"}, - {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7ecf0a67b212900e92f328181fed02840d74ed39553cdb38d27314e2b9c89dfa"}, - {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:45fa1e8ad6f4367ad73674ca560da8e827cc890eaf371f3ee063d6d7366a207b"}, - {file = "pydantic_core-2.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:8d0dbcc57839831ae79fd24b1b83d42bc9448d79feaf3ed3fb5cbf94ffbf3eb7"}, - {file = "pydantic_core-2.3.0.tar.gz", hash = "sha256:5cfb5ac4e82c47d5dc25b209dd4c3989e284b80109f9e08b33c895080c424b4f"}, + {file = "pydantic_core-2.4.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:2ca4687dd996bde7f3c420def450797feeb20dcee2b9687023e3323c73fc14a2"}, + {file = "pydantic_core-2.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:782fced7d61469fd1231b184a80e4f2fa7ad54cd7173834651a453f96f29d673"}, + {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6213b471b68146af97b8551294e59e7392c2117e28ffad9c557c65087f4baee3"}, + {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63797499a219d8e81eb4e0c42222d0a4c8ec896f5c76751d4258af95de41fdf1"}, + {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_24_armv7l.whl", hash = "sha256:0455876d575a35defc4da7e0a199596d6c773e20d3d42fa1fc29f6aa640369ed"}, + {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_24_ppc64le.whl", hash = "sha256:8c938c96294d983dcf419b54dba2d21056959c22911d41788efbf949a29ae30d"}, + {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_24_s390x.whl", hash = "sha256:878a5017d93e776c379af4e7b20f173c82594d94fa073059bcc546789ad50bf8"}, + {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:69159afc2f2dc43285725f16143bc5df3c853bc1cb7df6021fce7ef1c69e8171"}, + {file = "pydantic_core-2.4.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:54df7df399b777c1fd144f541c95d351b3aa110535a6810a6a569905d106b6f3"}, + {file = "pydantic_core-2.4.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e412607ca89a0ced10758dfb8f9adcc365ce4c1c377e637c01989a75e9a9ec8a"}, + {file = "pydantic_core-2.4.0-cp310-none-win32.whl", hash = "sha256:853f103e2b9a58832fdd08a587a51de8b552ae90e1a5d167f316b7eabf8d7dde"}, + {file = "pydantic_core-2.4.0-cp310-none-win_amd64.whl", hash = "sha256:3ba2c9c94a9176f6321a879c8b864d7c5b12d34f549a4c216c72ce213d7d953c"}, + {file = "pydantic_core-2.4.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:a8b7acd04896e8f161e1500dc5f218017db05c1d322f054e89cbd089ce5d0071"}, + {file = "pydantic_core-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:16468bd074fa4567592d3255bf25528ed41e6b616d69bf07096bdb5b66f947d1"}, + {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cba5ad5eef02c86a1f3da00544cbc59a510d596b27566479a7cd4d91c6187a11"}, + {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b7206e41e04b443016e930e01685bab7a308113c0b251b3f906942c8d4b48fcb"}, + {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_24_armv7l.whl", hash = "sha256:c1375025f0bfc9155286ebae8eecc65e33e494c90025cda69e247c3ccd2bab00"}, + {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_24_ppc64le.whl", hash = "sha256:3534118289e33130ed3f1cc487002e8d09b9f359be48b02e9cd3de58ce58fba9"}, + {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_24_s390x.whl", hash = "sha256:94d2b36a74623caab262bf95f0e365c2c058396082bd9d6a9e825657d0c1e7fa"}, + {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:af24ad4fbaa5e4a2000beae0c3b7fd1c78d7819ab90f9370a1cfd8998e3f8a3c"}, + {file = "pydantic_core-2.4.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bf10963d8aed8bbe0165b41797c9463d4c5c8788ae6a77c68427569be6bead41"}, + {file = "pydantic_core-2.4.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:68199ada7c310ddb8c76efbb606a0de656b40899388a7498954f423e03fc38be"}, + {file = "pydantic_core-2.4.0-cp311-none-win32.whl", hash = "sha256:6f855bcc96ed3dd56da7373cfcc9dcbabbc2073cac7f65c185772d08884790ce"}, + {file = "pydantic_core-2.4.0-cp311-none-win_amd64.whl", hash = "sha256:de39eb3bab93a99ddda1ac1b9aa331b944d8bcc4aa9141148f7fd8ee0299dafc"}, + {file = "pydantic_core-2.4.0-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:f773b39780323a0499b53ebd91a28ad11cde6705605d98d999dfa08624caf064"}, + {file = "pydantic_core-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a297c0d6c61963c5c3726840677b798ca5b7dfc71bc9c02b9a4af11d23236008"}, + {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:546064c55264156b973b5e65e5fafbe5e62390902ce3cf6b4005765505e8ff56"}, + {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36ba9e728588588f0196deaf6751b9222492331b5552f865a8ff120869d372e0"}, + {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_24_armv7l.whl", hash = "sha256:57a53a75010c635b3ad6499e7721eaa3b450e03f6862afe2dbef9c8f66e46ec8"}, + {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_24_ppc64le.whl", hash = "sha256:4b262bbc13022f2097c48a21adcc360a81d83dc1d854c11b94953cd46d7d3c07"}, + {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_24_s390x.whl", hash = "sha256:01947ad728f426fa07fcb26457ebf90ce29320259938414bc0edd1476e75addb"}, + {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b2799c2eaf182769889761d4fb4d78b82bc47dae833799fedbf69fc7de306faa"}, + {file = "pydantic_core-2.4.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:a08fd490ba36d1fbb2cd5dcdcfb9f3892deb93bd53456724389135712b5fc735"}, + {file = "pydantic_core-2.4.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:1e8a7c62d15a5c4b307271e4252d76ebb981d6251c6ecea4daf203ef0179ea4f"}, + {file = "pydantic_core-2.4.0-cp312-none-win32.whl", hash = "sha256:9206c14a67c38de7b916e486ae280017cf394fa4b1aa95cfe88621a4e1d79725"}, + {file = "pydantic_core-2.4.0-cp312-none-win_amd64.whl", hash = "sha256:884235507549a6b2d3c4113fb1877ae263109e787d9e0eb25c35982ab28d0399"}, + {file = "pydantic_core-2.4.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:4cbe929efa77a806e8f1a97793f2dc3ea3475ae21a9ed0f37c21320fe93f6f50"}, + {file = "pydantic_core-2.4.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:9137289de8fe845c246a8c3482dd0cb40338846ba683756d8f489a4bd8fddcae"}, + {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5d8e764b5646623e57575f624f8ebb8f7a9f7fd1fae682ef87869ca5fec8dcf"}, + {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8fba0aff4c407d0274e43697e785bcac155ad962be57518d1c711f45e72da70f"}, + {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_24_armv7l.whl", hash = "sha256:30527d173e826f2f7651f91c821e337073df1555e3b5a0b7b1e2c39e26e50678"}, + {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_24_ppc64le.whl", hash = "sha256:bd7d1dde70ff3e09e4bc7a1cbb91a7a538add291bfd5b3e70ef1e7b45192440f"}, + {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_24_s390x.whl", hash = "sha256:72f1216ca8cef7b8adacd4c4c6b89c3b0c4f97503197f5284c80f36d6e4edd30"}, + {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b013c7861a7c7bfcec48fd709513fea6f9f31727e7a0a93ca0dd12e056740717"}, + {file = "pydantic_core-2.4.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:478f5f6d7e32bd4a04d102160efb2d389432ecf095fe87c555c0a6fc4adfc1a4"}, + {file = "pydantic_core-2.4.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d9610b47b5fe4aacbbba6a9cb5f12cbe864eec99dbfed5710bd32ef5dd8a5d5b"}, + {file = "pydantic_core-2.4.0-cp37-none-win32.whl", hash = "sha256:ff246c0111076c8022f9ba325c294f2cb5983403506989253e04dbae565e019b"}, + {file = "pydantic_core-2.4.0-cp37-none-win_amd64.whl", hash = "sha256:d0c2b713464a8e263a243ae7980d81ce2de5ac59a9f798a282e44350b42dc516"}, + {file = "pydantic_core-2.4.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:12ef6838245569fd60a179fade81ca4b90ae2fa0ef355d616f519f7bb27582db"}, + {file = "pydantic_core-2.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49db206eb8fdc4b4f30e6e3e410584146d813c151928f94ec0db06c4f2595538"}, + {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a507d7fa44688bbac76af6521e488b3da93de155b9cba6f2c9b7833ce243d59"}, + {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffe18407a4d000c568182ce5388bbbedeb099896904e43fc14eee76cfae6dec5"}, + {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_24_armv7l.whl", hash = "sha256:fa8e48001b39d54d97d7b380a0669fa99fc0feeb972e35a2d677ba59164a9a22"}, + {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_24_ppc64le.whl", hash = "sha256:394f12a2671ff8c4dfa2e85be6c08be0651ad85bc1e6aa9c77c21671baaf28cd"}, + {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_24_s390x.whl", hash = "sha256:2f9ea0355f90db2a76af530245fa42f04d98f752a1236ed7c6809ec484560d5b"}, + {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:61d4e713f467abcdd59b47665d488bb898ad3dd47ce7446522a50e0cbd8e8279"}, + {file = "pydantic_core-2.4.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:453862ab268f6326b01f067ed89cb3a527d34dc46f6f4eeec46a15bbc706d0da"}, + {file = "pydantic_core-2.4.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:56a85fa0dab1567bd0cac10f0c3837b03e8a0d939e6a8061a3a420acd97e9421"}, + {file = "pydantic_core-2.4.0-cp38-none-win32.whl", hash = "sha256:0d726108c1c0380b88b6dd4db559f0280e0ceda9e077f46ff90bc85cd4d03e77"}, + {file = "pydantic_core-2.4.0-cp38-none-win_amd64.whl", hash = "sha256:047580388644c473b934d27849f8ed8dbe45df0adb72104e78b543e13bf69762"}, + {file = "pydantic_core-2.4.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:867d3eea954bea807cabba83cfc939c889a18576d66d197c60025b15269d7cc0"}, + {file = "pydantic_core-2.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:664402ef0c238a7f8a46efb101789d5f2275600fb18114446efec83cfadb5b66"}, + {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64e8012ad60a5f0da09ed48725e6e923d1be25f2f091a640af6079f874663813"}, + {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac2b680de398f293b68183317432b3d67ab3faeba216aec18de0c395cb5e3060"}, + {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_24_armv7l.whl", hash = "sha256:8efc1be43b036c2b6bcfb1451df24ee0ddcf69c31351003daf2699ed93f5687b"}, + {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_24_ppc64le.whl", hash = "sha256:d93aedbc4614cc21b9ab0d0c4ccd7143354c1f7cffbbe96ae5216ad21d1b21b5"}, + {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_24_s390x.whl", hash = "sha256:af788b64e13d52fc3600a68b16d31fa8d8573e3ff2fc9a38f8a60b8d94d1f012"}, + {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:97c6349c81cee2e69ef59eba6e6c08c5936e6b01c2d50b9e4ac152217845ae09"}, + {file = "pydantic_core-2.4.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:cc086ddb6dc654a15deeed1d1f2bcb1cb924ebd70df9dca738af19f64229b06c"}, + {file = "pydantic_core-2.4.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e953353180bec330c3b830891d260b6f8e576e2d18db3c78d314e56bb2276066"}, + {file = "pydantic_core-2.4.0-cp39-none-win32.whl", hash = "sha256:6feb4b64d11d5420e517910d60a907d08d846cacaf4e029668725cd21d16743c"}, + {file = "pydantic_core-2.4.0-cp39-none-win_amd64.whl", hash = "sha256:153a61ac4030fa019b70b31fb7986461119230d3ba0ab661c757cfea652f4332"}, + {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:3fcf529382b282a30b466bd7af05be28e22aa620e016135ac414f14e1ee6b9e1"}, + {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2edef05b63d82568b877002dc4cb5cc18f8929b59077120192df1e03e0c633f8"}, + {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da055a1b0bfa8041bb2ff586b2cb0353ed03944a3472186a02cc44a557a0e661"}, + {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:77dadc764cf7c5405e04866181c5bd94a447372a9763e473abb63d1dfe9b7387"}, + {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:a4ea23b07f29487a7bef2a869f68c7ee0e05424d81375ce3d3de829314c6b5ec"}, + {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:382f0baa044d674ad59455a5eff83d7965572b745cc72df35c52c2ce8c731d37"}, + {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:08f89697625e453421401c7f661b9d1eb4c9e4c0a12fd256eeb55b06994ac6af"}, + {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:43a405ce520b45941df9ff55d0cd09762017756a7b413bbad3a6e8178e64a2c2"}, + {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:584a7a818c84767af16ce8bda5d4f7fedb37d3d231fc89928a192f567e4ef685"}, + {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:04922fea7b13cd480586fa106345fe06e43220b8327358873c22d8dfa7a711c7"}, + {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:17156abac20a9feed10feec867fddd91a80819a485b0107fe61f09f2117fe5f3"}, + {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:4e562cc63b04636cde361fd47569162f1daa94c759220ff202a8129902229114"}, + {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:90f3785146f701e053bb6b9e8f53acce2c919aca91df88bd4975be0cb926eb41"}, + {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:e40b1e97edd3dc127aa53d8a5e539a3d0c227d71574d3f9ac1af02d58218a122"}, + {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:b27f3e67f6e031f6620655741b7d0d6bebea8b25d415924b3e8bfef2dd7bd841"}, + {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be86c2eb12fb0f846262ace9d8f032dc6978b8cb26a058920ecb723dbcb87d05"}, + {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4665f7ed345012a8d2eddf4203ef145f5f56a291d010382d235b94e91813f88a"}, + {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:79262be5a292d1df060f29b9a7cdd66934801f987a817632d7552534a172709a"}, + {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:5fd905a69ac74eaba5041e21a1e8b1a479dab2b41c93bdcc4c1cede3c12a8d86"}, + {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:2ad538b7e07343001934417cdc8584623b4d8823c5b8b258e75ec8d327cec969"}, + {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:dd2429f7635ad4857b5881503f9c310be7761dc681c467a9d27787b674d1250a"}, + {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:efff8b6761a1f6e45cebd1b7a6406eb2723d2d5710ff0d1b624fe11313693989"}, + {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:32a1e0352558cd7ccc014ffe818c7d87b15ec6145875e2cc5fa4bb7351a1033d"}, + {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a027f41c5008571314861744d83aff75a34cf3a07022e0be32b214a5bc93f7f1"}, + {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1927f0e15d190f11f0b8344373731e28fd774c6d676d8a6cfadc95c77214a48b"}, + {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7aa82d483d5fb867d4fb10a138ffd57b0f1644e99f2f4f336e48790ada9ada5e"}, + {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b85778308bf945e9b33ac604e6793df9b07933108d20bdf53811bc7c2798a4af"}, + {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:3ded19dcaefe2f6706d81e0db787b59095f4ad0fbadce1edffdf092294c8a23f"}, + {file = "pydantic_core-2.4.0.tar.gz", hash = "sha256:ec3473c9789cc00c7260d840c3db2c16dbfc816ca70ec87a00cddfa3e1a1cdd5"}, ] [package.dependencies] @@ -1182,13 +1182,13 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pygments" -version = "2.15.1" +version = "2.16.1" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.7" files = [ - {file = "Pygments-2.15.1-py3-none-any.whl", hash = "sha256:db2db3deb4b4179f399a09054b023b6a586b76499d36965813c71aa8ed7b5fd1"}, - {file = "Pygments-2.15.1.tar.gz", hash = "sha256:8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c"}, + {file = "Pygments-2.16.1-py3-none-any.whl", hash = "sha256:13fc09fa63bc8d8671a6d247e1eb303c4b343eaee81d861f3404db2935653692"}, + {file = "Pygments-2.16.1.tar.gz", hash = "sha256:1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29"}, ] [package.extras] @@ -1318,13 +1318,13 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "rich" -version = "13.5.0" +version = "13.5.2" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = true python-versions = ">=3.7.0" files = [ - {file = "rich-13.5.0-py3-none-any.whl", hash = "sha256:996670a7618ccce27c55ba6fc0142e6e343773e11d34c96566a17b71b0e6f179"}, - {file = "rich-13.5.0.tar.gz", hash = "sha256:62c81e88dc078d2372858660e3d5566746870133e51321f852ccc20af5c7e7b2"}, + {file = "rich-13.5.2-py3-none-any.whl", hash = "sha256:146a90b3b6b47cac4a73c12866a499e9817426423f57c5a66949c086191a8808"}, + {file = "rich-13.5.2.tar.gz", hash = "sha256:fb9d6c0a0f643c99eed3875b5377a184132ba9be4d61516a55273d3554d75a39"}, ] [package.dependencies] @@ -1432,13 +1432,13 @@ test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"] [[package]] name = "sphinx" -version = "7.0.1" +version = "7.1.2" description = "Python documentation generator" optional = false python-versions = ">=3.8" files = [ - {file = "Sphinx-7.0.1.tar.gz", hash = "sha256:61e025f788c5977d9412587e733733a289e2b9fdc2fef8868ddfbfc4ccfe881d"}, - {file = "sphinx-7.0.1-py3-none-any.whl", hash = "sha256:60c5e04756c1709a98845ed27a2eed7a556af3993afb66e77fec48189f742616"}, + {file = "sphinx-7.1.2-py3-none-any.whl", hash = "sha256:d170a81825b2fcacb6dfd5a0d7f578a053e45d3f2b153fecc948c37344eb4cbe"}, + {file = "sphinx-7.1.2.tar.gz", hash = "sha256:780f4d32f1d7d1126576e0e5ecc19dc32ab76cd24e950228dcf7b1f6d3d9e22f"}, ] [package.dependencies] @@ -1514,6 +1514,22 @@ files = [ pygments = "*" Sphinx = "*" +[[package]] +name = "sphinx-prompt" +version = "1.7.0" +description = "Sphinx directive to add unselectable prompt" +optional = false +python-versions = ">=3.8,<3.11" +files = [ + {file = "sphinx_prompt-1.7.0-py3-none-any.whl", hash = "sha256:7ee415d07f90f7ce1577a2c4c7f2560694af008926a69b4c940f20737621b089"}, + {file = "sphinx_prompt-1.7.0.tar.gz", hash = "sha256:f95c0b44d73621fc0b493f84b0c2866eb8741140ef0260c20a0f7578457f44ad"}, +] + +[package.dependencies] +docutils = "*" +pygments = "*" +Sphinx = ">=7.0.0,<8.0.0" + [[package]] name = "sphinxcontrib-applehelp" version = "1.0.2" @@ -1750,13 +1766,13 @@ files = [ [[package]] name = "urllib3" -version = "2.0.3" +version = "2.0.4" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.7" files = [ - {file = "urllib3-2.0.3-py3-none-any.whl", hash = "sha256:48e7fafa40319d358848e1bc6809b208340fafe2096f1725d05d67443d0483d1"}, - {file = "urllib3-2.0.3.tar.gz", hash = "sha256:bee28b5e56addb8226c96f7f13ac28cb4c301dd5ea8a6ca179c0b9835e032825"}, + {file = "urllib3-2.0.4-py3-none-any.whl", hash = "sha256:de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4"}, + {file = "urllib3-2.0.4.tar.gz", hash = "sha256:8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11"}, ] [package.extras] @@ -1786,18 +1802,19 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", [[package]] name = "uvicorn" -version = "0.23.0" +version = "0.23.2" description = "The lightning-fast ASGI server." optional = true python-versions = ">=3.8" files = [ - {file = "uvicorn-0.23.0-py3-none-any.whl", hash = "sha256:479599b2c0bb1b9b394c6d43901a1eb0c1ec72c7d237b5bafea23c5b2d4cdf10"}, - {file = "uvicorn-0.23.0.tar.gz", hash = "sha256:d38ab90c0e2c6fe3a054cddeb962cfd5d0e0e6608eaaff4a01d5c36a67f3168c"}, + {file = "uvicorn-0.23.2-py3-none-any.whl", hash = "sha256:1f9be6558f01239d4fdf22ef8126c39cb1ad0addf76c40e760549d2c2f43ab53"}, + {file = "uvicorn-0.23.2.tar.gz", hash = "sha256:4d3cc12d7727ba72b64d12d3cc7743124074c0a69f7b201512fc50c3e3f1569a"}, ] [package.dependencies] click = ">=7.0" h11 = ">=0.8" +typing-extensions = {version = ">=4.0", markers = "python_version < \"3.11\""} [package.extras] standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] @@ -1834,4 +1851,4 @@ cli = ["PyYAML", "fastapi", "jinja2", "rich", "typer", "typer", "uvicorn", "uvic [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "ba66cceae08bdb6f01f94cfbccdcbb46ed395f913726909e5489e24185b89c60" +content-hash = "c8213eb2b18985210625a51728ecce6e3dcfed586989e8787a0090d365acf2a0" diff --git a/pyproject.toml b/pyproject.toml index 35f9492a..bcc173f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ keywords = ["NLP"] [tool.poetry.dependencies] python = "^3.7" cached-property = { version = "^1.5", python = "<3.8" } -importlib-metadata = { version = ">=5.2", python = "<3.8" } +importlib-metadata = { version = ">=5.2,<6.8", python = "<3.8" } typer = [ { version = ">=0.7,<0.9", python = "<3.8", optional = true }, { version = ">=0.7", python = ">=3.8", optional = true }, @@ -47,7 +47,11 @@ Sphinx = [ { version = "^5.3", python = "<3.8" }, { version = "^7.0", python = ">=3.8" }, ] -sphinx-prompt = "^1.5" +# sphinx-prompt 1.7.0 requires python < 3.11, which will be fixed in the next version +sphinx-prompt = [ + { version = "~1.5.0", python = "<3.8" }, + { version = "^1.6", python = ">=3.8,<3.11" }, +] sphinx-copybutton = "^0.5.0" myst-parser = [ { version = "^1.0", python = "<3.8" }, From 1ceb9b330ce1ad8136ff11fc902b29e276ee893b Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 18:15:43 +0900 Subject: [PATCH 44/52] update pre-commit hooks --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1a389b77..174d7bbd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,11 +9,11 @@ repos: - id: check-toml - id: check-added-large-files - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 - repo: https://github.com/PyCQA/isort @@ -25,7 +25,7 @@ repos: hooks: - id: absolufy-imports - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.4.0 + rev: v1.5.1 hooks: - id: mypy additional_dependencies: @@ -36,7 +36,7 @@ repos: - fastapi - markdown-it-py==2.2.0 # markdown-it-py 3.0.0 requires Python 3.8+ - repo: https://github.com/asottile/pyupgrade - rev: v3.7.0 + rev: v3.10.1 hooks: - id: pyupgrade args: @@ -46,11 +46,11 @@ repos: hooks: - id: pydocstyle - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.9-for-vscode + rev: v3.0.2 hooks: - id: prettier - repo: https://github.com/Riverside-Healthcare/djLint - rev: v1.31.0 + rev: v1.32.1 hooks: - id: djlint-jinja - id: djlint-reformat-jinja From 8683ab460f1551b089e5383b6a9e3c0173accf12 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 18:17:51 +0900 Subject: [PATCH 45/52] tweak --- .../cli/templates/components/morphological_analysis.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rhoknp/cli/templates/components/morphological_analysis.jinja2 b/src/rhoknp/cli/templates/components/morphological_analysis.jinja2 index 8e139822..cefc8056 100644 --- a/src/rhoknp/cli/templates/components/morphological_analysis.jinja2 +++ b/src/rhoknp/cli/templates/components/morphological_analysis.jinja2 @@ -35,7 +35,7 @@ {{ morpheme.subpos }} {{ morpheme.conjtype }} {{ morpheme.conjform }} - {{ morpheme.semantics.to_sstring() .strip('"') }} + {{ morpheme.semantics.to_sstring().strip('"') }} {% endfor %} From 6a1a54e1a256355b85973c7dc9d004fe2c2d7dd8 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 18:22:44 +0900 Subject: [PATCH 46/52] unify flake8 config into pyproject.toml --- .flake8 | 2 -- .pre-commit-config.yaml | 1 + pyproject.toml | 9 +++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index cfb0df10..00000000 --- a/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -extend-ignore = E203,E501 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 174d7bbd..e5378b18 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,7 @@ repos: rev: 6.1.0 hooks: - id: flake8 + additional_dependencies: [Flake8-pyproject] - repo: https://github.com/PyCQA/isort rev: 5.12.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index bcc173f8..71afd7a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,15 @@ target-version = ["py37", "py38", "py39", "py310", "py311"] [tool.isort] line_length = 120 +py_version = 39 +profile = "black" + +[tool.flake8] +# E203 is not PEP8 compliant and black insert space around slice (https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated) +# E501: Line too long. Disable it to allow long lines of comments and print lines which black allows. +# W503: line break before binary operator (https://www.flake8rules.com/rules/W503.html) +ignore = ["E203", "E501", "W503"] +max-line-length = 120 [tool.mypy] python_version = 3.7 From 43a38b123c20c83035e8295dba0c4f46b977a1bb Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 19:40:23 +0900 Subject: [PATCH 47/52] refactor --- src/rhoknp/processors/kwja.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/rhoknp/processors/kwja.py b/src/rhoknp/processors/kwja.py index a196d782..bbcbdd1f 100644 --- a/src/rhoknp/processors/kwja.py +++ b/src/rhoknp/processors/kwja.py @@ -113,14 +113,10 @@ def apply_to_document(self, document: Union[Document, str]) -> Document: if line.strip() == "": continue if is_comment_line(line) and sentence_lines: - sentences.append( - self._create_sentence_from_words_format("\n".join(sentence_lines) + "\n", post_init=False) - ) + sentences.append(self._create_sentence_from_words_format("\n".join(sentence_lines) + "\n")) sentence_lines = [] sentence_lines.append(line) - sentences.append( - self._create_sentence_from_words_format("\n".join(sentence_lines) + "\n", post_init=False) - ) + sentences.append(self._create_sentence_from_words_format("\n".join(sentence_lines) + "\n")) document.sentences = sentences document.__post_init__() return document @@ -137,7 +133,7 @@ def apply_to_sentence(self, sentence: Union[Sentence, str]) -> Sentence: raise NotImplementedError("KWJA does not support apply_to_sentence() currently.") @staticmethod - def _create_sentence_from_words_format(text: str, post_init: bool = True) -> Sentence: + def _create_sentence_from_words_format(text: str) -> Sentence: sentence = Sentence() morphemes: List[Morpheme] = [] for line in text.split("\n"): @@ -164,8 +160,6 @@ def _create_sentence_from_words_format(text: str, post_init: bool = True) -> Sen for word in words ] sentence.morphemes = morphemes - if post_init is True: - sentence.__post_init__() return sentence def get_version(self) -> str: From a0961ad6143fce54f78988395340692a0a1cf181 Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 19:44:12 +0900 Subject: [PATCH 48/52] fix KNP Processor so that it reads all lines of stderr --- src/rhoknp/processors/knp.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/rhoknp/processors/knp.py b/src/rhoknp/processors/knp.py index 72b0a382..27f6ae47 100644 --- a/src/rhoknp/processors/knp.py +++ b/src/rhoknp/processors/knp.py @@ -138,21 +138,20 @@ def apply_to_sentence(self, sentence: Union[Sentence, str]) -> Sentence: with self._lock: self._proc.stdin.write(sentence.to_jumanpp() if sentence.is_knp_required() is True else sentence.to_knp()) self._proc.stdin.flush() - knp_text = "" + stdout_text = "" while self.is_available(): line = self._proc.stdout.readline() - knp_text += line + stdout_text += line if line.strip() == Sentence.EOS: break # Non-blocking read from stderr + stderr_text = "" while self._proc.stderr in select.select([self._proc.stderr], [], [], 0)[0]: - line = self._proc.stderr.readline() - if line.strip() != "": - raise ValueError(line.strip()) - else: - break - return Sentence.from_knp(knp_text) + stderr_text += self._proc.stderr.readline() + if stderr_text.strip() != "": + raise ValueError(line.strip()) + return Sentence.from_knp(stdout_text) def get_version(self) -> str: """Juman++ のバージョンを返す.""" From 28e2de212110b14faa1ef747cb201c7786715d5f Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 19:50:35 +0900 Subject: [PATCH 49/52] add nosec B301 --- tests/units/test_document.py | 4 ++-- tests/units/test_sentence.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/units/test_document.py b/tests/units/test_document.py index afcf57c1..673f1669 100644 --- a/tests/units/test_document.py +++ b/tests/units/test_document.py @@ -907,12 +907,12 @@ def test_eq_raw_text() -> None: @pytest.mark.parametrize("case", CASES) def test_pickle_unpickle(case: Dict[str, str]) -> None: doc1 = Document.from_knp(case["knp"]) - doc2 = pickle.loads(pickle.dumps(doc1)) + doc2 = pickle.loads(pickle.dumps(doc1)) # nosec B301 assert doc1.to_knp() == doc2.to_knp() @pytest.mark.parametrize("path", Path("tests/data").glob("*.knp")) def test_pickle_unpickle_annotated_corpora(path: Path) -> None: doc1 = Document.from_knp(path.read_text()) - doc2 = pickle.loads(pickle.dumps(doc1)) + doc2 = pickle.loads(pickle.dumps(doc1)) # nosec B301 assert doc1.to_knp() == doc2.to_knp() diff --git a/tests/units/test_sentence.py b/tests/units/test_sentence.py index a9da0692..2029f3f8 100644 --- a/tests/units/test_sentence.py +++ b/tests/units/test_sentence.py @@ -768,5 +768,5 @@ def test_eq_raw_text(case: Dict[str, str]) -> None: @pytest.mark.parametrize("case", CASES) def test_pickle_unpickle(case: Dict[str, str]) -> None: sent1 = Sentence.from_knp(case["knp"]) - sent2 = pickle.loads(pickle.dumps(sent1)) + sent2 = pickle.loads(pickle.dumps(sent1)) # nosec B301 assert sent1.to_knp() == sent2.to_knp() From 677a78501684e594d6450409b77ed4d6a9bd2a0e Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 20:17:01 +0900 Subject: [PATCH 50/52] tweak --- tests/units/test_document.py | 4 ++-- tests/units/test_sentence.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/units/test_document.py b/tests/units/test_document.py index 673f1669..140d7e3f 100644 --- a/tests/units/test_document.py +++ b/tests/units/test_document.py @@ -907,12 +907,12 @@ def test_eq_raw_text() -> None: @pytest.mark.parametrize("case", CASES) def test_pickle_unpickle(case: Dict[str, str]) -> None: doc1 = Document.from_knp(case["knp"]) - doc2 = pickle.loads(pickle.dumps(doc1)) # nosec B301 + doc2 = pickle.loads(pickle.dumps(doc1)) # nosec pickle assert doc1.to_knp() == doc2.to_knp() @pytest.mark.parametrize("path", Path("tests/data").glob("*.knp")) def test_pickle_unpickle_annotated_corpora(path: Path) -> None: doc1 = Document.from_knp(path.read_text()) - doc2 = pickle.loads(pickle.dumps(doc1)) # nosec B301 + doc2 = pickle.loads(pickle.dumps(doc1)) # nosec pickle assert doc1.to_knp() == doc2.to_knp() diff --git a/tests/units/test_sentence.py b/tests/units/test_sentence.py index 2029f3f8..3fb536a4 100644 --- a/tests/units/test_sentence.py +++ b/tests/units/test_sentence.py @@ -768,5 +768,5 @@ def test_eq_raw_text(case: Dict[str, str]) -> None: @pytest.mark.parametrize("case", CASES) def test_pickle_unpickle(case: Dict[str, str]) -> None: sent1 = Sentence.from_knp(case["knp"]) - sent2 = pickle.loads(pickle.dumps(sent1)) # nosec B301 + sent2 = pickle.loads(pickle.dumps(sent1)) # nosec pickle assert sent1.to_knp() == sent2.to_knp() From ecdae52087a875d6ce918187da946bd001d7ac6d Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 22:20:52 +0900 Subject: [PATCH 51/52] update deps --- poetry.lock | 217 +++++++++++++++++++++++++++------------------------- 1 file changed, 111 insertions(+), 106 deletions(-) diff --git a/poetry.lock b/poetry.lock index e78cb8e2..4dddc574 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1050,18 +1050,18 @@ tests = ["pytest"] [[package]] name = "pydantic" -version = "2.1.1" +version = "2.2.0" description = "Data validation using Python type hints" optional = true python-versions = ">=3.7" files = [ - {file = "pydantic-2.1.1-py3-none-any.whl", hash = "sha256:43bdbf359d6304c57afda15c2b95797295b702948082d4c23851ce752f21da70"}, - {file = "pydantic-2.1.1.tar.gz", hash = "sha256:22d63db5ce4831afd16e7c58b3192d3faf8f79154980d9397d9867254310ba4b"}, + {file = "pydantic-2.2.0-py3-none-any.whl", hash = "sha256:a479d511d1337ad091bd1ef90a7aaf707326968cff78a579108bc289b7f5ecdd"}, + {file = "pydantic-2.2.0.tar.gz", hash = "sha256:5f30f37a75bca15930e256da6a401f1cb953eb3bc578d454c0876f4e1459a7fa"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.4.0" +pydantic-core = "2.6.0" typing-extensions = ">=4.6.1" [package.extras] @@ -1069,112 +1069,117 @@ email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.4.0" +version = "2.6.0" description = "" optional = true python-versions = ">=3.7" files = [ - {file = "pydantic_core-2.4.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:2ca4687dd996bde7f3c420def450797feeb20dcee2b9687023e3323c73fc14a2"}, - {file = "pydantic_core-2.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:782fced7d61469fd1231b184a80e4f2fa7ad54cd7173834651a453f96f29d673"}, - {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6213b471b68146af97b8551294e59e7392c2117e28ffad9c557c65087f4baee3"}, - {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63797499a219d8e81eb4e0c42222d0a4c8ec896f5c76751d4258af95de41fdf1"}, - {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_24_armv7l.whl", hash = "sha256:0455876d575a35defc4da7e0a199596d6c773e20d3d42fa1fc29f6aa640369ed"}, - {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_24_ppc64le.whl", hash = "sha256:8c938c96294d983dcf419b54dba2d21056959c22911d41788efbf949a29ae30d"}, - {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_24_s390x.whl", hash = "sha256:878a5017d93e776c379af4e7b20f173c82594d94fa073059bcc546789ad50bf8"}, - {file = "pydantic_core-2.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:69159afc2f2dc43285725f16143bc5df3c853bc1cb7df6021fce7ef1c69e8171"}, - {file = "pydantic_core-2.4.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:54df7df399b777c1fd144f541c95d351b3aa110535a6810a6a569905d106b6f3"}, - {file = "pydantic_core-2.4.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e412607ca89a0ced10758dfb8f9adcc365ce4c1c377e637c01989a75e9a9ec8a"}, - {file = "pydantic_core-2.4.0-cp310-none-win32.whl", hash = "sha256:853f103e2b9a58832fdd08a587a51de8b552ae90e1a5d167f316b7eabf8d7dde"}, - {file = "pydantic_core-2.4.0-cp310-none-win_amd64.whl", hash = "sha256:3ba2c9c94a9176f6321a879c8b864d7c5b12d34f549a4c216c72ce213d7d953c"}, - {file = "pydantic_core-2.4.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:a8b7acd04896e8f161e1500dc5f218017db05c1d322f054e89cbd089ce5d0071"}, - {file = "pydantic_core-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:16468bd074fa4567592d3255bf25528ed41e6b616d69bf07096bdb5b66f947d1"}, - {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cba5ad5eef02c86a1f3da00544cbc59a510d596b27566479a7cd4d91c6187a11"}, - {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b7206e41e04b443016e930e01685bab7a308113c0b251b3f906942c8d4b48fcb"}, - {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_24_armv7l.whl", hash = "sha256:c1375025f0bfc9155286ebae8eecc65e33e494c90025cda69e247c3ccd2bab00"}, - {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_24_ppc64le.whl", hash = "sha256:3534118289e33130ed3f1cc487002e8d09b9f359be48b02e9cd3de58ce58fba9"}, - {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_24_s390x.whl", hash = "sha256:94d2b36a74623caab262bf95f0e365c2c058396082bd9d6a9e825657d0c1e7fa"}, - {file = "pydantic_core-2.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:af24ad4fbaa5e4a2000beae0c3b7fd1c78d7819ab90f9370a1cfd8998e3f8a3c"}, - {file = "pydantic_core-2.4.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bf10963d8aed8bbe0165b41797c9463d4c5c8788ae6a77c68427569be6bead41"}, - {file = "pydantic_core-2.4.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:68199ada7c310ddb8c76efbb606a0de656b40899388a7498954f423e03fc38be"}, - {file = "pydantic_core-2.4.0-cp311-none-win32.whl", hash = "sha256:6f855bcc96ed3dd56da7373cfcc9dcbabbc2073cac7f65c185772d08884790ce"}, - {file = "pydantic_core-2.4.0-cp311-none-win_amd64.whl", hash = "sha256:de39eb3bab93a99ddda1ac1b9aa331b944d8bcc4aa9141148f7fd8ee0299dafc"}, - {file = "pydantic_core-2.4.0-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:f773b39780323a0499b53ebd91a28ad11cde6705605d98d999dfa08624caf064"}, - {file = "pydantic_core-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a297c0d6c61963c5c3726840677b798ca5b7dfc71bc9c02b9a4af11d23236008"}, - {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:546064c55264156b973b5e65e5fafbe5e62390902ce3cf6b4005765505e8ff56"}, - {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36ba9e728588588f0196deaf6751b9222492331b5552f865a8ff120869d372e0"}, - {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_24_armv7l.whl", hash = "sha256:57a53a75010c635b3ad6499e7721eaa3b450e03f6862afe2dbef9c8f66e46ec8"}, - {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_24_ppc64le.whl", hash = "sha256:4b262bbc13022f2097c48a21adcc360a81d83dc1d854c11b94953cd46d7d3c07"}, - {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_24_s390x.whl", hash = "sha256:01947ad728f426fa07fcb26457ebf90ce29320259938414bc0edd1476e75addb"}, - {file = "pydantic_core-2.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b2799c2eaf182769889761d4fb4d78b82bc47dae833799fedbf69fc7de306faa"}, - {file = "pydantic_core-2.4.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:a08fd490ba36d1fbb2cd5dcdcfb9f3892deb93bd53456724389135712b5fc735"}, - {file = "pydantic_core-2.4.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:1e8a7c62d15a5c4b307271e4252d76ebb981d6251c6ecea4daf203ef0179ea4f"}, - {file = "pydantic_core-2.4.0-cp312-none-win32.whl", hash = "sha256:9206c14a67c38de7b916e486ae280017cf394fa4b1aa95cfe88621a4e1d79725"}, - {file = "pydantic_core-2.4.0-cp312-none-win_amd64.whl", hash = "sha256:884235507549a6b2d3c4113fb1877ae263109e787d9e0eb25c35982ab28d0399"}, - {file = "pydantic_core-2.4.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:4cbe929efa77a806e8f1a97793f2dc3ea3475ae21a9ed0f37c21320fe93f6f50"}, - {file = "pydantic_core-2.4.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:9137289de8fe845c246a8c3482dd0cb40338846ba683756d8f489a4bd8fddcae"}, - {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5d8e764b5646623e57575f624f8ebb8f7a9f7fd1fae682ef87869ca5fec8dcf"}, - {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8fba0aff4c407d0274e43697e785bcac155ad962be57518d1c711f45e72da70f"}, - {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_24_armv7l.whl", hash = "sha256:30527d173e826f2f7651f91c821e337073df1555e3b5a0b7b1e2c39e26e50678"}, - {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_24_ppc64le.whl", hash = "sha256:bd7d1dde70ff3e09e4bc7a1cbb91a7a538add291bfd5b3e70ef1e7b45192440f"}, - {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_24_s390x.whl", hash = "sha256:72f1216ca8cef7b8adacd4c4c6b89c3b0c4f97503197f5284c80f36d6e4edd30"}, - {file = "pydantic_core-2.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b013c7861a7c7bfcec48fd709513fea6f9f31727e7a0a93ca0dd12e056740717"}, - {file = "pydantic_core-2.4.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:478f5f6d7e32bd4a04d102160efb2d389432ecf095fe87c555c0a6fc4adfc1a4"}, - {file = "pydantic_core-2.4.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d9610b47b5fe4aacbbba6a9cb5f12cbe864eec99dbfed5710bd32ef5dd8a5d5b"}, - {file = "pydantic_core-2.4.0-cp37-none-win32.whl", hash = "sha256:ff246c0111076c8022f9ba325c294f2cb5983403506989253e04dbae565e019b"}, - {file = "pydantic_core-2.4.0-cp37-none-win_amd64.whl", hash = "sha256:d0c2b713464a8e263a243ae7980d81ce2de5ac59a9f798a282e44350b42dc516"}, - {file = "pydantic_core-2.4.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:12ef6838245569fd60a179fade81ca4b90ae2fa0ef355d616f519f7bb27582db"}, - {file = "pydantic_core-2.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49db206eb8fdc4b4f30e6e3e410584146d813c151928f94ec0db06c4f2595538"}, - {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a507d7fa44688bbac76af6521e488b3da93de155b9cba6f2c9b7833ce243d59"}, - {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffe18407a4d000c568182ce5388bbbedeb099896904e43fc14eee76cfae6dec5"}, - {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_24_armv7l.whl", hash = "sha256:fa8e48001b39d54d97d7b380a0669fa99fc0feeb972e35a2d677ba59164a9a22"}, - {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_24_ppc64le.whl", hash = "sha256:394f12a2671ff8c4dfa2e85be6c08be0651ad85bc1e6aa9c77c21671baaf28cd"}, - {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_24_s390x.whl", hash = "sha256:2f9ea0355f90db2a76af530245fa42f04d98f752a1236ed7c6809ec484560d5b"}, - {file = "pydantic_core-2.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:61d4e713f467abcdd59b47665d488bb898ad3dd47ce7446522a50e0cbd8e8279"}, - {file = "pydantic_core-2.4.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:453862ab268f6326b01f067ed89cb3a527d34dc46f6f4eeec46a15bbc706d0da"}, - {file = "pydantic_core-2.4.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:56a85fa0dab1567bd0cac10f0c3837b03e8a0d939e6a8061a3a420acd97e9421"}, - {file = "pydantic_core-2.4.0-cp38-none-win32.whl", hash = "sha256:0d726108c1c0380b88b6dd4db559f0280e0ceda9e077f46ff90bc85cd4d03e77"}, - {file = "pydantic_core-2.4.0-cp38-none-win_amd64.whl", hash = "sha256:047580388644c473b934d27849f8ed8dbe45df0adb72104e78b543e13bf69762"}, - {file = "pydantic_core-2.4.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:867d3eea954bea807cabba83cfc939c889a18576d66d197c60025b15269d7cc0"}, - {file = "pydantic_core-2.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:664402ef0c238a7f8a46efb101789d5f2275600fb18114446efec83cfadb5b66"}, - {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64e8012ad60a5f0da09ed48725e6e923d1be25f2f091a640af6079f874663813"}, - {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac2b680de398f293b68183317432b3d67ab3faeba216aec18de0c395cb5e3060"}, - {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_24_armv7l.whl", hash = "sha256:8efc1be43b036c2b6bcfb1451df24ee0ddcf69c31351003daf2699ed93f5687b"}, - {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_24_ppc64le.whl", hash = "sha256:d93aedbc4614cc21b9ab0d0c4ccd7143354c1f7cffbbe96ae5216ad21d1b21b5"}, - {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_24_s390x.whl", hash = "sha256:af788b64e13d52fc3600a68b16d31fa8d8573e3ff2fc9a38f8a60b8d94d1f012"}, - {file = "pydantic_core-2.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:97c6349c81cee2e69ef59eba6e6c08c5936e6b01c2d50b9e4ac152217845ae09"}, - {file = "pydantic_core-2.4.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:cc086ddb6dc654a15deeed1d1f2bcb1cb924ebd70df9dca738af19f64229b06c"}, - {file = "pydantic_core-2.4.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e953353180bec330c3b830891d260b6f8e576e2d18db3c78d314e56bb2276066"}, - {file = "pydantic_core-2.4.0-cp39-none-win32.whl", hash = "sha256:6feb4b64d11d5420e517910d60a907d08d846cacaf4e029668725cd21d16743c"}, - {file = "pydantic_core-2.4.0-cp39-none-win_amd64.whl", hash = "sha256:153a61ac4030fa019b70b31fb7986461119230d3ba0ab661c757cfea652f4332"}, - {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:3fcf529382b282a30b466bd7af05be28e22aa620e016135ac414f14e1ee6b9e1"}, - {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2edef05b63d82568b877002dc4cb5cc18f8929b59077120192df1e03e0c633f8"}, - {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da055a1b0bfa8041bb2ff586b2cb0353ed03944a3472186a02cc44a557a0e661"}, - {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:77dadc764cf7c5405e04866181c5bd94a447372a9763e473abb63d1dfe9b7387"}, - {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:a4ea23b07f29487a7bef2a869f68c7ee0e05424d81375ce3d3de829314c6b5ec"}, - {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:382f0baa044d674ad59455a5eff83d7965572b745cc72df35c52c2ce8c731d37"}, - {file = "pydantic_core-2.4.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:08f89697625e453421401c7f661b9d1eb4c9e4c0a12fd256eeb55b06994ac6af"}, - {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:43a405ce520b45941df9ff55d0cd09762017756a7b413bbad3a6e8178e64a2c2"}, - {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:584a7a818c84767af16ce8bda5d4f7fedb37d3d231fc89928a192f567e4ef685"}, - {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:04922fea7b13cd480586fa106345fe06e43220b8327358873c22d8dfa7a711c7"}, - {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:17156abac20a9feed10feec867fddd91a80819a485b0107fe61f09f2117fe5f3"}, - {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:4e562cc63b04636cde361fd47569162f1daa94c759220ff202a8129902229114"}, - {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:90f3785146f701e053bb6b9e8f53acce2c919aca91df88bd4975be0cb926eb41"}, - {file = "pydantic_core-2.4.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:e40b1e97edd3dc127aa53d8a5e539a3d0c227d71574d3f9ac1af02d58218a122"}, - {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:b27f3e67f6e031f6620655741b7d0d6bebea8b25d415924b3e8bfef2dd7bd841"}, - {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be86c2eb12fb0f846262ace9d8f032dc6978b8cb26a058920ecb723dbcb87d05"}, - {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4665f7ed345012a8d2eddf4203ef145f5f56a291d010382d235b94e91813f88a"}, - {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:79262be5a292d1df060f29b9a7cdd66934801f987a817632d7552534a172709a"}, - {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:5fd905a69ac74eaba5041e21a1e8b1a479dab2b41c93bdcc4c1cede3c12a8d86"}, - {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:2ad538b7e07343001934417cdc8584623b4d8823c5b8b258e75ec8d327cec969"}, - {file = "pydantic_core-2.4.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:dd2429f7635ad4857b5881503f9c310be7761dc681c467a9d27787b674d1250a"}, - {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:efff8b6761a1f6e45cebd1b7a6406eb2723d2d5710ff0d1b624fe11313693989"}, - {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:32a1e0352558cd7ccc014ffe818c7d87b15ec6145875e2cc5fa4bb7351a1033d"}, - {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a027f41c5008571314861744d83aff75a34cf3a07022e0be32b214a5bc93f7f1"}, - {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1927f0e15d190f11f0b8344373731e28fd774c6d676d8a6cfadc95c77214a48b"}, - {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7aa82d483d5fb867d4fb10a138ffd57b0f1644e99f2f4f336e48790ada9ada5e"}, - {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b85778308bf945e9b33ac604e6793df9b07933108d20bdf53811bc7c2798a4af"}, - {file = "pydantic_core-2.4.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:3ded19dcaefe2f6706d81e0db787b59095f4ad0fbadce1edffdf092294c8a23f"}, - {file = "pydantic_core-2.4.0.tar.gz", hash = "sha256:ec3473c9789cc00c7260d840c3db2c16dbfc816ca70ec87a00cddfa3e1a1cdd5"}, + {file = "pydantic_core-2.6.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:2ae2d2aa91f442427d5d607f5bc07a6601aea7e9812c158b11dfac4fca28b24a"}, + {file = "pydantic_core-2.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cddecc97d923c3fae698820a788d6e7fda61538244dd2a0808d6263115fe5870"}, + {file = "pydantic_core-2.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:482a20567991170d0b55aa4d73084858ab8d54804ffef8061f254c0f8b9cf668"}, + {file = "pydantic_core-2.6.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:775710d825f2b2ffe8a0bfd8d17cb8de6a9e562e78f50171c5afa9c508faa45c"}, + {file = "pydantic_core-2.6.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4fd9661a30a370faae9303dfde31d09d5b6f28113f8dace9a63f51d205703a8d"}, + {file = "pydantic_core-2.6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4e9430096484696a1837f55728c804917ad694f8e965ad0317ff896db21c3a7b"}, + {file = "pydantic_core-2.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:253d769ce88f6d5b8ae8965f08c486114e30b5e5478f327348b77615a2a543cb"}, + {file = "pydantic_core-2.6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:959aa63057738b426137d3de99d8da118f5c8ba19a238fdb5e5f0717297e9da4"}, + {file = "pydantic_core-2.6.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c2c54ce857d0adb549fc735ffe84b9d1e77d1b460656fb2d3faa9050a85d8d37"}, + {file = "pydantic_core-2.6.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fe66139cfdd02ec4a0aad0cecf53bf9933c748097a97beb9042c03f236dd68b9"}, + {file = "pydantic_core-2.6.0-cp310-none-win32.whl", hash = "sha256:1781e985a9493f3fdca4c010fc6a009ab4fd40a61ab78e5cc9820eb8010c1c4c"}, + {file = "pydantic_core-2.6.0-cp310-none-win_amd64.whl", hash = "sha256:1d1b6c14c1116e797758bf1ff93ff18ab493279609aec6a60e6dee9de9065255"}, + {file = "pydantic_core-2.6.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:2f80f6790e87ec29ba28aab9a66b07ee789ec8fa6ea94aeac47e27f0019a061c"}, + {file = "pydantic_core-2.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:04d6de74f91ff1a88975bc5e3c7103b676106af380ce8d9b56649116e0855dc9"}, + {file = "pydantic_core-2.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c7507d40bd5d055dadba8ae9b6008356f380ce102942e0740228d97e8bd4152"}, + {file = "pydantic_core-2.6.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:82e34dc040001f50bec1a7a5c09fb6566635078ce91943cd10445a560cb3fe23"}, + {file = "pydantic_core-2.6.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:49848c89575d7768ea8762cc029f573a3d611452c41d05ae75bdcea8f77a9e5c"}, + {file = "pydantic_core-2.6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:04b0e91c338536e3e3f77c3ed5354d14c46163f1c6b0706037b0b4be409eb943"}, + {file = "pydantic_core-2.6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6265372636a78bc6b8ba92f7d2dafca353c549edc8082a602d00a28f71a9155a"}, + {file = "pydantic_core-2.6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:42caa59248750573efbce6a74f3e121f9def86dc2087772d51f0907c2ed6dc61"}, + {file = "pydantic_core-2.6.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fd29541fb6f7647f535c0067cabb50ec014f13fa599ac4e34152abb5cb046988"}, + {file = "pydantic_core-2.6.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e4d46cd802c163914f07124735371812e9bed8a39acbebcee5bd06d43f454e1a"}, + {file = "pydantic_core-2.6.0-cp311-none-win32.whl", hash = "sha256:75850d211015ae46e28b3e05ee0cc8687316505cad385170aff70ad60f143011"}, + {file = "pydantic_core-2.6.0-cp311-none-win_amd64.whl", hash = "sha256:ff462b08951adaf55dbcc623d9b57823e888ffa4886f902dfc2c69d6ddc1ce4b"}, + {file = "pydantic_core-2.6.0-cp311-none-win_arm64.whl", hash = "sha256:658f4e8afe60d8400526d6db28d4e88e76027cf6111716fc090de87d14b5c311"}, + {file = "pydantic_core-2.6.0-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:a7d7b5af9ee32517280228629daca013ecc9a7834075af3d928287539ccd54ec"}, + {file = "pydantic_core-2.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d03de66eda2c3a6eab2c2cf43eeece37e4cf811e891361b1fb8d8d3cd109f3a"}, + {file = "pydantic_core-2.6.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:693df3a922d94ba1c42ea732df7ab2f0492d6081b0170e86753a45e8822342a6"}, + {file = "pydantic_core-2.6.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bf6cb8b9c23dbb074f2d97b02af4d9d5401bd8015daad3e92fc35f88c5c07ba6"}, + {file = "pydantic_core-2.6.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a8aee2623180f736fc426925489e84bd244e45de4175dec76f10d4fda775721b"}, + {file = "pydantic_core-2.6.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:582bfd6e7d09f5883f607b7171fcd2010d226497d9dfc9703c8aa8d58431fa84"}, + {file = "pydantic_core-2.6.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b52ce001eacd9906955576c71ee3fad9a442117b86dd84e5ea18e6ce287078d"}, + {file = "pydantic_core-2.6.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:179da6a5264d11cf2defba17c0003f6e27922d95f37b4818905115e2c9b8f7ed"}, + {file = "pydantic_core-2.6.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:4118471f4ba0f92fbe84bb6c0f645b423eaa5453e0dc4b6c0a6759da818352ba"}, + {file = "pydantic_core-2.6.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:afd9d1ef2805729898f580ccde0e76a3edd39cf16778c2139222047c8d25893b"}, + {file = "pydantic_core-2.6.0-cp312-none-win32.whl", hash = "sha256:c029084413a8eeb7d7b179d647d1e1a5cbfd5e5a817862a0ba8c5024fc9febf2"}, + {file = "pydantic_core-2.6.0-cp312-none-win_amd64.whl", hash = "sha256:86a74d426ca995deb3c847a2b382775b93a306fce13ae7b66cdc5fb8090a3ac5"}, + {file = "pydantic_core-2.6.0-cp312-none-win_arm64.whl", hash = "sha256:5a878f37a144c5641ead8b0771164dd22237ed4013b9899f250f0992447114e0"}, + {file = "pydantic_core-2.6.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:f9ebd8c45c8729bb23bb902a5cff573996fe5d86c3fc8c17cde3443345533889"}, + {file = "pydantic_core-2.6.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:0faddd509ca1811d7e595cb48dc9b63d080a95f8434c5dc6660f268694f3c20f"}, + {file = "pydantic_core-2.6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:859e11c4543bfd16b8033d50a2d7e4190fc5c6e182a6419b0d7c41109e3841b9"}, + {file = "pydantic_core-2.6.0-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9f1a5fafbbadca467f426eb796bec61a908a670dfdcb984d300b9dd4d8b82433"}, + {file = "pydantic_core-2.6.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e3247b6d304226b12e240ff3fb0eb56b45520cd609d382fde6338a5556d44783"}, + {file = "pydantic_core-2.6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:67f7658ac47a88ea3859389c4a67713edce77ade653812e0a574bc8f0cb0d951"}, + {file = "pydantic_core-2.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:310a47d94895628d3563859cb970cad1b3ee7a5f2282d9bd5512b3c5a09d4379"}, + {file = "pydantic_core-2.6.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2ee383e256a0e4b8bff1832fb31c530380a1421a714276ffd32609ce58a4c77a"}, + {file = "pydantic_core-2.6.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:148162967ede812466915bee671403dd2ded9822332df6c52866348129d4e58e"}, + {file = "pydantic_core-2.6.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d0d672be281d2e297f95ca301710aed9ad7e10c56a691337c2f22375feb60f29"}, + {file = "pydantic_core-2.6.0-cp37-none-win32.whl", hash = "sha256:ed683ff1663fd596ce84cf4d132f7ce7b94f0b60686ee06ca2c8e151ccb918e7"}, + {file = "pydantic_core-2.6.0-cp37-none-win_amd64.whl", hash = "sha256:301e47c7cabc1c435773fcf0c7278181add0f211ddaf4c683bbfb62e09457c33"}, + {file = "pydantic_core-2.6.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:14ec281d30dd1a7fbf62e0afe4bc7bfac4b5edcf8da7affef1a79e874f3899cb"}, + {file = "pydantic_core-2.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d13fc39e2d2957f32d8fa9d013bd7165d00c43890bdaea1e20a726873c50531b"}, + {file = "pydantic_core-2.6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:905048671ef08f2a504cdf7e26ffbe88efd74494ba821f2cdb1e4b1506236047"}, + {file = "pydantic_core-2.6.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:99b6004cd989bbcaf32e0794e6f42460b6f5ac047b2eb443a661cfdba29704e5"}, + {file = "pydantic_core-2.6.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4bac3e606b7f8fffd5e3a0d7c5d6ab110075c9dc16b9f8932cb077b6d985f8de"}, + {file = "pydantic_core-2.6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:77865eb89c646673bedc7de4acd0a076dd6bada2f01d010675031cd855b052cf"}, + {file = "pydantic_core-2.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdbc528c7c6fef0e9aa1b4ba620d707c9735cfc92e6b666b83862ee55faa9605"}, + {file = "pydantic_core-2.6.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7291e0e36c1bc5c3b20d3f3cf77ba9ac7a26423ec50781d4f0435c45ddfe18c2"}, + {file = "pydantic_core-2.6.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f693255ffec26a090c76adfb8f6286b76f5f3c9aa245f4bbe03aede102d815ef"}, + {file = "pydantic_core-2.6.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:9e8d12016b2fdbf885e3c7580fa8f6d2e90838586faee511656f2022ebf71a2d"}, + {file = "pydantic_core-2.6.0-cp38-none-win32.whl", hash = "sha256:59420b2fe9edfdc640e79aac09461400862d2e699ca59e5b96e5595cc7554736"}, + {file = "pydantic_core-2.6.0-cp38-none-win_amd64.whl", hash = "sha256:757372e9b5c81cec72a077237d5d026ccd5ad9bf4931bebee4c92177d52b4eba"}, + {file = "pydantic_core-2.6.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:6798756a5bee9991af64763ee2f3580505932a3f432af9a73bc9fdaca460261f"}, + {file = "pydantic_core-2.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3170a13c8cdb564f544ce03a7f26962828cce3456413b325fca49d32ef47ed1f"}, + {file = "pydantic_core-2.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51eb518682898df170d3d2ddd9c1f2a9496d79e5bd611b508d1a698e50b13fc6"}, + {file = "pydantic_core-2.6.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fe01f83bea0e4715c49449039b3c60a59408f0ceee61bb8c9a64699545e5b786"}, + {file = "pydantic_core-2.6.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:11854f12f09d2a108d130645edbca7aecf24756455599b0b19dacd47499ccadc"}, + {file = "pydantic_core-2.6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16c572a839eb584115185146a04b15986e19e3cbf00e3788f8296b16ec7b3fd5"}, + {file = "pydantic_core-2.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e89b0a3f05416a7e67ec7257cddcf44263a10cea618cfc89855d46997c13742"}, + {file = "pydantic_core-2.6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5464f3d27376739c7fa0af47096ac3696db1d8996d086167b3643f0443a1a976"}, + {file = "pydantic_core-2.6.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0ff7df99df6ae485e33afafc7adbfae2e133501b5debea4f0c20cd1f679fa321"}, + {file = "pydantic_core-2.6.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ac4148c3bede4269f286c7d094e98c717f1101025145e89baacbafc7c5f7f74b"}, + {file = "pydantic_core-2.6.0-cp39-none-win32.whl", hash = "sha256:36d6211421a4dd6d11ccb08e9ac92d143132402403ab791688cfc01973ad3de1"}, + {file = "pydantic_core-2.6.0-cp39-none-win_amd64.whl", hash = "sha256:83f5a3e201fe16684c12e654423a0c293733a57a1f9a9f284dbfb1b59f0e79bb"}, + {file = "pydantic_core-2.6.0-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:eeb7b4e1dd925db174a410680c846cb7ab7eb1923f556b44cf53cea774dc42fa"}, + {file = "pydantic_core-2.6.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0b4bcc57b12980b67e5eed09732102b19380f79dcba09444faa7a5c1826a432"}, + {file = "pydantic_core-2.6.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5534040341ac6ad4d133023cd45da3654fff77795481c8e4d4508cafd248ba5"}, + {file = "pydantic_core-2.6.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:358f5d48aa850054ef1b148f4c3000b2ea216db4ab611039080bea294002349c"}, + {file = "pydantic_core-2.6.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f5ca934143857626de2423d65d487687c87931a62044ed5ee0deee55018569f4"}, + {file = "pydantic_core-2.6.0-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:5b3159c893a1d6dc93080b882d7c4fa8651abbb228a4d920066f3f48b7a200ac"}, + {file = "pydantic_core-2.6.0-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:5d9510004c4db5c683e349905c9700217da10b35d4447c7a1dfff1b6dd26192a"}, + {file = "pydantic_core-2.6.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:fc54501cdffbc8a7dbe300d6e4745c910d767a1aa273febca965f5fa561036b1"}, + {file = "pydantic_core-2.6.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:6cc456fc3c7156b23866ab953d3ff57010ab6a4b79ba686109ef93581467f6c3"}, + {file = "pydantic_core-2.6.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aedc8671291d6ff17b9fc587fed982c4feeffdd28351c577695a5f07945c4625"}, + {file = "pydantic_core-2.6.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:997fa26fd71c5d8676fa6dfefc06be1fac65fd578934d40e7546c047b7bdd019"}, + {file = "pydantic_core-2.6.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4f346c8fbd953f47711c388d9b856cad87cf72a714302bc04056f89d6ac55388"}, + {file = "pydantic_core-2.6.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d61acd378c38bdcc1c109605831695eb27bd755d1fc5c765e40878601bd0c66b"}, + {file = "pydantic_core-2.6.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:3427ca73cffe42297bbb0ed712642d8484c42671b329441a2e51ce139f7e2f93"}, + {file = "pydantic_core-2.6.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:dabfdc82432499ceb33bb204fa0e5c0004a7dc1d85ba0250c5849ddfddd94819"}, + {file = "pydantic_core-2.6.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:10da8e685fe25be11089a666346461e01e23164688a224e33fee25d2a86da4e0"}, + {file = "pydantic_core-2.6.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:0dbd7262932b213b34f6c1bdd33b53b6ffc07e3cee21d63486d68e433020f452"}, + {file = "pydantic_core-2.6.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9d6f16d771334c49a173403805ef874aff9800ea7c44f94ebf3817ae9c5631e"}, + {file = "pydantic_core-2.6.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:646324855acd153632bb86cbbd222771df7859b43d2891ace57c5b8c818ba8a7"}, + {file = "pydantic_core-2.6.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f52e9edca854804b780bba5c82f7a1aafebb7a7c496879a45423cf991c361f9e"}, + {file = "pydantic_core-2.6.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:95e569d8f702851ab48e349c5eb2f8ea673657b7ed5f2ac335d540ebc8519385"}, + {file = "pydantic_core-2.6.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b2ddc15cf29dc4b385c667064d7efb96431006dcf523527c3d749494b73e73a6"}, + {file = "pydantic_core-2.6.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:0b52468b09ccee65bc96572345ec73dc89b42528874b626f7757000a6544d285"}, + {file = "pydantic_core-2.6.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:c020c5047b25e64c39006fa11f15d93adf4ae85154387f8e10232871ba78e7b2"}, + {file = "pydantic_core-2.6.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:892e7de51b8191929bf1246a04c13674a4d4b8dced8a4f86def85a1b0cb1a1e4"}, + {file = "pydantic_core-2.6.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d179b77fff4387a46ed0b63eb87ad6be58bb2a3a3415e69a44e918e8abcbd8c6"}, + {file = "pydantic_core-2.6.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b35585d14028c1afa41c1183906ce4128128d1114be9958b5ad0fb3721b50a4"}, + {file = "pydantic_core-2.6.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ffe8b2c8e30a87f6d7c1a78e23b8270a1acde9140cde425fa94688d302c8b2c9"}, + {file = "pydantic_core-2.6.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:6cc57fb772b48e5fd3691ca82d3756b6e64b885676d27d66bff551d951a18e5c"}, + {file = "pydantic_core-2.6.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:3d72ebaa6451490ae05d3da858120b395b3bf1bebc8a5238ef803ff0f4f16f38"}, + {file = "pydantic_core-2.6.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:535f47fe0d2db647fdb0376cbbadd34fd00b3a5f56f772b0b0ef26928e8afa22"}, + {file = "pydantic_core-2.6.0.tar.gz", hash = "sha256:e50513d8dd8ea67259d45986e314f545f219ebb2496eea52269e457cdc7419f4"}, ] [package.dependencies] From 172b3f810f83cf637a522b2dcc32ba4baea5f0ab Mon Sep 17 00:00:00 2001 From: nobu-g Date: Thu, 17 Aug 2023 22:21:08 +0900 Subject: [PATCH 52/52] bump version to 1.4.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 71afd7a0..0cef4484 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rhoknp" -version = "1.3.2" +version = "1.4.0" description = "Yet another Python binding for Juman++/KNP/KWJA" license = "MIT" authors = [