feat(tagging-system): Add comprehensive tagging system implementation
- Add tagging system Python package with modular architecture (config, core, impl) - Create core interfaces for file discovery, content analysis, and tag generation - Implement content analyzer with language detection and topic extraction - Implement file discovery engine with directory scanning and filtering - Implement tag generator with hierarchical tag creation and consolidation - Add configuration management with example config and validation - Create comprehensive design and requirements documentation in .kiro/specs - Add pytest test suite with unit tests for models, interfaces, and config - Add setup.py, requirements.txt, and pytest.ini for package management - Add README.md with project overview and usage instructions - Update workspace.json with new project structure - Add Excalidraw diagram for system architecture visualization - Establish foundation for automated vault tagging and metadata management
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
"""Test overall package structure and imports."""
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
class TestPackageStructure:
|
||||
"""Test that the package structure is correct."""
|
||||
|
||||
def test_main_package_imports(self):
|
||||
"""Test that main package imports work correctly."""
|
||||
from tagging_system import (
|
||||
FileInfo,
|
||||
ContentAnalysis,
|
||||
TagStructure,
|
||||
FrontmatterData,
|
||||
ContentType,
|
||||
LanguageInfo,
|
||||
ValidationResult,
|
||||
FileDiscovery,
|
||||
ContentAnalyzer,
|
||||
TagGenerator,
|
||||
FrontmatterManager
|
||||
)
|
||||
|
||||
# Test that all imports are available
|
||||
assert FileInfo is not None
|
||||
assert ContentAnalysis is not None
|
||||
assert TagStructure is not None
|
||||
assert FrontmatterData is not None
|
||||
assert ContentType is not None
|
||||
assert LanguageInfo is not None
|
||||
assert ValidationResult is not None
|
||||
assert FileDiscovery is not None
|
||||
assert ContentAnalyzer is not None
|
||||
assert TagGenerator is not None
|
||||
assert FrontmatterManager is not None
|
||||
|
||||
def test_core_module_imports(self):
|
||||
"""Test that core module imports work correctly."""
|
||||
from tagging_system.core import (
|
||||
FileInfo,
|
||||
ContentAnalysis,
|
||||
TagStructure,
|
||||
FrontmatterData,
|
||||
ContentType,
|
||||
LanguageInfo,
|
||||
ValidationResult,
|
||||
FileDiscovery,
|
||||
ContentAnalyzer,
|
||||
TagGenerator,
|
||||
FrontmatterManager
|
||||
)
|
||||
|
||||
# All imports should be available
|
||||
assert all([
|
||||
FileInfo, ContentAnalysis, TagStructure, FrontmatterData,
|
||||
ContentType, LanguageInfo, ValidationResult,
|
||||
FileDiscovery, ContentAnalyzer, TagGenerator, FrontmatterManager
|
||||
])
|
||||
|
||||
def test_config_module_imports(self):
|
||||
"""Test that config module imports work correctly."""
|
||||
from tagging_system.config import (
|
||||
TaggingConfig,
|
||||
DirectoryMapping,
|
||||
TagHierarchy,
|
||||
SensitivePatterns,
|
||||
load_config,
|
||||
save_config
|
||||
)
|
||||
|
||||
# All imports should be available
|
||||
assert all([
|
||||
TaggingConfig, DirectoryMapping, TagHierarchy,
|
||||
SensitivePatterns, load_config, save_config
|
||||
])
|
||||
|
||||
def test_cli_module_import(self):
|
||||
"""Test that CLI module can be imported."""
|
||||
from tagging_system import cli
|
||||
|
||||
assert hasattr(cli, 'main')
|
||||
assert callable(cli.main)
|
||||
|
||||
def test_package_version(self):
|
||||
"""Test that package version is available."""
|
||||
import tagging_system
|
||||
|
||||
assert hasattr(tagging_system, '__version__')
|
||||
assert tagging_system.__version__ == "0.1.0"
|
||||
|
||||
def test_package_metadata(self):
|
||||
"""Test that package metadata is available."""
|
||||
import tagging_system
|
||||
|
||||
assert hasattr(tagging_system, '__author__')
|
||||
assert tagging_system.__author__ == "Tagging System"
|
||||
Reference in New Issue
Block a user