QuantumChecker 0.3.6__tar.gz → 0.3.7__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.
@@ -1,52 +1,52 @@
1
- Metadata-Version: 2.4
2
- Name: QuantumChecker
3
- Version: 0.3.6
4
- Summary: A package to evaluate homework submissions in Python, SQL, PowerBI, and SSIS.
5
- Author: Qobiljon
6
- Author-email: qobiljonkhayrullayev@gmail.com
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.6
11
- Description-Content-Type: text/markdown
12
- Requires-Dist: requests>=2.31.0
13
- Requires-Dist: tenacity>=8.2.3
14
- Requires-Dist: pdf2image>=1.16.3
15
- Requires-Dist: python-dotenv>=1.0.0
16
- Requires-Dist: Pillow>=10.0.0
17
- Requires-Dist: PyPDF2>=3.0.1
18
- Dynamic: author
19
- Dynamic: author-email
20
- Dynamic: classifier
21
- Dynamic: description
22
- Dynamic: description-content-type
23
- Dynamic: requires-dist
24
- Dynamic: requires-python
25
- Dynamic: summary
26
-
27
- Sample usage:
28
- ```
29
- import asyncio
30
- from your_evaluator_module import HomeworkEvaluator
31
-
32
- async def main():
33
- evaluator = HomeworkEvaluator()
34
- question_content = """
35
- Q1: What is a Python list? Explain with an example.
36
-
37
- Q2: Write an SQL query to select all records from a table named 'students'.
38
- """
39
- answer_path = "sample_submissions/student1_answer.py"
40
- question_type = "python"
41
-
42
- result = await evaluator.evaluate_from_content(
43
- question_content=question_content,
44
- answer_path=answer_path,
45
- api_key="your_api_key",
46
- question_type=question_type
47
- )
48
- print(result)
49
-
50
- if __name__ == "__main__":
51
- asyncio.run(main())
52
- ```
1
+ Metadata-Version: 2.4
2
+ Name: QuantumChecker
3
+ Version: 0.3.7
4
+ Summary: A package to evaluate homework submissions in Python, SQL, PowerBI, and SSIS.
5
+ Author: Qobiljon
6
+ Author-email: qobiljonkhayrullayev@gmail.com
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: requests>=2.31.0
13
+ Requires-Dist: tenacity>=8.2.3
14
+ Requires-Dist: pdf2image>=1.16.3
15
+ Requires-Dist: python-dotenv>=1.0.0
16
+ Requires-Dist: Pillow>=10.0.0
17
+ Requires-Dist: PyPDF2>=3.0.1
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: requires-dist
24
+ Dynamic: requires-python
25
+ Dynamic: summary
26
+
27
+ Sample usage:
28
+ ```
29
+ import asyncio
30
+ from your_evaluator_module import HomeworkEvaluator
31
+
32
+ async def main():
33
+ evaluator = HomeworkEvaluator()
34
+ question_content = """
35
+ Q1: What is a Python list? Explain with an example.
36
+
37
+ Q2: Write an SQL query to select all records from a table named 'students'.
38
+ """
39
+ answer_path = "sample_submissions/student1_answer.py"
40
+ question_type = "python"
41
+
42
+ result = await evaluator.evaluate_from_content(
43
+ question_content=question_content,
44
+ answer_path=answer_path,
45
+ api_key="your_api_key",
46
+ question_type=question_type
47
+ )
48
+ print(result)
49
+
50
+ if __name__ == "__main__":
51
+ asyncio.run(main())
52
+ ```
@@ -57,7 +57,7 @@ logging.basicConfig(
57
57
  # Gemini Flash Model
58
58
  # ==============================
59
59
  class GeminiFlashModel:
60
- def __init__(self, api_key: str, model_name: str = "gemini-1.5-flash"):
60
+ def __init__(self, api_key: str, model_name: str = "gemini-2.5-flash"):
61
61
  api_key = os.getenv("GEMINI_API_KEY") or api_key
62
62
  if not api_key:
63
63
  raise ValueError("API key not found in .env file or environment variables.")
@@ -84,42 +84,35 @@ def prompt_text_sql(combined_content: str):
84
84
 
85
85
  def prompt_text_ssis(combined_content: str) -> str:
86
86
  return (
87
-
88
87
  "You are an SSIS data engineer evaluating a beginner-level SSIS package submission (1–2 months experience).\n\n"
89
88
  "Evaluation Criteria:\n"
90
89
  "- Assess correct and relevant use of SSIS components: Connection Managers, Control Flow tasks (e.g., Execute SQL Task), Data Flow tasks (e.g., Flat File Source to OLE DB Destination).\n"
91
- "- Check if the submission attempts to solve the task using SSIS packages (.dtsx) and related concepts.\n"
92
90
  "- Confirm proper linking of components and appropriate use of data types.\n"
93
91
  "- Consider clarity, effort, and completeness.\n"
94
92
  "- If scheduling (e.g., SQL Server Agent Job) is missing, note it but deduct no more than 5 points.\n\n"
95
- "**STRICT RULE ON OFF-TOPIC SUBMISSIONS:**\n"
96
- "- If the submission is off-topic (e.g., Python scripts, SQL queries, Power BI reports, or anything NOT an SSIS package or SSIS-related), assign exactly 20/100 points.\n"
97
- "- Do NOT give any additional points or feedback related to SSIS components.\n"
98
- "- Clearly state in feedback that the submission does not address the SSIS package requirement and advise focusing on SSIS for this task.\n\n"
99
93
  "Scoring Guidelines:\n"
100
94
  "- Begin with a baseline of 60/100 for any reasonable SSIS attempt.\n"
101
95
  "- Add 5–10 points for extra effort or partial correctness.\n"
102
96
  "- Never exceed 100 points.\n"
103
- "- Always reward genuine effort unless off-topic.\n\n"
104
- "Feedback Format:\n"
97
+ "- Always reward genuine effort.\n\n"
98
+ "Feedback Format (keep total under 120 words):\n"
105
99
  "=== COMPREHENSIVE EVALUATION ===\n"
106
100
  "OVERALL SCORE: <score>/100\n\n"
107
101
  "FEEDBACK SUMMARY:\n"
108
- "- What was done well\n"
109
- "- What needs improvement\n"
110
- "- Major issues (including off-topic comments if applicable)\n\n"
102
+ "- What was done well (1–2 sentences)\n"
103
+ "- What needs improvement (1–2 sentences)\n"
104
+ "- Major issues (if any, 1 sentence)\n\n"
111
105
  "KEY ADVICE:\n"
112
- "- 1–2 improvement tips\n"
106
+ "- 1–2 improvement tips (1 line each)\n"
113
107
  "- Core SSIS concepts to review\n"
114
108
  "- Encouragement to keep practicing\n\n"
115
109
  f"{combined_content}\n"
116
110
  "=== EVALUATION COMPLETE ===\n\n"
117
111
  "Notes:\n"
118
- "- Be kind, clear, and beginner-friendly.\n"
119
- "- If off-topic, strictly enforce 20/100 score with no exceptions.\n"
120
- "- Remind student clearly to read the question carefully and focus on SSIS.\n"
112
+ "- Be concise, clear, and beginner-friendly.\n"
121
113
  )
122
114
 
115
+
123
116
  def prompt_text_powerbi(combined_content: str):
124
117
  return (
125
118
  "You are a BI professional evaluating a beginner student's Power BI submission, including DAX, data models, and visuals.\n\n"
@@ -19,7 +19,7 @@ logger = logging.getLogger(__name__)
19
19
 
20
20
 
21
21
  class GeminiFlashModel:
22
- def __init__(self, api_key: str, model_name: str = "gemini-1.5-flash"):
22
+ def __init__(self, api_key: str, model_name: str = "gemini-2.5-flash"):
23
23
  if not api_key:
24
24
  raise ValueError("API key is required.")
25
25
  self.api_key = api_key
@@ -19,7 +19,7 @@ logger = logging.getLogger(__name__)
19
19
 
20
20
 
21
21
  class GeminiFlashModel:
22
- def __init__(self, api_key: str, model_name: str = "gemini-1.5-flash"):
22
+ def __init__(self, api_key: str, model_name: str = "gemini-2.5-flash"):
23
23
  if not api_key:
24
24
  raise ValueError("API key is required.")
25
25
  self.api_key = api_key
@@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
15
15
 
16
16
 
17
17
  class GeminiFlashModel:
18
- def __init__(self, api_key: str, model_name: str = "gemini-1.5-flash"):
18
+ def __init__(self, api_key: str, model_name: str = "gemini-2.5-flash"):
19
19
  if not api_key:
20
20
  raise ValueError("API key is required.")
21
21
  self.api_key = api_key
@@ -1,52 +1,52 @@
1
- Metadata-Version: 2.4
2
- Name: QuantumChecker
3
- Version: 0.3.6
4
- Summary: A package to evaluate homework submissions in Python, SQL, PowerBI, and SSIS.
5
- Author: Qobiljon
6
- Author-email: qobiljonkhayrullayev@gmail.com
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.6
11
- Description-Content-Type: text/markdown
12
- Requires-Dist: requests>=2.31.0
13
- Requires-Dist: tenacity>=8.2.3
14
- Requires-Dist: pdf2image>=1.16.3
15
- Requires-Dist: python-dotenv>=1.0.0
16
- Requires-Dist: Pillow>=10.0.0
17
- Requires-Dist: PyPDF2>=3.0.1
18
- Dynamic: author
19
- Dynamic: author-email
20
- Dynamic: classifier
21
- Dynamic: description
22
- Dynamic: description-content-type
23
- Dynamic: requires-dist
24
- Dynamic: requires-python
25
- Dynamic: summary
26
-
27
- Sample usage:
28
- ```
29
- import asyncio
30
- from your_evaluator_module import HomeworkEvaluator
31
-
32
- async def main():
33
- evaluator = HomeworkEvaluator()
34
- question_content = """
35
- Q1: What is a Python list? Explain with an example.
36
-
37
- Q2: Write an SQL query to select all records from a table named 'students'.
38
- """
39
- answer_path = "sample_submissions/student1_answer.py"
40
- question_type = "python"
41
-
42
- result = await evaluator.evaluate_from_content(
43
- question_content=question_content,
44
- answer_path=answer_path,
45
- api_key="your_api_key",
46
- question_type=question_type
47
- )
48
- print(result)
49
-
50
- if __name__ == "__main__":
51
- asyncio.run(main())
52
- ```
1
+ Metadata-Version: 2.4
2
+ Name: QuantumChecker
3
+ Version: 0.3.7
4
+ Summary: A package to evaluate homework submissions in Python, SQL, PowerBI, and SSIS.
5
+ Author: Qobiljon
6
+ Author-email: qobiljonkhayrullayev@gmail.com
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: requests>=2.31.0
13
+ Requires-Dist: tenacity>=8.2.3
14
+ Requires-Dist: pdf2image>=1.16.3
15
+ Requires-Dist: python-dotenv>=1.0.0
16
+ Requires-Dist: Pillow>=10.0.0
17
+ Requires-Dist: PyPDF2>=3.0.1
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: requires-dist
24
+ Dynamic: requires-python
25
+ Dynamic: summary
26
+
27
+ Sample usage:
28
+ ```
29
+ import asyncio
30
+ from your_evaluator_module import HomeworkEvaluator
31
+
32
+ async def main():
33
+ evaluator = HomeworkEvaluator()
34
+ question_content = """
35
+ Q1: What is a Python list? Explain with an example.
36
+
37
+ Q2: Write an SQL query to select all records from a table named 'students'.
38
+ """
39
+ answer_path = "sample_submissions/student1_answer.py"
40
+ question_type = "python"
41
+
42
+ result = await evaluator.evaluate_from_content(
43
+ question_content=question_content,
44
+ answer_path=answer_path,
45
+ api_key="your_api_key",
46
+ question_type=question_type
47
+ )
48
+ print(result)
49
+
50
+ if __name__ == "__main__":
51
+ asyncio.run(main())
52
+ ```
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="QuantumChecker",
5
- version="0.3.6",
5
+ version="0.3.7",
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.",
@@ -1,6 +1,4 @@
1
1
  import asyncio
2
- import os
3
- import psutil
4
2
  from pprint import pprint
5
3
  from QuantumCheck import HomeworkEvaluator
6
4
 
@@ -8,36 +6,31 @@ API_KEY = "AIzaSyDw76DEINpfBVgwIEZLShhy97tvWg7BmzY"
8
6
 
9
7
  question_sets = {
10
8
  "python": "Write a Python function to calculate factorial.\nWrite a Python script to reverse a string.",
11
- "powerbi": "Create a Power BI report with a bar chart.\nExplain DAX measures for sales analysis.",
9
+ "powerbi": "Create a Power BI report\nExplain DAX measures for sales analysis.",
12
10
  "sql": "Write a SQL query to join two tables.\nWrite a SQL query for aggregate functions.",
13
11
  "ssis": "Design an SSIS package for data import.\nExplain SSIS control flow tasks."
14
12
  }
15
13
 
16
14
  answer_paths = {
17
- "python": ["../tests/answer/python1.zip"],
18
- "powerbi": ["../tests/answer/homework2_last.pdf"],
19
- "sql": ["../tests/answer/sql3.zip"],
20
- "ssis": ["../tests/answer/answer.dtsx"]
15
+ "python": ["../tests/answers/second_highest_salary.py"],
16
+ "powerbi": ["../tests/answers/random_diagrams.pdf"],
17
+ "sql": ["../tests/answers/second_highest_salary.sql"],
18
+ "ssis": ["../tests/answers/Package.dtsx"]
21
19
  }
22
20
 
23
21
  async def main():
24
22
  evaluator = HomeworkEvaluator()
25
- process = psutil.Process(os.getpid())
26
23
 
27
24
  for qtype, question in question_sets.items():
28
25
  for ans in answer_paths[qtype]:
29
- mem_before = process.memory_info().rss
30
26
  evaluation = await evaluator.evaluate_from_content(
31
27
  question_content=question,
32
28
  answer_path=ans,
33
29
  api_key=API_KEY,
34
30
  question_type=qtype
35
31
  )
36
- mem_after = process.memory_info().rss
37
- delta_mb = (mem_after - mem_before) / 1024**2
38
32
 
39
33
  print(f"{qtype} | {ans}")
40
- print(f"📈 Memory used for evaluation: {delta_mb:.2f} MB")
41
34
  print(f"✅ Evaluation result: {pprint(evaluation)}")
42
35
  print("-" * 40)
43
36
 
@@ -4,8 +4,8 @@ from QuantumCheck import HomeworkEvaluator
4
4
 
5
5
  API_KEY = "AIzaSyDw76DEINpfBVgwIEZLShhy97tvWg7BmzY"
6
6
 
7
- question = "Create a Power BI report with a bar chart.\nExplain DAX measures for sales analysis."
8
- answer_path = "../tests/answer/test.pdf"
7
+ question = "Create ssis file"
8
+ answer_path = "../tests/answers/Package.dtsx"
9
9
 
10
10
  async def main():
11
11
  evaluator = HomeworkEvaluator()
@@ -13,7 +13,7 @@ async def main():
13
13
  question_content=question,
14
14
  answer_path=answer_path,
15
15
  api_key=API_KEY,
16
- question_type="powerbi"
16
+ question_type="ssis"
17
17
  )
18
18
 
19
19
  print(f"PowerBI | {answer_path}")
File without changes