diff --git a/CHANGELOG.md b/CHANGELOG.md index a801ef9..330de1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 2.14.0 + +- [#129](https://github.com/oliverandrich/django-tailwind-cli/pull/129) by [@Tobi-De](https://github.com/Tobi-De) add a setting to allow for custom tailwind source repo +- Bumped default version of tailwindcss to 3.4.10. + ## 2.13.0 - [#127](https://github.com/oliverandrich/django-tailwind-cli/pull/127) diff --git a/justfile b/justfile index 91de227..625188f 100644 --- a/justfile +++ b/justfile @@ -42,9 +42,12 @@ VENV_DIRNAME := ".venv" # run test suite @test *ARGS: create_venv + $VENV_DIRNAME/bin/python -m pytest {{ ARGS }} + +# run test suite with coverage +@coverage *ARGS: create_venv $VENV_DIRNAME/bin/python -m coverage erase - $VENV_DIRNAME/bin/python -m nox --force-venv-backend uv {{ ARGS }} - $VENV_DIRNAME/bin/python -m coverage report + $VENV_DIRNAME/bin/python -m pytest --cov --cov-append {{ ARGS }} $VENV_DIRNAME/bin/python -m coverage html @build-docs: diff --git a/src/django_tailwind_cli/__init__.py b/src/django_tailwind_cli/__init__.py index 930e2cd..d0979fd 100644 --- a/src/django_tailwind_cli/__init__.py +++ b/src/django_tailwind_cli/__init__.py @@ -1 +1 @@ -__version__ = "2.13.0" +__version__ = "2.14.0" diff --git a/src/django_tailwind_cli/utils.py b/src/django_tailwind_cli/utils.py index 0f1d2b3..130e7cf 100644 --- a/src/django_tailwind_cli/utils.py +++ b/src/django_tailwind_cli/utils.py @@ -18,7 +18,7 @@ class Config: @property def tailwind_version(self) -> str: - return getattr(settings, "TAILWIND_CLI_VERSION", "3.4.4") + return getattr(settings, "TAILWIND_CLI_VERSION", "3.4.10") @property def cli_path(self) -> Union[Path, None]: @@ -45,9 +45,7 @@ def config_file(self) -> str: @property def src_repo(self) -> str: - return getattr( - settings, "TAILWIND_CLI_SRC_REPO", "tailwindlabs/tailwindcss" - ) + return getattr(settings, "TAILWIND_CLI_SRC_REPO", "tailwindlabs/tailwindcss") @staticmethod def validate_settings() -> None: diff --git a/tests/test_utils.py b/tests/test_utils.py index 17d49cb..b0aba43 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -9,13 +9,13 @@ def configure_settings(settings): def test_default_config(config): - assert "3.4.4" == config.tailwind_version + assert "3.4.10" == config.tailwind_version assert Path("~/.local/bin/").expanduser() == config.cli_path assert config.src_css is None assert "css/tailwind.css" == config.dist_css assert "tailwind.config.js" == config.config_file - assert "3.4.4" in config.get_download_url() - assert "3.4.4" in str(config.get_full_cli_path()) + assert "3.4.10" in config.get_download_url() + assert "3.4.10" in str(config.get_full_cli_path()) def test_validate_settigns(config, settings): @@ -99,10 +99,10 @@ def test_get_download_url(config, mocker, platform, machine, result): @pytest.mark.parametrize( "platform,machine,result", [ - ("Windows", "x86_64", "tailwindcss-windows-x64-3.4.4.exe"), - ("Windows", "amd64", "tailwindcss-windows-x64-3.4.4.exe"), - ("Darwin", "aarch64", "tailwindcss-macos-arm64-3.4.4"), - ("Darwin", "arm64", "tailwindcss-macos-arm64-3.4.4"), + ("Windows", "x86_64", "tailwindcss-windows-x64-3.4.10.exe"), + ("Windows", "amd64", "tailwindcss-windows-x64-3.4.10.exe"), + ("Darwin", "aarch64", "tailwindcss-macos-arm64-3.4.10"), + ("Darwin", "arm64", "tailwindcss-macos-arm64-3.4.10"), ], ) def test_get_full_cli_path(config, mocker, platform, machine, result): diff --git a/tox.ini b/tox.ini index 7506e46..34de025 100644 --- a/tox.ini +++ b/tox.ini @@ -1,44 +1,29 @@ [tox] isolated_build = true envlist = - django32-py{39,310} - django42-py{39,310,311,312} + django42-py{38,39,310,311,312} django50-py{310,311,312} - django51-py{310,311,312,313} + django51-py{310,311,312} [gh-actions] python = + 3.9: py38 3.9: py39 3.10: py310 3.11: py311 3.12: py312 - 3.13: py313 [testenv] package = wheel wheel_build_env = .pkg deps = pytest - pytest-cov pytest-mock pytest-django setuptools;python_version<'3.10' - django32: Django>=3.2,<4.0 django42: Django>=4.2,<5.0 django50: Django>=5.0,<5.1 - django51: Django>=5.1a1,<5.2 + django51: Django>=5.1,<5.2 extras = django-extensions commands = - pytest --cov-append - -[testenv:clean] -deps = coverage[toml] -skip_install = true -commands = coverage erase - -[testenv:report] -deps = coverage[toml] -skip_install = true -commands = - coverage report - coverage html + pytest