From f26451bab3495157859801f7c6be8280f7e31621 Mon Sep 17 00:00:00 2001 From: Tomoko Uchida Date: Sat, 1 Jul 2023 16:30:50 +0900 Subject: [PATCH 1/7] run tests on python 3.11 and 3.12 prelease --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index fa03882..b073ec0 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -21,7 +21,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12-dev'] steps: - uses: actions/checkout@v2 From 29199eeb5c0af793cefc5aa432f68e0cd9493c7c Mon Sep 17 00:00:00 2001 From: Tomoko Uchida Date: Sat, 1 Jul 2023 16:37:45 +0900 Subject: [PATCH 2/7] refine actions workflow --- .github/workflows/checks.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b073ec0..3941506 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -2,17 +2,10 @@ name: Checks on: push: - paths: - - 'janome/**' - - 'tests/**' - - 'ipadic/**' - - '.github/workflows/**' + branches: + - 'master' pull_request: - paths: - - 'janome/**' - - 'tests/**' - - 'ipadic/**' - - '.github/workflows/**' + jobs: test: From 50c4fcd18f04d64c3d3bb231e018039cdbc6e168 Mon Sep 17 00:00:00 2001 From: Tomoko Uchida Date: Sat, 1 Jul 2023 16:41:03 +0900 Subject: [PATCH 3/7] upgrade setuptools before runnig tests --- .github/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3941506..90cb52c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -24,6 +24,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Test run: | + pip install --upgrade setuptools pip install psutil python setup.py test From 54677e41d94d5946d664ae94d2d74a2f2438e5dc Mon Sep 17 00:00:00 2001 From: Tomoko Uchida Date: Sat, 1 Jul 2023 17:20:35 +0900 Subject: [PATCH 4/7] upgrade mypy --- janome/tokenizer.py | 2 +- requirements-dev.txt | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/janome/tokenizer.py b/janome/tokenizer.py index bc5d2ed..511137e 100644 --- a/janome/tokenizer.py +++ b/janome/tokenizer.py @@ -114,7 +114,7 @@ class Token(object): A Token object contains all information for a token. """ - def __init__(self, node: Node, extra: Tuple = None): + def __init__(self, node: Node, extra: Optional[Tuple] = None): self.node = node self.extra = extra diff --git a/requirements-dev.txt b/requirements-dev.txt index 8520624..5d153ac 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,13 +1,10 @@ autopep8==1.5.4 flake8==3.8.3 mccabe==0.6.1 -mypy==0.782 -mypy-extensions==0.4.3 +mypy==1.4.1 pycodestyle==2.6.0 pyflakes==2.2.0 toml==0.10.1 -typed-ast==1.4.1 -typing-extensions==3.7.4.2 twine==3.2.0 wheel==0.35.1 psutil==5.9.0 \ No newline at end of file From 2e7edeedfe89a89340e7c6e36b0662adc36034ae Mon Sep 17 00:00:00 2001 From: Tomoko Uchida Date: Sat, 1 Jul 2023 17:23:22 +0900 Subject: [PATCH 5/7] upgrade actions/setup-python --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 90cb52c..ad9b774 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v2 - name: Unit tests for coverage run: | pip install coverage From 5ac47a282539849afa790ccbd87abadea3212f9b Mon Sep 17 00:00:00 2001 From: Tomoko Uchida Date: Sat, 1 Jul 2023 17:27:14 +0900 Subject: [PATCH 6/7] ignore lint error E275 - missing whitespace --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 57972ac..ea80679 100644 --- a/.flake8 +++ b/.flake8 @@ -1,4 +1,4 @@ [flake8] -ignore=W605 +ignore=W605,E275 exclude=.git,__pycache__,docs,sysdic,work,mecab-ipadic-2.7.0-20070801,benchmark max-line-length=120 From 4304bb98f409120450c844587103567a18343c61 Mon Sep 17 00:00:00 2001 From: Tomoko Uchida Date: Sat, 1 Jul 2023 17:38:41 +0900 Subject: [PATCH 7/7] upgrade deps for development --- .github/workflows/checks.yml | 8 +++++--- requirements-dev.txt | 19 +++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ad9b774..65bfef7 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -24,8 +24,9 @@ jobs: python-version: ${{ matrix.python-version }} - name: Test run: | + pip install --upgrade pip pip install --upgrade setuptools - pip install psutil + pip install -r requirements-dev.txt python setup.py test check: @@ -36,8 +37,9 @@ jobs: - uses: actions/setup-python@v2 - name: Unit tests for coverage run: | - pip install coverage - pip install psutil + pip install --upgrade pip + pip install --upgrade setuptools + pip install -r requirements-dev.txt python setup.py develop coverage run -m unittest discover tests - name: Coveralls diff --git a/requirements-dev.txt b/requirements-dev.txt index 5d153ac..624319e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,10 +1,9 @@ -autopep8==1.5.4 -flake8==3.8.3 -mccabe==0.6.1 -mypy==1.4.1 -pycodestyle==2.6.0 -pyflakes==2.2.0 -toml==0.10.1 -twine==3.2.0 -wheel==0.35.1 -psutil==5.9.0 \ No newline at end of file +autopep8 +flake8 +mypy +pyflakes +toml +twine +wheel +psutil +coverage \ No newline at end of file