Skip to content

Commit

Permalink
Merged pull-request #129 and bumped version to 2.14.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverandrich committed Sep 4, 2024
1 parent 28cfe68 commit 1b88bb6
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 34 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
7 changes: 5 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/django_tailwind_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.13.0"
__version__ = "2.14.0"
6 changes: 2 additions & 4 deletions src/django_tailwind_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand All @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down
25 changes: 5 additions & 20 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1b88bb6

Please sign in to comment.