From 926ef2e67d6505514856af48f4df0e0267d9e59d Mon Sep 17 00:00:00 2001 From: Jacob Pavlock Date: Wed, 2 Apr 2025 21:05:10 -0500 Subject: [PATCH 1/7] refactor: update pyright typing --- moe_transcode/transcode_core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moe_transcode/transcode_core.py b/moe_transcode/transcode_core.py index 0cea10a..ff04180 100644 --- a/moe_transcode/transcode_core.py +++ b/moe_transcode/transcode_core.py @@ -28,7 +28,9 @@ @moe.hookimpl def add_config_validator(settings: dynaconf.base.LazySettings): """Validate move plugin configuration settings.""" - settings.validators.register( + assert isinstance(settings.library_path, str) + + settings.validators.register( # type: ignore dynaconf.Validator( "TRANSCODE.TRANSCODE_PATH", default=Path(settings.library_path) / "transcode", From 4ebdb485c7d055eb2be9d10019a76fc5e71adbf9 Mon Sep 17 00:00:00 2001 From: Jacob Pavlock Date: Wed, 2 Apr 2025 21:05:35 -0500 Subject: [PATCH 2/7] ci(tox): add tox --- pyproject.toml | 1 + tox.ini | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 tox.ini diff --git a/pyproject.toml b/pyproject.toml index b7c6f85..da7fa63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ moe = "^2.0.0" debugpy = "^1.4.1" pytest = "^8.0.0" pytest-cov = "^4.0.0" +tox = "^4.0.0" [tool.poetry.group.lint.dependencies] black = "^24.0.0" diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..d5353a5 --- /dev/null +++ b/tox.ini @@ -0,0 +1,29 @@ +[tox] +skipsdist= true +envlist = py{39,310,311,312,313}-test, docs, lint + +[testenv] +description = unit tests +skip_install = true +allowlist_externals = poetry, echo +commands_pre = + poetry install --without docs,lint +commands = poetry run pytest {posargs} + +[testenv:lint] +description = lint tests +basepython = 3.13 +commands_pre = + poetry install +commands = + poetry run pre-commit run --all-files + poetry run cz check --rev-range "$(git describe --tags --abbrev=0)..HEAD" + +[testenv:docs] +description = docs tests +basepython = 3.13 +skip_install = true +allowlist_externals = poetry +commands_pre = + poetry install --without lint,test +commands = poetry run sphinx-build -W -b html docs {envtmpdir}/html {posargs} From d1a588f9722fc1d20a330efb86260a5022b8680a Mon Sep 17 00:00:00 2001 From: Jacob Pavlock Date: Wed, 2 Apr 2025 21:05:59 -0500 Subject: [PATCH 3/7] build: update dependencies --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index da7fa63..86f9b51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ moe = "^2.0.0" [tool.poetry.group.test.dependencies] debugpy = "^1.4.1" pytest = "^8.0.0" -pytest-cov = "^4.0.0" +pytest-cov = "^6.0.0" tox = "^4.0.0" [tool.poetry.group.lint.dependencies] @@ -26,12 +26,12 @@ flake8-alphabetize = "^0.0.19" flake8-bugbear = "^24.0.0" flake8-comprehensions = "^3.10.0" flake8-docstrings = "^1.5.0" -flake8-pytest-style = "^1.6.0" +flake8-pytest-style = "^2.0.0" flake8-use-fstring = "^1.1" -"github3.py" = "^3.2.0" +"github3.py" = "^4.0.0" isort = "^5.10.1" mccabe = "^0.7.0" -pre-commit = "^3.0.0" +pre-commit = "^4.0.0" pyright = "^1.1.267" [tool.poetry.group.docs.dependencies] From 63694d2405d4f4a9362d88ec1caa19f08faadc34 Mon Sep 17 00:00:00 2001 From: Jacob Pavlock Date: Wed, 2 Apr 2025 21:06:15 -0500 Subject: [PATCH 4/7] build: support python 3.13 --- .github/workflows/ci.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b42752..bcd2efb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: runs-on: ${{ matrix.platform }} strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] platform: [ubuntu-latest, windows-latest, macos-latest] steps: diff --git a/pyproject.toml b/pyproject.toml index 86f9b51..4e25df1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ license = "MIT" readme = "README.rst" [tool.poetry.dependencies] -python = ">=3.9,<3.13" +python = ">=3.9,<3.14" moe = "^2.0.0" [tool.poetry.group.test.dependencies] From 8f88ce476ff92f86f8bc4cd892ea35cf68fdf70d Mon Sep 17 00:00:00 2001 From: Jacob Pavlock Date: Wed, 2 Apr 2025 21:06:23 -0500 Subject: [PATCH 5/7] ci: migrate pre-commit config --- .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 ad67d0a..a19b56a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -default_stages: [commit] +default_stages: [pre-commit] repos: - repo: local From aea98e783799f37c988fbaa9b0d05ace2366e8ce Mon Sep 17 00:00:00 2001 From: Jacob Pavlock Date: Wed, 2 Apr 2025 21:06:36 -0500 Subject: [PATCH 6/7] ci: add quotes around bash command --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcd2efb..c5fc52e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: - name: Lint run: | poetry run pre-commit run --all-files - poetry run cz check --rev-range $(git describe --tags --abbrev=0)..HEAD + poetry run cz check --rev-range "$(git describe --tags --abbrev=0)..HEAD" test: runs-on: ${{ matrix.platform }} From 1deceb7fa6d7ccec06781dace79da88347180767 Mon Sep 17 00:00:00 2001 From: Jacob Pavlock Date: Wed, 2 Apr 2025 21:12:04 -0500 Subject: [PATCH 7/7] ci: support mac ARM Switched as the old setup-ffmpeg did not support the lastest ARM MacOS releases. https://github.com/federicocarboni/setup-ffmpeg/issues/21 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5fc52e..577c914 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: FedericoCarboni/setup-ffmpeg@v3 + - uses: AnimMouse/setup-ffmpeg@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -82,7 +82,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: FedericoCarboni/setup-ffmpeg@v3 + - uses: AnimMouse/setup-ffmpeg@v1 - name: Set up Python uses: actions/setup-python@v5