-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
100 lines (95 loc) · 2.52 KB
/
config.py
File metadata and controls
100 lines (95 loc) · 2.52 KB
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
92
93
94
95
96
97
98
99
100
"""
Configuration settings for Excel to JSON converter
"""
# File paths
INPUT_FILE = "app-dev-hub-v5.xlsx"
OUTPUT_DIR = "output"
OUTPUT_FILE = f"{OUTPUT_DIR}/templates.json"
VALIDATION_REPORT = f"{OUTPUT_DIR}/validation_report.txt"
STATISTICS_FILE = f"{OUTPUT_DIR}/statistics.json"
# Sheet configuration
SHEETS_CONFIG = {
"Learning Path": {
"type": "learning_path",
"base_tags": ["learning-path"],
"default_tags": ["flexibleserver"],
"has_tile_numbers": True,
},
"App Dev": {
"type": "content",
"base_tags": ["app-dev"],
"has_tile_numbers": False,
},
"AI": {
"type": "content",
"base_tags": ["genai"],
"has_tile_numbers": False,
},
"Analytics": {
"type": "content",
"base_tags": ["analytics"],
"has_tile_numbers": False,
},
"Blogs": {
"type": "blogs",
"base_tags": ["blog"],
"has_tile_numbers": False,
"check_featured": True,
},
"Samples": {
"type": "content",
"base_tags": ["sample"],
"has_tile_numbers": False,
},
}
# Tag inference settings
TAG_INFERENCE = {
"enabled": False,
"url_patterns": {
"postgresql/flexible-server": "flexibleserver",
"postgresql/extensions": "extensions",
"app-service": "app-service",
"kubernetes": "aks",
"/python": "python",
"/java": "java",
"javascript": "javascript",
"dotnet": "dotnet",
"github.com": "github",
},
"title_patterns": {
"python": "python",
"django": "python",
"flask": "python",
"java": "java",
"spring": "java",
"node": "javascript",
"react": "javascript",
".net": "dotnet",
"c#": "dotnet",
"go": "go",
"tutorial": "tutorial",
"how to": "how-to",
"how-to": "how-to",
"quickstart": "quickstart",
"quick start": "quickstart",
"best practice": "best-practice",
"concept": "concepts",
"overview": "overview",
"workshop": "workshop",
"sample": "sample",
},
}
# Validation rules
VALIDATION = {
"required_fields": ["title", "website", "source", "tags", "image", "description"],
"url_schemes": ["http://", "https://"],
"min_tags": 1,
"max_title_length": 200,
"max_description_length": 1000,
}
# Logging configuration
LOGGING = {
"level": "INFO",
"format": "%(asctime)s - %(levelname)s - %(message)s",
"file": f"{OUTPUT_DIR}/converter.log",
}