Skip to content

Commit 0b7499e

Browse files
authored
Merge pull request #168 from ku-nlp/develop
v1.6.0
2 parents 6c9d749 + 7515e2a commit 0b7499e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1152
-1075
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ updates:
1010
schedule:
1111
interval: "monthly"
1212
timezone: "Asia/Tokyo"
13+
groups:
14+
dependencies:
15+
patterns:
16+
- "*"
1317
target-branch: "develop"
1418
ignore:
1519
- dependency-name: "*"
@@ -20,6 +24,6 @@ updates:
2024
# default location of `.github/workflows`
2125
directory: "/"
2226
schedule:
23-
interval: "weekly"
27+
interval: "monthly"
2428
timezone: "Asia/Tokyo"
2529
target-branch: "develop"

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ jobs:
77
name: Build the project
88
runs-on: ${{ matrix.os }}
99
strategy:
10-
max-parallel: 18
10+
max-parallel: 15
1111
fail-fast: false
1212
matrix:
1313
os: [ubuntu-latest, macos-latest, windows-latest]
14-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
14+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1515
steps:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
1818
- name: Set up Python ${{ matrix.python-version }}
1919
uses: actions/setup-python@v4
2020
with:
2121
python-version: ${{ matrix.python-version }}
22-
allow-prereleases: true # TODO: Remove this line when Python 3.12 is released
2322
- name: Install Poetry
2423
run: |
2524
pipx install poetry

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
steps:
99
- name: Checkout repository
1010
uses: actions/checkout@v4
11-
- name: Set up Python 3.7
11+
- name: Set up Python 3.8
1212
uses: actions/setup-python@v4
1313
with:
14-
python-version: "3.7"
14+
python-version: "3.8"
1515
- name: Run linters
1616
run: |
1717
pipx install pre-commit

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
build-publish:
912
runs-on: ubuntu-latest
@@ -25,5 +28,6 @@ jobs:
2528
- name: Publish package
2629
uses: pypa/gh-action-pypi-publish@release/v1
2730
with:
31+
user: __token__
2832
password: ${{ secrets.PYPI_API_TOKEN }}
2933
verbose: true

.github/workflows/test-example.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
jobs:
99
test-example:
1010
name: Run tests for examples
11-
container: kunlp/jumanpp-knp:ubuntu
12-
runs-on: ubuntu-20.04 # to meet the ubuntu version in the kunlp/jumanpp-knp:ubuntu container
11+
container: kunlp/jumanpp-knp:ubuntu22.04
12+
runs-on: ubuntu-22.04
1313
strategy:
1414
max-parallel: 5
1515
fail-fast: false
@@ -20,24 +20,29 @@ jobs:
2020
uses: actions/checkout@v4
2121
- name: Install required apt packages
2222
run: |
23-
apt update -y
24-
DEBIAN_FRONTEND=noninteractive apt install -y curl build-essential libsqlite3-dev libffi-dev
23+
export DEBIAN_FRONTEND=noninteractive
24+
apt-get update -yq
25+
apt-get install -yq curl build-essential libsqlite3-dev libffi-dev
2526
- name: Set up Python ${{ matrix.python-version }}
2627
uses: actions/setup-python@v4
2728
with:
2829
python-version: ${{ matrix.python-version }}
29-
allow-prereleases: true # TODO: Remove this line when Python 3.12 is released
3030
- name: Install Poetry
3131
run: |
3232
python3 -m pip install --user pipx
3333
python3 -m pipx ensurepath
3434
python3 -m pipx install poetry
3535
- name: Add path for Python packages
36-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
36+
run: |
37+
echo "$HOME/.local/bin" >> $GITHUB_PATH
3738
- name: Install dependencies
38-
run: poetry install --no-interaction --without dev,docs --extras=cli
39+
run: |
40+
poetry install --no-interaction --without dev,docs --extras=cli
3941
- name: Install KWJA
40-
run: pipx install kwja
42+
# KWJA does not support Python 3.12
43+
if: ${{ matrix.python-version != 3.12 }}
44+
run: |
45+
pipx install kwja
4146
- name: Run tests for all files under examples/apply_*.py
4247
shell: bash
4348
run: |

.github/workflows/test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ on: [push, pull_request, workflow_dispatch]
55
jobs:
66
test:
77
name: Run tests with pytest
8-
container: kunlp/jumanpp-knp:ubuntu
9-
runs-on: ubuntu-20.04 # to meet the ubuntu version in the kunlp/jumanpp-knp:ubuntu container
8+
container: kunlp/jumanpp-knp:ubuntu22.04
9+
runs-on: ubuntu-22.04
1010
strategy:
11-
max-parallel: 6
11+
max-parallel: 5
1212
fail-fast: false
1313
matrix:
14-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
14+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1515
steps:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
1818
- name: Install required apt packages
1919
run: |
20-
apt update -y
21-
DEBIAN_FRONTEND=noninteractive apt install -y curl build-essential libsqlite3-dev libffi-dev
20+
export DEBIAN_FRONTEND=noninteractive
21+
apt-get update -yq
22+
apt-get install -yq curl build-essential libsqlite3-dev libffi-dev libssl-dev
2223
- name: Set up Python ${{ matrix.python-version }}
2324
uses: actions/setup-python@v4
2425
with:
2526
python-version: ${{ matrix.python-version }}
26-
allow-prereleases: true # TODO: Remove this line when Python 3.12 is released
2727
- name: Install Poetry
2828
run: |
2929
python3 -m pip install --user pipx
@@ -36,8 +36,8 @@ jobs:
3636
run: |
3737
poetry install --no-interaction --without dev,docs --extras=cli
3838
- name: Install KWJA
39-
# KWJA does not support Python 3.7 or 3.12
40-
if: ${{ matrix.python-version != 3.7 && matrix.python-version != 3.12 }}
39+
# KWJA does not support Python 3.12
40+
if: ${{ matrix.python-version != 3.12 }}
4141
run: |
4242
pipx install kwja
4343
kwja --model-size tiny --text "テスト"

.pre-commit-config.yaml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,50 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v4.5.0
44
hooks:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
77
- id: check-docstring-first
88
- id: check-yaml
99
- id: check-toml
1010
- id: check-added-large-files
11+
exclude: "assets/logo.*"
12+
- repo: https://github.com/astral-sh/ruff-pre-commit
13+
rev: v0.1.4
14+
hooks:
15+
- id: ruff
16+
args: [--fix, --exit-non-zero-on-fix]
1117
- repo: https://github.com/psf/black-pre-commit-mirror
12-
rev: 23.9.0
18+
rev: 23.11.0
1319
hooks:
1420
- id: black
15-
- repo: https://github.com/PyCQA/flake8
16-
rev: 6.1.0
17-
hooks:
18-
- id: flake8
19-
additional_dependencies: [Flake8-pyproject]
20-
- repo: https://github.com/PyCQA/isort
21-
rev: 5.12.0
22-
hooks:
23-
- id: isort
2421
- repo: https://github.com/MarcoGorelli/absolufy-imports
2522
rev: v0.3.1
2623
hooks:
2724
- id: absolufy-imports
2825
- repo: https://github.com/pre-commit/mirrors-mypy
29-
rev: v1.5.1
26+
rev: v1.6.1
3027
hooks:
3128
- id: mypy
3229
additional_dependencies:
33-
- types-PyYAML
30+
- typing-extensions
3431
- typer
32+
- types-PyYAML
3533
- rich
3634
- uvicorn
3735
- fastapi
38-
- markdown-it-py==2.2.0 # markdown-it-py 3.0.0 requires Python 3.8+
39-
- repo: https://github.com/asottile/pyupgrade
40-
rev: v3.10.1
41-
hooks:
42-
- id: pyupgrade
43-
args:
44-
- --py37-plus
36+
- jinja2
37+
- pygments
4538
- repo: https://github.com/PyCQA/pydocstyle
4639
rev: 6.3.0
4740
hooks:
4841
- id: pydocstyle
4942
- repo: https://github.com/pre-commit/mirrors-prettier
50-
rev: v3.0.2
43+
rev: v3.0.3
5144
hooks:
5245
- id: prettier
5346
- repo: https://github.com/Riverside-Healthcare/djLint
54-
rev: v1.32.1
47+
rev: v1.34.0
5548
hooks:
5649
- id: djlint-jinja
5750
- id: djlint-reformat-jinja

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ authors:
66
given-names: Hirokazu
77
- family-names: Ueda
88
given-names: Nobuhiro
9-
version: 1.2.0
9+
version: 1.6.0
1010
repository-code: "https://github.com/ku-nlp/rhoknp"
11-
date-released: 2023-02-07
11+
date-released: 2023-11-08

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ with open("result.jumanpp", "rt") as f:
5252

5353
## Requirements
5454

55-
- Python 3.7+
55+
- Python 3.8+
5656
- (Optional) [Juman++](https://github.com/ku-nlp/jumanpp) v2.0.0-rc3+
5757
- (Optional) [KNP](https://github.com/ku-nlp/knp) 5.0+
5858
- (Optional) [KWJA](https://github.com/ku-nlp/kwja) 1.0.0+

assets/logo-original.png

1.11 MB
Loading

0 commit comments

Comments
 (0)