BladeSzaSza commited on
Commit
6289899
Β·
verified Β·
1 Parent(s): ab7cd8e

Delete demo/test_component.py

Browse files
Files changed (1) hide show
  1. demo/test_component.py +0 -69
demo/test_component.py DELETED
@@ -1,69 +0,0 @@
1
- """
2
- Test script to verify the Laban Movement Analysis component structure.
3
- """
4
-
5
- import sys
6
- from pathlib import Path
7
-
8
- # Add parent directory to path
9
- sys.path.insert(0, str(Path(__file__).parent.parent / "backend"))
10
-
11
- # Test imports
12
- try:
13
- from gradio_labanmovementanalysis import LabanMovementAnalysis
14
- print("βœ“ LabanMovementAnalysis component imported successfully")
15
-
16
- from gradio_labanmovementanalysis import video_utils
17
- print("βœ“ video_utils module imported successfully")
18
-
19
- from gradio_labanmovementanalysis import pose_estimation
20
- print("βœ“ pose_estimation module imported successfully")
21
-
22
- from gradio_labanmovementanalysis import notation_engine
23
- print("βœ“ notation_engine module imported successfully")
24
-
25
- from gradio_labanmovementanalysis import json_generator
26
- print("βœ“ json_generator module imported successfully")
27
-
28
- from gradio_labanmovementanalysis import visualizer
29
- print("βœ“ visualizer module imported successfully")
30
-
31
- except ImportError as e:
32
- print(f"βœ— Import error: {e}")
33
- sys.exit(1)
34
-
35
- # Test component instantiation
36
- try:
37
- component = LabanMovementAnalysis()
38
- print("\nβœ“ Component instantiated successfully")
39
-
40
- # Test component methods
41
- example_payload = component.example_payload()
42
- print(f"βœ“ Example payload: {example_payload}")
43
-
44
- example_value = component.example_value()
45
- print(f"βœ“ Example value keys: {list(example_value.keys())}")
46
-
47
- api_info = component.api_info()
48
- print(f"βœ“ API info type: {api_info['type']}")
49
-
50
- except Exception as e:
51
- print(f"βœ— Component error: {e}")
52
- sys.exit(1)
53
-
54
- # Test data structures
55
- try:
56
- from gradio_labanmovementanalysis.pose_estimation import Keypoint, PoseResult
57
- kp = Keypoint(x=0.5, y=0.5, confidence=0.9, name="nose")
58
- print(f"\nβœ“ Keypoint created: {kp}")
59
-
60
- from gradio_labanmovementanalysis.notation_engine import Direction, Speed, Intensity
61
- print(f"βœ“ Direction values: {[d.value for d in Direction]}")
62
- print(f"βœ“ Speed values: {[s.value for s in Speed]}")
63
- print(f"βœ“ Intensity values: {[i.value for i in Intensity]}")
64
-
65
- except Exception as e:
66
- print(f"βœ— Data structure error: {e}")
67
- sys.exit(1)
68
-
69
- print("\nβœ… All tests passed! The component is properly structured.")