File size: 2,698 Bytes
174e0f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
"""
Constants and configuration values for the Modius Agent Performance application.
"""
from datetime import datetime
from typing import Dict, Any

# API Configuration
API_BASE_URL = "https://afmdb.autonolas.tech"

# Chart Colors
CHART_COLORS = {
    'apr': 'red',
    'adjusted_apr': 'green',
    'roi': 'blue',
    'volume': 'purple',
    'positive_region': 'rgba(230, 243, 255, 0.3)',
    'negative_region': 'rgba(255, 230, 230, 0.3)',
    'zero_line': 'black'
}

# Date Ranges
DATE_RANGES = {
    'apr_start': datetime(2025, 4, 17),
    'may_cutoff': datetime(2025, 5, 10),
    'feb_start': datetime(2025, 2, 1)
}

# Chart Configuration
CHART_CONFIG = {
    'height': 600,
    'template': 'plotly_white',
    'font_family': 'Arial, sans-serif',
    'title_size': 22,
    'axis_font_size': 14,
    'legend_font_size': 14,
    'moving_average_window_days': 7,
    'use_corrected_data': True,  # Use corrected CSV data instead of database
    'corrected_data_file': 'corrected_apr_roi_data.csv',
    'max_visible_agents': 5,
    'timestamp_aggregation_method': 'median'  # 'mean' or 'median'
}

# Y-axis Ranges
Y_AXIS_RANGES = {
    'apr': {'min': -50, 'max': 100},
    'roi': {'min': -100, 'max': 100},
    'volume': {'auto': True}
}

# Agent Hash Version Mapping
AGENT_HASH_VERSIONS = {
    'tby': 'v0.4.1',
    'vq': 'v0.4.2'
}

# Logging Configuration
LOGGING_CONFIG = {
    'level': 'INFO',
    'format': '%(asctime)s - %(levelname)s - %(message)s',
    'file': 'app_debug.log'
}

# File Paths
FILE_PATHS = {
    'apr_csv': 'modius_apr_values.csv',
    'roi_csv': 'modius_roi_values.csv',
    'volume_csv': 'modius_volume_values.csv',
    'apr_hash_csv': 'modius_apr_vs_agent_hash.csv',
    'statistics_csv': 'modius_apr_statistics.csv',
    'apr_processed_csv': 'modius_apr_processed_values.csv',
    'roi_processed_csv': 'modius_roi_processed_values.csv',
    'apr_graph_html': 'modius_apr_combined_graph.html',
    'apr_graph_png': 'modius_apr_combined_graph.png',
    'roi_graph_html': 'modius_roi_graph.html',
    'roi_graph_png': 'modius_roi_graph.png',
    'volume_graph_html': 'modius_volume_graph.html',
    'volume_graph_png': 'modius_volume_graph.png',
    'apr_hash_graph_html': 'modius_apr_vs_agent_hash_graph.html',
    'apr_hash_graph_png': 'modius_apr_vs_agent_hash_graph.png'
}

# Data Processing Configuration
DATA_CONFIG = {
    'agent_type_name': 'Modius',
    'attribute_name': 'APR',
    'api_limit': 1000,
    'exclude_apr_values': [0],  # Only exclude zero APR values
    'excluded_agents': [1, 18, 2, 5, 4],  # Include all agents including testing agents for population analysis
    'max_apr_threshold': 600  # Maximum allowed APR value (remove values above this)
}