QuantumChecker 0.3.3__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/PKG-INFO +1 -1
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumCheck/powerbi_evaluator.py +2 -1
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumCheck/ssis_evaluator.py +15 -15
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumChecker.egg-info/PKG-INFO +1 -1
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/setup.py +1 -1
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumCheck/__init__.py +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumCheck/main.py +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumCheck/prompts.py +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumCheck/python_evaluator.py +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumCheck/sql_evaluator.py +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumChecker.egg-info/SOURCES.txt +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumChecker.egg-info/dependency_links.txt +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumChecker.egg-info/requires.txt +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/QuantumChecker.egg-info/top_level.txt +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/README.md +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/setup.cfg +0 -0
- {quantumchecker-0.3.3 → quantumchecker-0.3.4}/tests/test.py +0 -0
|
@@ -43,10 +43,11 @@ def prompt_text_powerbi(combined_content: str) -> str:
|
|
|
43
43
|
|
|
44
44
|
load_dotenv()
|
|
45
45
|
logger = logging.getLogger(__name__)
|
|
46
|
+
|
|
46
47
|
logging.basicConfig(
|
|
47
48
|
level=logging.INFO,
|
|
48
49
|
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
|
49
|
-
handlers=[logging.
|
|
50
|
+
handlers=[logging.StreamHandler()]
|
|
50
51
|
)
|
|
51
52
|
|
|
52
53
|
|
|
@@ -10,7 +10,7 @@ from pprint import pprint
|
|
|
10
10
|
import json
|
|
11
11
|
import re
|
|
12
12
|
|
|
13
|
-
from .prompts import prompt_text_ssis
|
|
13
|
+
from .prompts import prompt_text_ssis
|
|
14
14
|
|
|
15
15
|
logger = logging.getLogger(__name__)
|
|
16
16
|
|
|
@@ -90,7 +90,7 @@ class SSISAnswerParser:
|
|
|
90
90
|
"issues": []
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
|
|
94
94
|
package_info = {
|
|
95
95
|
"Package Name": root.attrib.get("{www.microsoft.com/SqlServer/Dts}ObjectName", "Unknown"),
|
|
96
96
|
"Creation Date": root.attrib.get("{www.microsoft.com/SqlServer/Dts}CreationDate", "Unknown"),
|
|
@@ -101,7 +101,7 @@ class SSISAnswerParser:
|
|
|
101
101
|
structured_data["package_info"] = package_info
|
|
102
102
|
summary.append(f"Package: {package_info['Package Name']} (Created: {package_info['Creation Date']})")
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
package_description = "No description found"
|
|
106
106
|
comment_pattern = re.compile(r'<!--\s*Package Description:\s*(.*?)\s*-->', re.DOTALL)
|
|
107
107
|
match = comment_pattern.search(content)
|
|
@@ -109,7 +109,7 @@ class SSISAnswerParser:
|
|
|
109
109
|
package_description = match.group(1).strip()
|
|
110
110
|
summary.append(f"Description: {package_description}")
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
|
|
113
113
|
for conn in root.findall(".//DTS:ConnectionManager", namespace):
|
|
114
114
|
try:
|
|
115
115
|
conn_name = conn.attrib.get("{www.microsoft.com/SqlServer/Dts}ObjectName", "Unnamed Connection")
|
|
@@ -133,14 +133,14 @@ class SSISAnswerParser:
|
|
|
133
133
|
summary.append(
|
|
134
134
|
f"Connection: {conn_name} ({conn_type}, ConnectionString: {conn_details['ConnectionString']})")
|
|
135
135
|
structured_data["connections"].append(conn_details)
|
|
136
|
-
|
|
136
|
+
|
|
137
137
|
if conn_type == "OLEDB" and "Initial Catalog" not in conn_details["ConnectionString"]:
|
|
138
138
|
structured_data["issues"].append(f"OLEDB Connection {conn_name} missing database specification")
|
|
139
139
|
except AttributeError as e:
|
|
140
140
|
structured_data["issues"].append(f"Error parsing connection {conn_name}: {str(e)}")
|
|
141
141
|
logger.error("Error parsing connection %s: %s", conn_name, str(e))
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
|
|
144
144
|
for var in root.findall(".//DTS:Variable", namespace):
|
|
145
145
|
try:
|
|
146
146
|
var_name = var.attrib.get("{www.microsoft.com/SqlServer/Dts}ObjectName", "Unnamed Variable")
|
|
@@ -155,7 +155,7 @@ class SSISAnswerParser:
|
|
|
155
155
|
structured_data["issues"].append(f"Error parsing variable {var_name}: {str(e)}")
|
|
156
156
|
logger.error("Error parsing variable %s: %s", var_name, str(e))
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
|
|
159
159
|
component_ids = set()
|
|
160
160
|
for component in root.findall(".//DTS:Executables//component", namespace):
|
|
161
161
|
try:
|
|
@@ -168,7 +168,7 @@ class SSISAnswerParser:
|
|
|
168
168
|
structured_data["issues"].append(f"Error parsing component {comp_name}: {str(e)}")
|
|
169
169
|
logger.error("Error parsing component %s: %s", comp_name, str(e))
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
|
|
172
172
|
for path in root.findall(".//DTS:Executables//path", namespace):
|
|
173
173
|
try:
|
|
174
174
|
start_id = path.attrib.get("startId", "Unknown Start")
|
|
@@ -183,14 +183,14 @@ class SSISAnswerParser:
|
|
|
183
183
|
structured_data["issues"].append(f"Error parsing path {path_name}: {str(e)}")
|
|
184
184
|
logger.error("Error parsing path %s: %s", path_name, str(e))
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
|
|
187
187
|
if not structured_data["connections"]:
|
|
188
188
|
structured_data["issues"].append("No connections configured in the package")
|
|
189
189
|
if not structured_data["data_flow_paths"]:
|
|
190
190
|
structured_data["issues"].append("No data flow paths configured in the package")
|
|
191
191
|
|
|
192
192
|
combined_summary = "\n".join(summary)[:2000] or "No components found in SSIS package"
|
|
193
|
-
|
|
193
|
+
|
|
194
194
|
answers = []
|
|
195
195
|
sections = ["Package", "Description", "Connection", "Variable", "Component", "Data Flow Path"]
|
|
196
196
|
current_section = []
|
|
@@ -207,7 +207,7 @@ class SSISAnswerParser:
|
|
|
207
207
|
logger.warning("No valid answers found in single SSIS file")
|
|
208
208
|
answers = [combined_summary]
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
|
|
211
211
|
with open("parsed_ssis_summary.json", "w", encoding="utf-8") as f:
|
|
212
212
|
json.dump(structured_data, f, indent=2)
|
|
213
213
|
logger.info("Saved structured SSIS summary to 'parsed_ssis_summary.json'")
|
|
@@ -337,7 +337,7 @@ class SSISEvaluator:
|
|
|
337
337
|
"""
|
|
338
338
|
try:
|
|
339
339
|
if answer_path.lower().endswith(".zip"):
|
|
340
|
-
|
|
340
|
+
|
|
341
341
|
temp_dir = temp_dir or f"temp_ssis_extract_{os.getpid()}"
|
|
342
342
|
parsed_data = SSISAnswerParser.parse_zip_file(answer_path, temp_dir)
|
|
343
343
|
elif answer_path.lower().endswith('.dtsx'):
|
|
@@ -361,17 +361,17 @@ class SSISEvaluator:
|
|
|
361
361
|
logger.info("Processing %d questions and %d answers", len(questions), len(answers))
|
|
362
362
|
pprint(f"Processing {len(questions)} questions and {len(answers)} answers")
|
|
363
363
|
|
|
364
|
-
|
|
364
|
+
|
|
365
365
|
if not answers:
|
|
366
366
|
logger.warning("No answers parsed from SSIS file")
|
|
367
367
|
answers = ["No valid SSIS components found"] * len(questions)
|
|
368
368
|
elif len(answers) < len(questions):
|
|
369
|
-
|
|
369
|
+
|
|
370
370
|
answers = [answers[i % len(answers)] for i in range(len(questions))]
|
|
371
371
|
logger.debug("Expanded %d answers to %d for %d questions", len(parsed_data["text_answers"]),
|
|
372
372
|
len(answers), len(questions))
|
|
373
373
|
elif len(answers) > len(questions):
|
|
374
|
-
|
|
374
|
+
|
|
375
375
|
answers = answers[:len(questions)]
|
|
376
376
|
logger.debug("Truncated %d answers to %d for %d questions", len(parsed_data["text_answers"]),
|
|
377
377
|
len(answers), len(questions))
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="QuantumChecker",
|
|
5
|
-
version="0.3.
|
|
5
|
+
version="0.3.4",
|
|
6
6
|
author="Qobiljon",
|
|
7
7
|
author_email="qobiljonkhayrullayev@gmail.com",
|
|
8
8
|
description="A package to evaluate homework submissions in Python, SQL, PowerBI, and SSIS.",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|