casecraft 1.3.0__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.
@@ -0,0 +1,132 @@
1
+ Metadata-Version: 2.4
2
+ Name: casecraft
3
+ Version: 1.3.0
4
+ Summary: A powerful TUI for running algorithmic test cases.
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: textual>=0.40.0
8
+ Requires-Dist: pydantic>=2.0.0
9
+
10
+ # ◆ CaseCraft
11
+
12
+ A terminal-based competitive programming test case runner — think Codeforces local tester, built with Python and Textual.
13
+
14
+ Tokyo Night theme · lazygit-style keybindings · per-file session persistence
15
+
16
+ ---
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ # 1. Clone / unzip the project
22
+ cd CaseCraft
23
+
24
+ # 2. Create a virtual environment (recommended)
25
+ python3 -m venv .venv
26
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
27
+
28
+ # 3. Install dependencies
29
+ pip install -r requirements.txt
30
+
31
+ # 4. Run
32
+ python app.py
33
+ ```
34
+
35
+ Requires **Python 3.12+**.
36
+
37
+ ---
38
+
39
+ ## Usage
40
+
41
+ ### Loading a file
42
+
43
+ Type the path to your `.py` solution in the **FILE** input at the top-left and press `Enter`.
44
+ CaseCraft will load (or create) a session for that file automatically.
45
+
46
+ ### Adding test cases
47
+
48
+ Press **`a`** to open the *Add Test Case* modal.
49
+ Fill in:
50
+ - **Label / Name** — a short description (e.g. *Basic case*, *Edge: empty list*)
51
+ - **Input (stdin)** — what your program reads from stdin
52
+ - **Expected Output** — what your program should print
53
+
54
+ Press `ctrl+s` to save or `Escape` to cancel.
55
+
56
+ ### Running tests
57
+
58
+ | Action | Key |
59
+ |---|---|
60
+ | Run **all** test cases | `ctrl+r` |
61
+ | Run **selected** test case | `Enter` (focus on TC list) |
62
+
63
+ ### Managing test cases
64
+
65
+ | Action | Key |
66
+ |---|---|
67
+ | Add | `a` |
68
+ | Edit selected | `e` |
69
+ | Delete selected | `d` |
70
+ | Switch panels | `Tab` |
71
+ | Quit | `q` |
72
+
73
+ ---
74
+
75
+ ## Verdicts
76
+
77
+ | Badge | Meaning |
78
+ |---|---|
79
+ | `AC` | Accepted — output matches expected |
80
+ | `WA` | Wrong Answer — output differs |
81
+ | `TLE` | Time Limit Exceeded — ran longer than 2 seconds |
82
+ | `RE` | Runtime Error — non-zero exit code or exception |
83
+
84
+ Output comparison normalises whitespace: trailing spaces and blank lines at the end are ignored.
85
+
86
+ ---
87
+
88
+ ## Session System
89
+
90
+ - Every `.py` file gets its own **session** stored in `data/sessions.json`
91
+ - Switching to a different file automatically loads that file's test cases
92
+ - The last opened file is restored on the next launch
93
+ - Sessions survive app restarts — your test cases are always saved
94
+
95
+ ---
96
+
97
+ ## Project Structure
98
+
99
+ ```
100
+ CaseCraft/
101
+ ├── app.py ← Textual app, UI composition, key bindings
102
+ ├── runner.py ← subprocess execution, verdict logic
103
+ ├── models.py ← TestCase, TestResult, Verdict, Session dataclasses
104
+ ├── utils.py ← session I/O, output normalisation, helpers
105
+ ├── requirements.txt
106
+ ├── README.md
107
+ ├── data/
108
+ │ └── sessions.json ← persisted sessions (auto-created)
109
+ └── widgets/
110
+ ├── __init__.py
111
+ ├── add_modal.py ← Add / Edit test case modal
112
+ └── diff_viewer.py ← Expected vs Actual side-by-side viewer
113
+ ```
114
+
115
+ ---
116
+
117
+ ## Screenshots
118
+
119
+ > _Run the app and enjoy the Tokyo Night TUI._
120
+
121
+ ---
122
+
123
+ ## Future Improvements
124
+
125
+ - [ ] Multi-language support (C++, Java, Go) via configurable run commands
126
+ - [ ] Stress tester — generate random inputs and compare two solutions
127
+ - [ ] Memory usage tracking alongside runtime
128
+ - [ ] Import test cases from a plain-text block (paste Codeforces samples)
129
+ - [ ] `ctrl+k` command palette
130
+ - [ ] Export results as a Markdown table
131
+ - [ ] Configurable timeout per test case
132
+ - [ ] Side-by-side character-level diff highlighting
@@ -0,0 +1,123 @@
1
+ # ◆ CaseCraft
2
+
3
+ A terminal-based competitive programming test case runner — think Codeforces local tester, built with Python and Textual.
4
+
5
+ Tokyo Night theme · lazygit-style keybindings · per-file session persistence
6
+
7
+ ---
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ # 1. Clone / unzip the project
13
+ cd CaseCraft
14
+
15
+ # 2. Create a virtual environment (recommended)
16
+ python3 -m venv .venv
17
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
18
+
19
+ # 3. Install dependencies
20
+ pip install -r requirements.txt
21
+
22
+ # 4. Run
23
+ python app.py
24
+ ```
25
+
26
+ Requires **Python 3.12+**.
27
+
28
+ ---
29
+
30
+ ## Usage
31
+
32
+ ### Loading a file
33
+
34
+ Type the path to your `.py` solution in the **FILE** input at the top-left and press `Enter`.
35
+ CaseCraft will load (or create) a session for that file automatically.
36
+
37
+ ### Adding test cases
38
+
39
+ Press **`a`** to open the *Add Test Case* modal.
40
+ Fill in:
41
+ - **Label / Name** — a short description (e.g. *Basic case*, *Edge: empty list*)
42
+ - **Input (stdin)** — what your program reads from stdin
43
+ - **Expected Output** — what your program should print
44
+
45
+ Press `ctrl+s` to save or `Escape` to cancel.
46
+
47
+ ### Running tests
48
+
49
+ | Action | Key |
50
+ |---|---|
51
+ | Run **all** test cases | `ctrl+r` |
52
+ | Run **selected** test case | `Enter` (focus on TC list) |
53
+
54
+ ### Managing test cases
55
+
56
+ | Action | Key |
57
+ |---|---|
58
+ | Add | `a` |
59
+ | Edit selected | `e` |
60
+ | Delete selected | `d` |
61
+ | Switch panels | `Tab` |
62
+ | Quit | `q` |
63
+
64
+ ---
65
+
66
+ ## Verdicts
67
+
68
+ | Badge | Meaning |
69
+ |---|---|
70
+ | `AC` | Accepted — output matches expected |
71
+ | `WA` | Wrong Answer — output differs |
72
+ | `TLE` | Time Limit Exceeded — ran longer than 2 seconds |
73
+ | `RE` | Runtime Error — non-zero exit code or exception |
74
+
75
+ Output comparison normalises whitespace: trailing spaces and blank lines at the end are ignored.
76
+
77
+ ---
78
+
79
+ ## Session System
80
+
81
+ - Every `.py` file gets its own **session** stored in `data/sessions.json`
82
+ - Switching to a different file automatically loads that file's test cases
83
+ - The last opened file is restored on the next launch
84
+ - Sessions survive app restarts — your test cases are always saved
85
+
86
+ ---
87
+
88
+ ## Project Structure
89
+
90
+ ```
91
+ CaseCraft/
92
+ ├── app.py ← Textual app, UI composition, key bindings
93
+ ├── runner.py ← subprocess execution, verdict logic
94
+ ├── models.py ← TestCase, TestResult, Verdict, Session dataclasses
95
+ ├── utils.py ← session I/O, output normalisation, helpers
96
+ ├── requirements.txt
97
+ ├── README.md
98
+ ├── data/
99
+ │ └── sessions.json ← persisted sessions (auto-created)
100
+ └── widgets/
101
+ ├── __init__.py
102
+ ├── add_modal.py ← Add / Edit test case modal
103
+ └── diff_viewer.py ← Expected vs Actual side-by-side viewer
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Screenshots
109
+
110
+ > _Run the app and enjoy the Tokyo Night TUI._
111
+
112
+ ---
113
+
114
+ ## Future Improvements
115
+
116
+ - [ ] Multi-language support (C++, Java, Go) via configurable run commands
117
+ - [ ] Stress tester — generate random inputs and compare two solutions
118
+ - [ ] Memory usage tracking alongside runtime
119
+ - [ ] Import test cases from a plain-text block (paste Codeforces samples)
120
+ - [ ] `ctrl+k` command palette
121
+ - [ ] Export results as a Markdown table
122
+ - [ ] Configurable timeout per test case
123
+ - [ ] Side-by-side character-level diff highlighting
@@ -0,0 +1,17 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "casecraft"
7
+ version = "1.3.0"
8
+ description = "A powerful TUI for running algorithmic test cases."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ dependencies = [
12
+ "textual>=0.40.0",
13
+ "pydantic>=2.0.0",
14
+ ]
15
+
16
+ [project.scripts]
17
+ casecraft = "casecraft.cli:main"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes