diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b42752..577c914 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,18 +30,18 @@ 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 }} 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: - 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 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 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", diff --git a/pyproject.toml b/pyproject.toml index b7c6f85..4e25df1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,13 +8,14 @@ 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] 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] black = "^24.0.0" @@ -25,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] 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}