11# Dash TailwindCSS Plugin
22
3- [ ![ GitHub] ( https://shields.io/badge/license-MIT-informational )] ( https://github.com/HogaStack/dash-tailwindcss-plugin/blob/main/LICENSE )
4- [ ![ PyPI] ( https://img.shields.io/pypi/v/dash-tailwindcss-plugin.svg?color=dark-green )] ( https://pypi.org/project/dash-tailwindcss-plugin/ )
3+ A plugin for integrating TailwindCSS with Plotly Dash applications using Dash 3.x hooks. Supports both Tailwind CSS v3 and v4.
4+
5+ [ ![ Tests] ( https://github.com/HogaStack/dash-tailwindcss-plugin/workflows/Tests/badge.svg )] ( https://github.com/HogaStack/dash-tailwindcss-plugin/actions )
6+ [ ![ Coverage] ( https://codecov.io/gh/HogaStack/dash-tailwindcss-plugin/branch/main/graph/badge.svg )] ( https://codecov.io/gh/HogaStack/dash-tailwindcss-plugin )
7+ [ ![ Python Version] ( https://img.shields.io/pypi/pyversions/dash-tailwindcss-plugin )] ( https://pypi.org/project/dash-tailwindcss-plugin/ )
8+ [ ![ PyPI] ( https://img.shields.io/pypi/v/dash-tailwindcss-plugin )] ( https://pypi.org/project/dash-tailwindcss-plugin/ )
59[ ![ Ruff] ( https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json )] ( https://github.com/astral-sh/ruff )
10+ [ ![ GitHub] ( https://shields.io/badge/license-MIT-informational )] ( https://github.com/HogaStack/dash-tailwindcss-plugin/blob/main/LICENSE )
611
712English | [ 简体中文] ( ./README-zh_CN.md )
813
9- A plugin for integrating TailwindCSS with Plotly Dash applications using Dash 3.x hooks. Supports both Tailwind CSS v3 and v4.
10-
1114## Features
1215
13161 . ** Online Mode** : Uses Tailwind CSS CDN for quick setup
@@ -34,16 +37,10 @@ Or for development:
3437pip install -e .
3538```
3639
37- For development with test dependencies:
40+ For development with all dependencies (including test dependencies) :
3841
3942``` bash
40- pip install -e .[test]
41- ```
42-
43- For development with both development and test dependencies:
44-
45- ``` bash
46- pip install -e .[dev,test]
43+ pip install -e .[dev]
4744```
4845
4946## Usage
@@ -231,23 +228,24 @@ if __name__ == "__main__":
231228
232229``` bash
233230dash-tailwindcss-plugin/
231+ ├── .github/
232+ │ └── workflows/
233+ │ └── test.yml # GitHub Actions workflow for testing
234234├── dash_tailwindcss_plugin/
235235│ ├── __init__.py # Exports main plugin function
236236│ ├── plugin.py # Main plugin implementation with _TailwindCSSPlugin class
237237│ ├── cli.py # Command-line interface with _TailwindCLI class
238238│ └── utils.py # Utility functions for Node.js management, file operations, etc.
239239├── tests/
240- │ ├── test_plugin.py # Unit tests for plugin core functionality
241- │ ├── test_utils.py # Unit tests for utility functions
240+ │ ├── README.md # English test documentation
241+ │ ├── README-zh_CN.md # Chinese test documentation
242+ │ ├── conftest.py # Pytest configuration fixtures
242243│ ├── test_cli.py # Unit tests for CLI interface
243- │ ├── test_integration.py # Integration tests for build process
244- │ ├── test_dash_simple.py # Simple Dash integration tests (no browser required)
245- │ ├── test_dash_integration.py # Dash end-to-end integration tests (requires browser automation)
246- │ └── test_dash_callbacks.py # Dash callback and layout tests
244+ │ ├── test_dash_integration.py # Dash end-to-end integration tests
245+ │ ├── test_plugin.py # Unit tests for plugin core functionality
246+ │ └── test_utils.py # Unit tests for utility functions
247247├── example_app.py # Example Dash application
248- ├── requirements.txt # Runtime dependencies
249- ├── requirements-test.txt # Test dependencies
250- ├── setup.py # Setup script for installation
248+ ├── requirements-dev.txt # Development and test dependencies
251249├── pyproject.toml # Build configuration
252250├── pytest.ini # Pytest configuration
253251├── ruff.toml # Ruff configuration (linting)
@@ -304,47 +302,24 @@ The plugin accepts the following parameters:
304302## Development
305303
3063041 . Clone the repository
307- 2 . Install dependencies: ` pip install -r requirements.txt `
308- 3 . Install test dependencies: ` pip install -r requirements-test.txt `
309- 4 . Install in development mode: ` pip install -e . `
310- 5 . Run example: ` python example_app.py `
311-
312- ### Optional Dependencies
313-
314- For development with test dependencies:
315-
316- ``` bash
317- pip install -e .[test]
318- ```
319-
320- For development with both development and test dependencies:
321-
322- ``` bash
323- pip install -e .[dev,test]
324- ```
305+ 2 . Install development dependencies: ` pip install -r requirements-dev.txt `
306+ 3 . Install in development mode: ` pip install -e . `
307+ 4 . Run example: ` python example_app.py `
325308
326309## Running Tests
327310
328- This project uses a layered testing approach:
329-
330- 1 . ** Basic tests** - Run without browser automation (recommended for most cases)
331- 2 . ** Advanced tests** - Require browser automation for end-to-end testing
332-
333311``` bash
334- # Install test dependencies
335- pip install -r requirements-test.txt
336-
337- # Run basic tests (no browser automation required)
338- python -m pytest tests/test_plugin.py tests/test_utils.py tests/test_cli.py tests/test_integration.py tests/test_dash_simple.py
312+ # Install development dependencies (includes test dependencies)
313+ pip install -r requirements-dev.txt
339314
340- # Run all tests (including those requiring browser automation)
315+ # Run all tests
341316python -m pytest tests/
342317
343318# Run specific test files
344319python -m pytest tests/test_plugin.py
345320python -m pytest tests/test_utils.py
346321python -m pytest tests/test_cli.py
347- python -m pytest tests/test_dash_simple .py
322+ python -m pytest tests/test_dash_integration .py
348323
349324# Run tests with verbose output
350325python -m pytest tests/ -v
0 commit comments