Skip to main content

wex_addon_dev_css

Version: 6.0.79

wex_addon_dev_css registers a CssAddonManager — a named subclass of AbstractAddonManager — into the wex CLI kernel, making it the entry point for CSS development tooling within the wex addon ecosystem. It carries no commands of its own; its role is to give the kernel a named CSS addon slot that other packages and addons can target. It is intended for developers working inside the wex ecosystem who need CSS tooling exposed through the CLI.

Table of Contents

Installation

pip install wexample-wex-addon-dev-css

Requires Python >=3.10.

Quickstart

Install the package:

pip install wexample-wex-addon-dev-css

The public entry point is CssAddonManager, defined in src/wexample_wex_addon_dev_css/css_addon_manager.py:

from wexample_wex_addon_dev_css.css_addon_manager import CssAddonManager

Pass it to the kernel's setup() call to register the CSS addon slot:

from wexample_wex_core.common.kernel import Kernel

kernel = Kernel()
kernel.setup(addons=[CssAddonManager])

After setup() returns, the kernel holds a css addon entry (the name is derived from the class by stripping the AddonManager suffix). Other packages that target the CSS slot can then resolve it via kernel.get_addons()["css"]. The manager itself carries no commands; its presence in the addon list is the registration.

Tests

This project uses pytest for testing and pytest-cov for code coverage analysis.

Installation

First, install the required testing dependencies:

.venv/bin/python -m pip install pytest pytest-cov

Basic Usage

Run all tests with coverage:

.venv/bin/python -m pytest --cov --cov-report=html

Common Commands

# Run tests with coverage for a specific module
.venv/bin/python -m pytest --cov=your_module

# Show which lines are not covered
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing

# Generate an HTML coverage report
.venv/bin/python -m pytest --cov=your_module --cov-report=html

# Combine terminal and HTML reports
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html

# Run specific test file with coverage
.venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing

Viewing HTML Reports

After generating an HTML report, open htmlcov/index.html in your browser to view detailed line-by-line coverage information.

Coverage Threshold

To enforce a minimum coverage percentage:

.venv/bin/python -m pytest --cov=your_module --cov-fail-under=80

This will cause the test suite to fail if coverage drops below 80%.

Architecture

The package contains one Python module under src/wexample_wex_addon_dev_css/. Its entire public surface is CssAddonManager, defined in src/wexample_wex_addon_dev_css/css_addon_manager.py.

Parts

CssAddonManager subclasses AbstractAddonManager from wexample_wex_core and adds nothing — its body is pass. All behaviour comes from the base class.

AbstractAddonManager (in wexample-wex-core) carries the registration logic. It inherits from:

  • AbstractKernelChild — gives the instance a reference to the kernel that owns it.
  • HasSnakeShortClassNameClassMixin — derives the addon slot name by stripping the AddonManager suffix from the class name and snake-casing the result. CssAddonManager → Css → css.
  • WithWorkdirMixin — sets the addon's workdir to the directory of the class file during __attrs_post_init__.
  • HasTwoStepInit — enforces the two-phase attrs initialisation pattern the kernel uses for all its children.

The base class exposes hook methods (get_command_resolver_classes, get_middlewares_classes, get_step_guard_classes, get_workdir_types, etc.) that a richer addon would override. CssAddonManager inherits all of them and returns their defaults (empty lists/dicts).

Registration path

  1. A caller constructs a kernel and passes CssAddonManager in the addons list to kernel.setup().
  2. The kernel instantiates the class, triggering __attrs_post_init__, which calls _init_workdir with the directory containing src/wexample_wex_addon_dev_css/css_addon_manager.py as the entrypoint path.
  3. The kernel indexes the instance under the key css (the result of CssAddonManager.get_name()).
  4. Any downstream package that needs the CSS slot calls kernel.get_addons()["css"] to retrieve the manager.

The package itself issues no CLI commands and registers no resolvers. Its only job is to occupy the css slot so that other packages in the ecosystem have a stable, named target to extend or query.

Package layout

src/
└── wexample_wex_addon_dev_css/
    ├── __init__.py          # empty
    ├── py.typed             # PEP 561 marker
    └── css_addon_manager.py # CssAddonManager

The build backend is pdm-backend. pyproject.toml declares one runtime dependency group: wexample-wex-addon-app, which pulls in the wex-core base classes; plus attrs and cattrs for the attrs-based init pattern.

Integration in the Suite

This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.

The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.

Visit the Wexample Suite documentation for the complete package ecosystem.

Dependencies

  • attrs: >=23.1.0
  • cattrs: >=23.1.0
  • wexample-wex-addon-app: >=32.2.0

Versioning & Compatibility Policy

Wexample packages follow Semantic Versioning (SemVer):

  • MAJOR: Breaking changes
  • MINOR: New features, backward compatible
  • PATCH: Bug fixes, backward compatible

We maintain backward compatibility within major versions and provide clear migration guides for breaking changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Free to use in both personal and commercial projects.

About us

Wexample stands as a cornerstone of the digital ecosystem — a collective of seasoned engineers, researchers, and creators driven by a relentless pursuit of technological excellence. More than a media platform, it has grown into a vibrant community where innovation meets craftsmanship, and where every line of code reflects a commitment to clarity, durability, and shared intelligence.

This packages suite embodies this spirit. Trusted by professionals and enthusiasts alike, it delivers a consistent, high-quality foundation for modern development — open, elegant, and battle-tested. Its reputation is built on years of collaboration, refinement, and rigorous attention to detail, making it a natural choice for those who demand both robustness and beauty in their tools.

Wexample cultivates a culture of mastery. Each package, each contribution carries the mark of a community that values precision, ethics, and innovation — a community proud to shape the future of digital craftsmanship.

Known Limitations & Roadmap

Current limitations and planned features are tracked in the GitHub issues.

See the project roadmap for upcoming features and improvements.

Status & Compatibility

Maturity: Production-ready

Python Support: >=3.10

OS Support: Linux, macOS, Windows

Status: Actively maintained

Migration Notes

When upgrading between major versions, refer to the migration guides in the documentation.

Breaking changes are clearly documented with upgrade paths and examples.

Metadata

Release files for wexample-wex-addon-dev-css 6.0.79

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wexample-wex-addon-dev-css 6.0.79
File Size Uploaded
wexample_wex_addon_dev_css-6.0.79.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wexample-wex-addon-dev-css 6.0.79
File Interpreter ABI Platform
wexample_wex_addon_dev_css-6.0.79-py3-none-any.whl Python 3 none any Details

Total release size: 10.6 kB

Release files / wexample_wex_addon_dev_css-6.0.79.tar.gz

Download URL wexample_wex_addon_dev_css-6.0.79.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b321ef68c0e45f27afb69a07b2e8010f587be436feb064d450bdb49c0836b6ad
BLAKE2b-256 checksum
How to use checksums
169c7e14be821c24dd2e93e35731919298c30264f12ecd6f8b8dd993b13f61b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.25.9 CPython/3.12.3 Linux/6.8.0-139-generic

Release files / wexample_wex_addon_dev_css-6.0.79-py3-none-any.whl

Download URL wexample_wex_addon_dev_css-6.0.79-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3ccadd621f879362904d2637f74691476711d38840b1bd9a6c2a97db1040ea5
BLAKE2b-256 checksum
How to use checksums
72cb8316a2538b4eda5fc04a248b5557a541bfaa2a399f4c476af64b0d6bf44a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.25.9 CPython/3.12.3 Linux/6.8.0-139-generic

Release history Release notifications | RSS feed

6.0.84

2 release files

6.0.83

2 release files

6.0.82

2 release files

This release

6.0.79 This release

2 release files

6.0.77

2 release files

6.0.76

2 release files

6.0.74

2 release files

6.0.73

2 release files

6.0.72

2 release files

6.0.69

2 release files

6.0.68

2 release files

6.0.67

2 release files

6.0.66

2 release files

6.0.65

2 release files

6.0.64

2 release files

6.0.63

2 release files

6.0.62

2 release files

6.0.61

2 release files

6.0.60

2 release files

6.0.59

2 release files

6.0.53

2 release files

6.0.52

2 release files

6.0.51

2 release files

6.0.50

2 release files

6.0.49

2 release files

6.0.48

2 release files

6.0.47

2 release files

6.0.46

2 release files

6.0.45

2 release files

6.0.44

2 release files

6.0.43

2 release files

6.0.42

2 release files

6.0.41

2 release files

6.0.40

2 release files

6.0.39

2 release files

6.0.38

2 release files

6.0.36

2 release files

6.0.35

2 release files

6.0.34

2 release files

6.0.33

2 release files

6.0.32

2 release files

6.0.31

2 release files

6.0.27

2 release files

6.0.26

2 release files

6.0.25

2 release files

6.0.24

2 release files

6.0.23

2 release files

6.0.22

2 release files

6.0.21

2 release files

6.0.20

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.9

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page