From 71db36118e52f927fcf76f2c80dc4f6578327e81 Mon Sep 17 00:00:00 2001 From: tarepan Date: Sun, 19 May 2024 09:48:43 +0000 Subject: [PATCH 01/11] =?UTF-8?q?refactor:=20`requirements-license.txt`=20?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-security.yml | 2 +- .github/workflows/test.yml | 4 +- .pre-commit-config.yaml | 6 --- CONTRIBUTING.md | 3 +- Dockerfile | 5 +- README.md | 1 - .../create_venv_and_generate_licenses.bash | 3 +- poetry.lock | 47 +------------------ pyproject.toml | 3 -- requirements-license.txt | 30 ------------ 10 files changed, 9 insertions(+), 95 deletions(-) delete mode 100644 requirements-license.txt diff --git a/.github/workflows/test-security.yml b/.github/workflows/test-security.yml index f12664256..9f433a7b5 100644 --- a/.github/workflows/test-security.yml +++ b/.github/workflows/test-security.yml @@ -31,7 +31,7 @@ jobs: run: pip install -r requirements-dev.txt - name: Check Python dependency security - run: safety check -r requirements.txt -r requirements-dev.txt -r requirements-test.txt -r requirements-license.txt -o bare + run: safety check -r requirements.txt -r requirements-dev.txt -r requirements-test.txt -o bare - name: Notify Discord of security testing result uses: sarisia/actions-status-discord@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7502fb61c..aa8f168a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,12 +44,10 @@ jobs: poetry export --without-hashes -o requirements.txt.check poetry export --without-hashes --with dev -o requirements-dev.txt.check poetry export --without-hashes --with test -o requirements-test.txt.check - poetry export --without-hashes --with license -o requirements-license.txt.check diff -q requirements.txt requirements.txt.check || \ diff -q requirements-dev.txt requirements-dev.txt.check || \ - diff -q requirements-test.txt requirements-test.txt.check || \ - diff -q requirements-license.txt requirements-license.txt.check > /dev/null + diff -q requirements-test.txt requirements-test.txt.check > /dev/null if [ $? = 1 ]; then echo "poetry export has some diff" exit 1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 59afb6d42..a1ee9d59b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,9 +34,3 @@ repos: language: python stages: [push] pass_filenames: false - - id: poetry-export-license - name: poetry-export-license - entry: poetry export --without-hashes --with license -o requirements-license.txt - language: python - stages: [push] - pass_filenames: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 98b276d79..be8a9cab9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -218,7 +218,6 @@ requirements.txt の更新 poetry export --without-hashes -o requirements.txt # こちらを更新する場合は下3つも更新する必要があります。 poetry export --without-hashes --with dev -o requirements-dev.txt poetry export --without-hashes --with test -o requirements-test.txt -poetry export --without-hashes --with license -o requirements-license.txt ``` #### ライセンス @@ -235,7 +234,7 @@ poetry export --without-hashes --with license -o requirements-license.txt 以下のコマンドにより脆弱性を診断できます: ```bash -safety check -r requirements.txt -r requirements-dev.txt -r requirements-test.txt -r requirements-license.txt +safety check -r requirements.txt -r requirements-dev.txt -r requirements-test.txt ``` ### API ドキュメントの確認 diff --git a/Dockerfile b/Dockerfile index 05c9feb73..6ebaac9e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -240,7 +240,7 @@ RUN sed -i "s/__version__ = \"latest\"/__version__ = \"${VOICEVOX_ENGINE_VERSION RUN sed -i "s/\"version\": \"999\\.999\\.999\"/\"version\": \"${VOICEVOX_ENGINE_VERSION}\"/" /opt/voicevox_engine/engine_manifest.json # Generate licenses.json -ADD ./requirements-license.txt /tmp/ +ADD ./requirements.txt /tmp/ RUN < /opt/voicevox_engine/engine_manifest_assets/dependency_licenses.json cp /opt/voicevox_engine/engine_manifest_assets/dependency_licenses.json /opt/voicevox_engine/licenses.json EOF diff --git a/README.md b/README.md index 5f8af7f8f..a2fca1cc6 100644 --- a/README.md +++ b/README.md @@ -651,7 +651,6 @@ poetry update # 全部更新 poetry export --without-hashes -o requirements.txt # こちらを更新する場合は下3つも更新する必要があります。 poetry export --without-hashes --with dev -o requirements-dev.txt poetry export --without-hashes --with test -o requirements-test.txt -poetry export --without-hashes --with license -o requirements-license.txt ``` #### ライセンス diff --git a/build_util/create_venv_and_generate_licenses.bash b/build_util/create_venv_and_generate_licenses.bash index 58af05e29..9f9954a30 100644 --- a/build_util/create_venv_and_generate_licenses.bash +++ b/build_util/create_venv_and_generate_licenses.bash @@ -18,7 +18,8 @@ else source $VENV_PATH/bin/activate fi -pip install -r requirements-license.txt +pip install -r requirements.txt +pip install "pip-licenses==4.4.0" python build_util/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" deactivate diff --git a/poetry.lock b/poetry.lock index 33a36d8ec..ff6494bcb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1457,23 +1457,6 @@ files = [ [package.dependencies] ptyprocess = ">=0.5" -[[package]] -name = "pip-licenses" -version = "4.4.0" -description = "Dump the software license list of Python packages installed with pip." -optional = false -python-versions = "~=3.8" -files = [ - {file = "pip-licenses-4.4.0.tar.gz", hash = "sha256:996817118375445243a34faafe23c06f6b2d250247c4046571b5a6722d45be69"}, - {file = "pip_licenses-4.4.0-py3-none-any.whl", hash = "sha256:dbad2ac5a25f574cabe2716f2f031a0c5fa359bed9b3ef615301f4e546893b46"}, -] - -[package.dependencies] -prettytable = ">=2.3.0" - -[package.extras] -test = ["docutils", "mypy", "pytest-cov", "pytest-pycodestyle", "pytest-runner"] - [[package]] name = "pkginfo" version = "1.10.0" @@ -1598,23 +1581,6 @@ nodeenv = ">=0.11.1" pyyaml = ">=5.1" virtualenv = ">=20.10.0" -[[package]] -name = "prettytable" -version = "3.10.0" -description = "A simple Python library for easily displaying tabular data in a visually appealing ASCII table format" -optional = false -python-versions = ">=3.8" -files = [ - {file = "prettytable-3.10.0-py3-none-any.whl", hash = "sha256:6536efaf0757fdaa7d22e78b3aac3b69ea1b7200538c2c6995d649365bddab92"}, - {file = "prettytable-3.10.0.tar.gz", hash = "sha256:9665594d137fb08a1117518c25551e0ede1687197cf353a4fdc78d27e1073568"}, -] - -[package.dependencies] -wcwidth = "*" - -[package.extras] -tests = ["pytest", "pytest-cov", "pytest-lazy-fixtures"] - [[package]] name = "ptyprocess" version = "0.7.0" @@ -2578,17 +2544,6 @@ platformdirs = ">=3.9.1,<5" docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2,!=7.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] -[[package]] -name = "wcwidth" -version = "0.2.13" -description = "Measures the displayed width of unicode strings in a terminal" -optional = false -python-versions = "*" -files = [ - {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, - {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, -] - [[package]] name = "xattr" version = "1.1.0" @@ -2680,4 +2635,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "a4cfe42e819d4c2cff33c601a24a9a6adff38f73b3c1fb6a1e28842d04a40f2f" +content-hash = "6d7b65a2217871dbf62cfb9b663f9b102ca30eb465c2ae3f9548bfad593cb2ac" diff --git a/pyproject.toml b/pyproject.toml index 765b10ba9..5fadba4e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,9 +78,6 @@ httpx = "^0.27.0" # NOTE: required by fastapi.testclient.TestClient syrupy = "^4.6.1" types-pyyaml = "^6.0.12" -[tool.poetry.group.license.dependencies] -pip-licenses = "^4.4.0" - [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" diff --git a/requirements-license.txt b/requirements-license.txt deleted file mode 100644 index de6854f80..000000000 --- a/requirements-license.txt +++ /dev/null @@ -1,30 +0,0 @@ -anyio==4.3.0 ; python_version >= "3.11" and python_version < "3.12" -cffi==1.16.0 ; python_version >= "3.11" and python_version < "3.12" -click==8.1.7 ; python_version >= "3.11" and python_version < "3.12" -colorama==0.4.6 ; python_version >= "3.11" and python_version < "3.12" and platform_system == "Windows" -cython==3.0.10 ; python_version >= "3.11" and python_version < "3.12" -fastapi-slim==0.111.0 ; python_version >= "3.11" and python_version < "3.12" -h11==0.14.0 ; python_version >= "3.11" and python_version < "3.12" -idna==3.7 ; python_version >= "3.11" and python_version < "3.12" -jinja2==3.1.4 ; python_version >= "3.11" and python_version < "3.12" -markupsafe==2.1.5 ; python_version >= "3.11" and python_version < "3.12" -numpy==1.26.4 ; python_version >= "3.11" and python_version < "3.12" -pip-licenses==4.4.0 ; python_version >= "3.11" and python_version < "3.12" -platformdirs==4.2.2 ; python_version >= "3.11" and python_version < "3.12" -prettytable==3.10.0 ; python_version >= "3.11" and python_version < "3.12" -pycparser==2.22 ; python_version >= "3.11" and python_version < "3.12" -pydantic==1.10.15 ; python_version >= "3.11" and python_version < "3.12" -pyopenjtalk @ git+https://github.com/VOICEVOX/pyopenjtalk@b35fc89fe42948a28e33aed886ea145a51113f88 ; python_version >= "3.11" and python_version < "3.12" -python-multipart==0.0.9 ; python_version >= "3.11" and python_version < "3.12" -pyworld==0.3.4 ; python_version >= "3.11" and python_version < "3.12" -pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "3.12" -semver==3.0.2 ; python_version >= "3.11" and python_version < "3.12" -six==1.16.0 ; python_version >= "3.11" and python_version < "3.12" -sniffio==1.3.1 ; python_version >= "3.11" and python_version < "3.12" -soundfile==0.12.1 ; python_version >= "3.11" and python_version < "3.12" -soxr==0.3.7 ; python_version >= "3.11" and python_version < "3.12" -starlette==0.37.2 ; python_version >= "3.11" and python_version < "3.12" -tqdm==4.66.4 ; python_version >= "3.11" and python_version < "3.12" -typing-extensions==4.11.0 ; python_version >= "3.11" and python_version < "3.12" -uvicorn==0.29.0 ; python_version >= "3.11" and python_version < "3.12" -wcwidth==0.2.13 ; python_version >= "3.11" and python_version < "3.12" From 71c1b55faf45d8bda2b575ae0d4917edaf222fa3 Mon Sep 17 00:00:00 2001 From: tarepan Date: Thu, 23 May 2024 09:55:38 +0000 Subject: [PATCH 02/11] =?UTF-8?q?fix:=20=E3=82=B3=E3=83=B3=E3=83=95?= =?UTF-8?q?=E3=83=AA=E3=82=AF=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index ff6494bcb..91ba9a10b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2635,4 +2635,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "6d7b65a2217871dbf62cfb9b663f9b102ca30eb465c2ae3f9548bfad593cb2ac" +content-hash = "df11938fb6e003e2e2a9e8559c135a09400aea4836e570a69f20dc48d3664812" From 14773de6b4db8418e92b06d397a2b721c6445330 Mon Sep 17 00:00:00 2001 From: tarepan Date: Mon, 27 May 2024 10:55:43 +0000 Subject: [PATCH 03/11] =?UTF-8?q?fix:=20lock=20=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 91ba9a10b..9f1c6884d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2635,4 +2635,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "df11938fb6e003e2e2a9e8559c135a09400aea4836e570a69f20dc48d3664812" +content-hash = "6e4c91c55fb47f905a4e68c2e6349b39247c54de91ce92fa010906b25a802fcb" From d4e47c0780f9ddfcbe4dead6d7a7e97a7367604f Mon Sep 17 00:00:00 2001 From: tarepan Date: Mon, 27 May 2024 11:22:42 +0000 Subject: [PATCH 04/11] =?UTF-8?q?refactor:=20`pip-license`=20=E3=82=92=20r?= =?UTF-8?q?equirements-test.txt=20=E3=81=A7=E3=83=90=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E6=8C=87=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 +- .../create_venv_and_generate_licenses.bash | 3 +- poetry.lock | 47 ++++++++++++++++++- pyproject.toml | 1 + requirements-test.txt | 3 ++ 5 files changed, 55 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ee5f1d3c9..2374c029e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -240,6 +240,7 @@ RUN sed -i "s/\"version\": \"999\\.999\\.999\"/\"version\": \"${VOICEVOX_ENGINE_ # Generate licenses.json ADD ./requirements.txt /tmp/ +ADD ./requirements-test.txt /tmp/ RUN < /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json cp /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json /opt/voicevox_engine/licenses.json EOF diff --git a/build_util/create_venv_and_generate_licenses.bash b/build_util/create_venv_and_generate_licenses.bash index 9f9954a30..26067ba20 100644 --- a/build_util/create_venv_and_generate_licenses.bash +++ b/build_util/create_venv_and_generate_licenses.bash @@ -19,7 +19,8 @@ else fi pip install -r requirements.txt -pip install "pip-licenses==4.4.0" +# requirements-test.txt でバージョン指定されている pip-licenses をインストールする +pip install $(cat requirements-test.txt | grep pip-licenses | cut -f 1 -d ';') python build_util/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" deactivate diff --git a/poetry.lock b/poetry.lock index 9f1c6884d..17ee8466b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1457,6 +1457,23 @@ files = [ [package.dependencies] ptyprocess = ">=0.5" +[[package]] +name = "pip-licenses" +version = "4.4.0" +description = "Dump the software license list of Python packages installed with pip." +optional = false +python-versions = "~=3.8" +files = [ + {file = "pip-licenses-4.4.0.tar.gz", hash = "sha256:996817118375445243a34faafe23c06f6b2d250247c4046571b5a6722d45be69"}, + {file = "pip_licenses-4.4.0-py3-none-any.whl", hash = "sha256:dbad2ac5a25f574cabe2716f2f031a0c5fa359bed9b3ef615301f4e546893b46"}, +] + +[package.dependencies] +prettytable = ">=2.3.0" + +[package.extras] +test = ["docutils", "mypy", "pytest-cov", "pytest-pycodestyle", "pytest-runner"] + [[package]] name = "pkginfo" version = "1.10.0" @@ -1581,6 +1598,23 @@ nodeenv = ">=0.11.1" pyyaml = ">=5.1" virtualenv = ">=20.10.0" +[[package]] +name = "prettytable" +version = "3.10.0" +description = "A simple Python library for easily displaying tabular data in a visually appealing ASCII table format" +optional = false +python-versions = ">=3.8" +files = [ + {file = "prettytable-3.10.0-py3-none-any.whl", hash = "sha256:6536efaf0757fdaa7d22e78b3aac3b69ea1b7200538c2c6995d649365bddab92"}, + {file = "prettytable-3.10.0.tar.gz", hash = "sha256:9665594d137fb08a1117518c25551e0ede1687197cf353a4fdc78d27e1073568"}, +] + +[package.dependencies] +wcwidth = "*" + +[package.extras] +tests = ["pytest", "pytest-cov", "pytest-lazy-fixtures"] + [[package]] name = "ptyprocess" version = "0.7.0" @@ -2544,6 +2578,17 @@ platformdirs = ">=3.9.1,<5" docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2,!=7.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] +[[package]] +name = "wcwidth" +version = "0.2.13" +description = "Measures the displayed width of unicode strings in a terminal" +optional = false +python-versions = "*" +files = [ + {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, + {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, +] + [[package]] name = "xattr" version = "1.1.0" @@ -2635,4 +2680,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "6e4c91c55fb47f905a4e68c2e6349b39247c54de91ce92fa010906b25a802fcb" +content-hash = "5eac386a3feb7a807cd665aff169f044fbb385b916f43a7d51d1913cada65f97" diff --git a/pyproject.toml b/pyproject.toml index 8225be6cc..d34f9eefb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,7 @@ httpx = "^0.27.0" # NOTE: required by fastapi.testclient.TestClient syrupy = "^4.6.1" types-pyyaml = "^6.0.12" safety = "^3.1.0" +pip-licenses = "4.4.0" # NOTE: バージョンを一意に指定すること (#1281 を参照) [tool.poetry.group.build.dependencies] pyinstaller = "^5.13" diff --git a/requirements-test.txt b/requirements-test.txt index d60bdf090..bc1b3d4da 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -53,12 +53,14 @@ numpy==1.26.4 ; python_version >= "3.11" and python_version < "3.12" packaging==24.0 ; python_version >= "3.11" and python_version < "3.12" pathspec==0.12.1 ; python_version >= "3.11" and python_version < "3.12" pexpect==4.9.0 ; python_version >= "3.11" and python_version < "3.12" +pip-licenses==4.4.0 ; python_version >= "3.11" and python_version < "3.12" pkginfo==1.10.0 ; python_version >= "3.11" and python_version < "3.12" platformdirs==4.2.2 ; python_version >= "3.11" and python_version < "3.12" pluggy==1.5.0 ; python_version >= "3.11" and python_version < "3.12" poetry-core==1.9.0 ; python_version >= "3.11" and python_version < "3.12" poetry-plugin-export==1.8.0 ; python_version >= "3.11" and python_version < "3.12" poetry==1.8.2 ; python_version >= "3.11" and python_version < "3.12" +prettytable==3.10.0 ; python_version >= "3.11" and python_version < "3.12" ptyprocess==0.7.0 ; python_version >= "3.11" and python_version < "3.12" pycodestyle==2.11.1 ; python_version >= "3.11" and python_version < "3.12" pycparser==2.22 ; python_version >= "3.11" and python_version < "3.12" @@ -102,5 +104,6 @@ unidiff==0.7.5 ; python_version >= "3.11" and python_version < "3.12" urllib3==2.2.1 ; python_version >= "3.11" and python_version < "3.12" uvicorn==0.29.0 ; python_version >= "3.11" and python_version < "3.12" virtualenv==20.26.2 ; python_version >= "3.11" and python_version < "3.12" +wcwidth==0.2.13 ; python_version >= "3.11" and python_version < "3.12" xattr==1.1.0 ; python_version >= "3.11" and python_version < "3.12" and sys_platform == "darwin" zipp==3.18.1 ; python_version >= "3.11" and python_version < "3.12" From b4493132af3feda18a6794c9e3b5384e8aff7970 Mon Sep 17 00:00:00 2001 From: tarepan Date: Mon, 27 May 2024 11:29:38 +0000 Subject: [PATCH 05/11] fix: lint --- Dockerfile | 2 +- build_util/create_venv_and_generate_licenses.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2374c029e..41a08eb39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -252,7 +252,7 @@ RUN < /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json cp /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json /opt/voicevox_engine/licenses.json EOF diff --git a/build_util/create_venv_and_generate_licenses.bash b/build_util/create_venv_and_generate_licenses.bash index 26067ba20..c7617135c 100644 --- a/build_util/create_venv_and_generate_licenses.bash +++ b/build_util/create_venv_and_generate_licenses.bash @@ -20,7 +20,7 @@ fi pip install -r requirements.txt # requirements-test.txt でバージョン指定されている pip-licenses をインストールする -pip install $(cat requirements-test.txt | grep pip-licenses | cut -f 1 -d ';') +pip install $(grep pip-licenses < requirements-test.txt | cut -f 1 -d ';') python build_util/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" deactivate From fa474a7859394d85b9e0b8c345b23005addd32f5 Mon Sep 17 00:00:00 2001 From: tarepan Date: Mon, 27 May 2024 11:32:20 +0000 Subject: [PATCH 06/11] fix: lint --- Dockerfile | 2 +- build_util/create_venv_and_generate_licenses.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 41a08eb39..2054fd2f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -252,7 +252,7 @@ RUN < /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json cp /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json /opt/voicevox_engine/licenses.json EOF diff --git a/build_util/create_venv_and_generate_licenses.bash b/build_util/create_venv_and_generate_licenses.bash index c7617135c..b1edabe4a 100644 --- a/build_util/create_venv_and_generate_licenses.bash +++ b/build_util/create_venv_and_generate_licenses.bash @@ -20,7 +20,7 @@ fi pip install -r requirements.txt # requirements-test.txt でバージョン指定されている pip-licenses をインストールする -pip install $(grep pip-licenses < requirements-test.txt | cut -f 1 -d ';') +pip install "$(grep pip-licenses < requirements-test.txt | cut -f 1 -d ';')" python build_util/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" deactivate From 75ed09bb27a68c4e918b6d7155f5db322fe80a77 Mon Sep 17 00:00:00 2001 From: tarepan Date: Mon, 27 May 2024 11:47:41 +0000 Subject: [PATCH 07/11] fix: codec --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d34f9eefb..db9c6fa4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ httpx = "^0.27.0" # NOTE: required by fastapi.testclient.TestClient syrupy = "^4.6.1" types-pyyaml = "^6.0.12" safety = "^3.1.0" -pip-licenses = "4.4.0" # NOTE: バージョンを一意に指定すること (#1281 を参照) +pip-licenses = "4.4.0" # NOTE: must be specified exactly (c.f. #1281) [tool.poetry.group.build.dependencies] pyinstaller = "^5.13" From aa6702548b5bb32e420648c6a2d8ea6ec99b71df Mon Sep 17 00:00:00 2001 From: tarepan Date: Wed, 29 May 2024 03:36:36 +0000 Subject: [PATCH 08/11] =?UTF-8?q?fix:=20=E4=BE=9D=E5=AD=98=E6=80=A7?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 2 +- requirements-test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index 17ee8466b..ddcf5d9be 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2680,4 +2680,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "5eac386a3feb7a807cd665aff169f044fbb385b916f43a7d51d1913cada65f97" +content-hash = "4956fc6ff20dbd1554f321986310c0b9c7ae3073d63c8e324946ebfac9aa2bec" diff --git a/requirements-test.txt b/requirements-test.txt index 5e6e3d32d..ee2284251 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -63,8 +63,8 @@ pluggy==1.5.0 ; python_version >= "3.11" and python_version < "3.12" poetry-core==1.9.0 ; python_version >= "3.11" and python_version < "3.12" poetry-plugin-export==1.8.0 ; python_version >= "3.11" and python_version < "3.12" poetry==1.8.2 ; python_version >= "3.11" and python_version < "3.12" -prettytable==3.10.0 ; python_version >= "3.11" and python_version < "3.12" pre-commit==2.21.0 ; python_version >= "3.11" and python_version < "3.12" +prettytable==3.10.0 ; python_version >= "3.11" and python_version < "3.12" ptyprocess==0.7.0 ; python_version >= "3.11" and python_version < "3.12" pycodestyle==2.11.1 ; python_version >= "3.11" and python_version < "3.12" pycparser==2.22 ; python_version >= "3.11" and python_version < "3.12" From 6eae58e8ad280abfa06e399656c3ef470f1bb9ae Mon Sep 17 00:00:00 2001 From: tarepan Date: Sun, 2 Jun 2024 16:20:46 +0000 Subject: [PATCH 09/11] fix: merge --- Dockerfile | 6 +++--- build_util/create_venv_and_generate_licenses.bash | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 19dfab8de..053cfd4ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -242,7 +242,7 @@ RUN sed -i "s/\"version\": \"999\\.999\\.999\"/\"version\": \"${VOICEVOX_ENGINE_ # Generate licenses.json ADD ./requirements.txt /tmp/ -ADD ./requirements-test.txt /tmp/ +ADD ./requirements-dev.txt /tmp/ RUN < /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json cp /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json /opt/voicevox_engine/licenses.json EOF diff --git a/build_util/create_venv_and_generate_licenses.bash b/build_util/create_venv_and_generate_licenses.bash index b1edabe4a..e63252987 100644 --- a/build_util/create_venv_and_generate_licenses.bash +++ b/build_util/create_venv_and_generate_licenses.bash @@ -19,8 +19,8 @@ else fi pip install -r requirements.txt -# requirements-test.txt でバージョン指定されている pip-licenses をインストールする -pip install "$(grep pip-licenses < requirements-test.txt | cut -f 1 -d ';')" +# requirements-dev.txt でバージョン指定されている pip-licenses をインストールする +pip install "$(grep pip-licenses < requirements-dev.txt | cut -f 1 -d ';')" python build_util/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" deactivate From 791960ca5e9b26799b65ac0d34ba8e1816a54cb5 Mon Sep 17 00:00:00 2001 From: tarepan Date: Sun, 2 Jun 2024 16:23:42 +0000 Subject: [PATCH 10/11] =?UTF-8?q?refactor:=20bash=20=E3=82=B3=E3=83=9E?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=82=92=E7=B0=A1=E7=95=A5=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_util/create_venv_and_generate_licenses.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_util/create_venv_and_generate_licenses.bash b/build_util/create_venv_and_generate_licenses.bash index e63252987..4e3d25fe8 100644 --- a/build_util/create_venv_and_generate_licenses.bash +++ b/build_util/create_venv_and_generate_licenses.bash @@ -20,7 +20,7 @@ fi pip install -r requirements.txt # requirements-dev.txt でバージョン指定されている pip-licenses をインストールする -pip install "$(grep pip-licenses < requirements-dev.txt | cut -f 1 -d ';')" +pip install "$(grep pip-licenses requirements-dev.txt | cut -f 1 -d ';')" python build_util/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}" deactivate From 53a1e69c6f3dd317f4feaeaf27ed8c4001b675dd Mon Sep 17 00:00:00 2001 From: tarepan Date: Sun, 2 Jun 2024 16:29:15 +0000 Subject: [PATCH 11/11] =?UTF-8?q?fix:=20bash=20=E7=9C=81=E7=95=A5=E3=81=AE?= =?UTF-8?q?=E5=8F=8D=E6=98=A0=E5=BF=98=E3=82=8C=E3=82=92=E8=A8=82=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 053cfd4ef..6ca8eff2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -254,7 +254,7 @@ RUN < /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json cp /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json /opt/voicevox_engine/licenses.json EOF