diff options
| author | 2025-10-25 00:30:48 +0800 | |
|---|---|---|
| committer | 2025-10-25 00:30:48 +0800 | |
| commit | cbc653ffd0ea9abf4360623dc7a7651e1a49cc61 (patch) | |
| tree | ea3c396148158077bae3e77eaa9341f8c1990636 /src/conventionalrp/__init__.py | |
| parent | 08299b37dfda86e56e4f2b442f68ccd2da7a82e3 (diff) | |
| download | conventional_role_play-cbc653ffd0ea9abf4360623dc7a7651e1a49cc61.tar.gz conventional_role_play-cbc653ffd0ea9abf4360623dc7a7651e1a49cc61.zip | |
feat: Implement plugin system with combat tracker and dice analyzer
- Added `plugin_system_demo.py` to demonstrate basic plugin usage, processing, and analysis.
- Created `CombatTrackerPlugin` for tracking combat statistics including damage and healing.
- Developed `DiceAnalyzerPlugin` for analyzing dice rolls and calculating success rates.
- Introduced `renderer_demo.py` for rendering output in HTML, Markdown, and JSON formats.
- Implemented `rule_system_demo.py` to showcase rule engine capabilities with various examples.
- Established core rule engine functionality in `rules.py` with support for conditions and actions.
- Enhanced base plugin structure in `base.py` to support different plugin types (Processor, Renderer, Analyzer).
- Added custom exception handling in `exceptions.py` for better error management.
- Configured logging setup in `logging_config.py` for improved logging capabilities.
- Created unit tests in `test_rust_core.py` to validate core functionalities and performance.
Diffstat (limited to 'src/conventionalrp/__init__.py')
| -rw-r--r-- | src/conventionalrp/__init__.py | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/src/conventionalrp/__init__.py b/src/conventionalrp/__init__.py index 06dbd63..ab4b17d 100644 --- a/src/conventionalrp/__init__.py +++ b/src/conventionalrp/__init__.py @@ -1,15 +1,45 @@ +""" +Conventional Role Play SDK (ConventionalRP) +""" + import sys from importlib.metadata import version from . import _core +from .core import Parser, Processor, Rule, RuleEngine +from .utils import ( + setup_logging, + get_logger, + ConventionalRPError, + ParserError, + RuleError, + ProcessorError, + ValidationError, + ConfigurationError, +) -__all__ = ["_core", "__version__"] +__all__ = [ + "Parser", + "Processor", + "Rule", + "RuleEngine", + "setup_logging", + "get_logger", + "ConventionalRPError", + "ParserError", + "RuleError", + "ProcessorError", + "ValidationError", + "ConfigurationError", + "__version__", +] if sys.version_info >= (3, 8): - # For Python 3.8+ __version__ = version("conventionalrp") elif sys.version_info < (3, 8): from pkg_resources import get_distribution - # For Python < 3.8 __version__ = get_distribution("conventionalrp").version + +_default_logger = setup_logging(level="INFO") + |
