Skip to main content

wex_addon_filestate

Version: 6.2.26

wex-addon-filestate plugs wexample-filestate's declarative file-tree reconciliation engine into the wex CLI as a first-class addon. It is installed as the Python package wexample-wex-addon-filestate and targets developers who work inside a wex project and want file-state management available as wex commands alongside the rest of their CLI tooling.

Table of Contents

Installation

pip install wexample-wex-addon-filestate

Requires Python >=3.10.

Quickstart

Install the package:

pip install wexample-wex-addon-filestate

The one thing the package provides is FilestateAddonManager. Pass it to a wex Kernel via setup() to register the filestate integration:

from pathlib import Path
from wexample_wex_core.common.kernel import Kernel
from wexample_wex_addon_filestate.filestate_addon_manager import FilestateAddonManager

kernel = Kernel(entrypoint_path=Path(".wex"))
kernel.setup(addons=[FilestateAddonManager])

print("filestate" in kernel.get_addons())  # True

kernel.get_addons() returns a dict keyed by the short snake-case class name, so "filestate" confirms the addon is live. Once registered, the filestate workdir reconciliation engine is active for that kernel instance; any commands the addon registers become available alongside the rest of the CLI tooling through .wex/bin/app-manager.

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

wexample-wex-addon-filestate is a thin bridge: it contributes a single class to the wex addon system so that the wexample-filestate reconciliation engine becomes available inside a wex Kernel. The package uses a standard src/ layout and is built with PDM.

Package layout

src/wexample_wex_addon_filestate/
├── filestate_addon_manager.py   # the addon's sole public contribution
└── commands/                    # addon commands (empty; populated as commands are added)

Everything callable from the outside lives under src/wexample_wex_addon_filestate/.

FilestateAddonManager

src/wexample_wex_addon_filestate/filestate_addon_manager.py contains the only class the package exports:

class FilestateAddonManager(AbstractAddonManager):
    pass

It inherits AbstractAddonManager from wexample-wex-core without overriding anything. The base class supplies the registration, naming, and lifecycle hooks; the subclass exists to give the wex addon system a concrete, importable symbol that identifies this integration.

Commands package

src/wexample_wex_addon_filestate/commands/init.py is the designated home for any wex commands the addon exposes. It is currently empty, meaning the addon registers with the kernel but adds no commands of its own yet.

Call path

When a caller registers the addon:

kernel = Kernel(entrypoint_path=Path(".wex"))
kernel.setup(addons=[FilestateAddonManager])

kernel.setup() instantiates FilestateAddonManager, registers it under the key "filestate" (derived from the class name by AbstractAddonManager), and activates the filestate engine for that kernel. After setup(), kernel.get_addons()["filestate"] is the live manager instance.

Wex project infrastructure

The .wex/ directory holds the project's own wex configuration:

  • .wex/bin/app-manager — the local CLI entry point; it locates the wex binary (via $CORE_BIN or PATH) and delegates all arguments to it.
  • .wex/python/app_manager/app_workdir.py — extends PythonPackageWorkdir to declare the project's two git remotes (GitLab primary, GitHub mirror) and the main branch. This is consumed by wex's own tooling, not by the Python package at runtime.

Dependencies

The runtime graph is deliberately small:

Package Role
wexample-wex-core supplies AbstractAddonManager and the Kernel registration protocol
attrs / cattrs structured-data serialisation, inherited from the core stack

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-core: >=31.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-filestate 6.2.26

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-filestate 6.2.26
File Size Uploaded
wexample_wex_addon_filestate-6.2.26.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wexample-wex-addon-filestate 6.2.26
File Interpreter ABI Platform
wexample_wex_addon_filestate-6.2.26-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / wexample_wex_addon_filestate-6.2.26.tar.gz

Download URL wexample_wex_addon_filestate-6.2.26.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b03b88db92ea83af8371077bfdcde5be48ac2e1494cfedc47e23b2fcde7a1c86
BLAKE2b-256 checksum
How to use checksums
383d07eddaf0ddfe27c51b8e712a3b8610be5298233f27ea4a731876db5afe5d
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-142-generic

Release files / wexample_wex_addon_filestate-6.2.26-py3-none-any.whl

Download URL wexample_wex_addon_filestate-6.2.26-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47721a238ef06ca481592b5a24ae347c67108a97733fc81bce159b59260c1fa6
BLAKE2b-256 checksum
How to use checksums
05aaa68f99c11d600fe3d16bb571483c5f02f48b88e6af35077ee2a4cc2078a7
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-142-generic

Release history Release notifications | RSS feed

This release

6.2.26 This release

2 release files

6.2.24

2 release files

6.2.23

2 release files

6.2.21

2 release files

6.2.18

2 release files

6.2.17

2 release files

6.2.16

2 release files

6.2.15

2 release files

6.2.14

2 release files

6.2.13

2 release files

6.2.12

2 release files

6.2.9

2 release files

6.2.8

2 release files

6.2.7

2 release files

6.2.6

2 release files

6.2.5

2 release files

6.2.4

2 release files

6.2.3

2 release files

6.2.2

2 release files

6.2.1

2 release files

6.2.0

2 release files

6.0.30

2 release files

6.0.29

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.1.1

2 release files

0.1.0

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.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

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