Skip to content

Implement text processing module and top-level helper functions#7

Merged
unseriousAI merged 2 commits intomainfrom
implement-text-processing
Jun 24, 2025
Merged

Implement text processing module and top-level helper functions#7
unseriousAI merged 2 commits intomainfrom
implement-text-processing

Conversation

@jwesleye
Copy link
Copy Markdown
Collaborator

Summary

Complete implementation of text processing module with 10 essential functions and top-level helper functions for convenient tool loading and management. Enables the requested workflow with boat.load_all_*_tools() and boat.merge_tool_lists().

📝 Text Processing Functions Added

  • clean_whitespace: Normalize whitespace in text
  • normalize_line_endings: Convert line endings (unix/windows/mac)
  • strip_html_tags: Intelligent HTML tag removal avoiding word merging
  • normalize_unicode: Unicode normalization (NFC/NFD/NFKC/NFKD)
  • to_snake_case: Convert to snake_case with proper consecutive uppercase handling
  • to_camel_case: Convert to camelCase/PascalCase
  • to_title_case: Convert to Title Case preserving delimiters (hyphens/underscores)
  • smart_split_lines: Smart text wrapping with word preservation
  • extract_sentences: Extract sentences with punctuation handling
  • join_with_oxford_comma: Join lists with proper Oxford comma

🔧 Helper Functions Added

  • load_all_filesystem_tools(): Get all file system tools as list
  • load_all_text_tools(): Get all text processing tools as list
  • merge_tool_lists(): Merge tool lists and individual functions flexibly
  • get_tool_info(): Inspect tool functions for metadata and signatures
  • list_all_available_tools(): Discover all tools organized by category

💻 Usage Example

import basic_open_agent_tools as boat

fs_tools = boat.load_all_filesystem_tools()  # list
text_tools = boat.load_all_text_tools()     # list

def my_custom_tool(some_var: str) -> str:
    return some_var + some_var

agent_tools = boat.merge_tool_lists(fs_tools, text_tools, my_custom_tool)

✅ Quality Assurance

  • 32 tests passing (100% success rate)
  • 66% code coverage focused on new functionality
  • Ruff linting: All checks passed with consistent formatting
  • MyPy strict mode: Full type safety with Dict[str, Any] specificity
  • Performance: Fast 56.5ms import time
  • Error handling: Comprehensive validation and clear error messages
  • Integration tests: Complete workflow validation

📊 Tool Inventory

  • 18 filesystem tools available
  • 10 text processing tools available
  • 28 total tools accessible via helper functions
  • Extensible architecture for future tool categories

🎯 Key Features

  • Flexible merging: Mix tool lists and individual functions seamlessly
  • Type-safe: Full mypy compliance with runtime validation
  • Agent-ready: Designed for AI agent framework integration patterns
  • Auto-discovery: Programmatic tool discovery and inspection
  • Error-resilient: Robust error handling for production use

🤖 Generated with Claude Code

Wes and others added 2 commits June 24, 2025 14:40
- Add complete text processing module with 10 core functions:
  * clean_whitespace: Normalize whitespace in text
  * normalize_line_endings: Convert line endings (unix/windows/mac)
  * strip_html_tags: Intelligent HTML tag removal
  * normalize_unicode: Unicode normalization (NFC/NFD/NFKC/NFKD)
  * to_snake_case: Convert to snake_case with proper handling
  * to_camel_case: Convert to camelCase/PascalCase
  * to_title_case: Convert to Title Case preserving delimiters
  * smart_split_lines: Smart text wrapping with word preservation
  * extract_sentences: Extract sentences with punctuation handling
  * join_with_oxford_comma: Join lists with proper Oxford comma

- Add top-level helper functions for tool management:
  * load_all_filesystem_tools(): Get all file system tools as list
  * load_all_text_tools(): Get all text processing tools as list
  * merge_tool_lists(): Merge tool lists and individual functions
  * get_tool_info(): Inspect tool functions for metadata
  * list_all_available_tools(): Discover all tools by category

- Comprehensive test coverage with 32 passing tests
- Full type safety with mypy validation
- Code quality compliance with ruff linting
- Supports agent framework integration patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…y checks

Code Quality Improvements:
- Fix all ruff linting issues and apply consistent formatting
- Add strict mypy type annotations with Dict[str, Any] specificity
- Comprehensive test coverage with 32 passing tests (100% success rate)
- Runtime type validation and clear error messages
- Import performance optimization (56.5ms load time)

Functionality Validation:
- 18 filesystem tools + 10 text processing tools = 28 total tools available
- Top-level helper functions working perfectly
- User workflow tested and confirmed working
- Error handling and edge cases thoroughly tested
- Integration tests validate complete workflows

Technical Details:
- Full type safety with strict mypy compliance
- 66% code coverage focused on new functionality
- All edge cases and error conditions tested
- Consistent code style and documentation
- Production-ready quality assurance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@unseriousAI unseriousAI merged commit 934f80a into main Jun 24, 2025
5 checks passed
@unseriousAI unseriousAI deleted the implement-text-processing branch June 24, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants