dsap-cli 0.1.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,103 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # PyInstaller
28
+ *.manifest
29
+ *.spec
30
+
31
+ # Installer logs
32
+ pip-log.txt
33
+ pip-delete-this-directory.txt
34
+
35
+ # Unit test / coverage reports
36
+ htmlcov/
37
+ .tox/
38
+ .nox/
39
+ .coverage
40
+ .coverage.*
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+ *.cover
45
+ *.py,cover
46
+ .hypothesis/
47
+ .pytest_cache/
48
+
49
+ # Translations
50
+ *.mo
51
+ *.pot
52
+
53
+ # Environments
54
+ .env
55
+ .env.local
56
+ .env.*.local
57
+ .venv
58
+ env/
59
+ venv/
60
+ ENV/
61
+ env.bak/
62
+ venv.bak/
63
+
64
+ # IDE
65
+ .idea/
66
+ .vscode/
67
+ *.swp
68
+ *.swo
69
+ *~
70
+
71
+ # mypy
72
+ .mypy_cache/
73
+ .dmypy.json
74
+ dmypy.json
75
+
76
+ # ruff
77
+ .ruff_cache/
78
+
79
+ # Secrets - NEVER commit these
80
+ .pypirc
81
+ *.pem
82
+ *.key
83
+ secrets.json
84
+ credentials.json
85
+ PyPI-Recovery-Codes.txt
86
+ *-Recovery-Codes.txt
87
+
88
+ # Development planning files
89
+ plan.md
90
+ docs/
91
+
92
+ # OS files
93
+ .DS_Store
94
+ Thumbs.db
95
+
96
+ # Local development database (user data is in ~/.dsap/)
97
+ *.db
98
+
99
+ # uv lock file (commit for reproducible builds)
100
+ # uv.lock
101
+
102
+ # Claude Code settings (local development)
103
+ .claude/
@@ -0,0 +1,87 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ <!-- ---
9
+
10
+ ## [Unreleased]
11
+
12
+ --- -->
13
+
14
+ ## [0.1.0] - 2026-03-08
15
+
16
+ ### Added
17
+
18
+ #### SM-2 Algorithm Implementation
19
+ - Full implementation of the SuperMemo 2 spaced repetition algorithm
20
+ - Quality ratings from 0–5 for flexible recall assessment
21
+ - Automatic interval calculation based on easiness factor
22
+ - Minimum easiness factor of 1.3 to prevent over-aggressive scheduling
23
+
24
+ #### Problem Management
25
+ - `dsap load` — Load curated problem sets (Blind 75, NeetCode 150, Grind 75)
26
+ - `dsap add` — Add custom problems with title, URL, difficulty, and category
27
+ - `dsap reset` — Reset problems and/or progress with flexible options
28
+ - Support for custom YAML problem set files
29
+ - Problem categorization by topic (Arrays, Trees, Graphs, etc.)
30
+ - Difficulty levels: Easy, Medium, Hard
31
+
32
+ #### Problem Sets
33
+ - Blind 75 — 75 essential interview problems
34
+ - NeetCode 150 — 150 comprehensive curriculum problems
35
+ - Grind 75 — 75 flexible study roadmap problems
36
+
37
+ #### Review System
38
+ - `dsap review` — Interactive review sessions with due problems
39
+ - `dsap next` — Get the next recommended problem
40
+ - Smart prioritization: due problems > new problems > hardest problems
41
+ - `--set` filter for focusing on specific problem sets
42
+ - `--difficulty` filter for targeting specific difficulty levels
43
+ - `--category` filter for practicing specific topics
44
+ - `--new-only` flag for getting only unattempted problems
45
+
46
+ #### Progress Tracking
47
+ - `dsap stats` — Comprehensive statistics dashboard
48
+ - Track solved problems, review counts, and streaks
49
+ - Per-difficulty breakdown (Easy / Medium / Hard)
50
+ - Due today and due this week counts
51
+ - `dsap list` — List problems with filters
52
+
53
+ #### Configuration
54
+ - `dsap config` — View and modify settings
55
+ - `preferred_set` — Set default problem set for all commands
56
+ - `preferred_difficulty` — Filter recommendations by difficulty
57
+ - `daily_goal` — Target problems per day
58
+ - `show_hints` — Toggle problem hints
59
+ - `auto_open_browser` — Toggle auto-opening problems in browser
60
+ - Flexible set name parsing (accepts `blind75`, `Blind 75`, `blind_75`, etc.)
61
+
62
+ #### CLI Features
63
+ - Built with Click for robust command-line interface
64
+ - Rich terminal UI with colors and tables
65
+ - Comprehensive `--help` for all commands
66
+
67
+ #### Documentation
68
+ - USER_GUIDE.md — Complete daily workflow guide
69
+ - Detailed README with examples
70
+
71
+ #### Data Storage
72
+ - SQLite database for reliable local storage
73
+ - Stored in `~/.dsap/dsap.db`
74
+ - Configuration in `~/.dsap/config.json`
75
+
76
+ ### Technical
77
+
78
+ - Python 3.10+ support
79
+ - Type hints throughout the codebase (mypy strict mode)
80
+ - Pydantic v2 models for data validation
81
+ - Comprehensive test suite (134 tests)
82
+ - Google Python Style Guide compliance (ruff + pydocstyle)
83
+
84
+ ---
85
+
86
+ [Unreleased]: https://github.com/juma-paul/dsap-cli/compare/v0.1.0...HEAD
87
+ [0.1.0]: https://github.com/juma-paul/dsap-cli/releases/tag/v0.1.0
dsap_cli-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Juma R. Paul
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,287 @@
1
+ Metadata-Version: 2.4
2
+ Name: dsap-cli
3
+ Version: 0.1.0
4
+ Summary: A CLI for mastering Data Structures & Algorithms using spaced repetition (SM-2).
5
+ Project-URL: Homepage, https://github.com/alquatra/dsap
6
+ Project-URL: Documentation, https://github.com/alquatra/dsap#readme
7
+ Project-URL: Repository, https://github.com/alquatra/dsap.git
8
+ Project-URL: Issues, https://github.com/alquatra/dsap/issues
9
+ Project-URL: Changelog, https://github.com/alquatra/dsap/blob/main/CHANGELOG.md
10
+ Author-email: "Juma R. Paul" <jumarobertpaul@gmail.com>
11
+ Maintainer-email: "Juma R. Paul" <jumarobertpaul@gmail.com>
12
+ License-Expression: MIT
13
+ License-File: LICENSE
14
+ Keywords: algorithms,cli,coding-interview,data-structures,dsa,leetcode,sm2,spaced-repetition,study
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Environment :: Console
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Intended Audience :: Education
19
+ Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: Natural Language :: English
21
+ Classifier: Operating System :: OS Independent
22
+ Classifier: Programming Language :: Python :: 3 :: Only
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Topic :: Education
28
+ Classifier: Topic :: Software Development
29
+ Classifier: Typing :: Typed
30
+ Requires-Python: >=3.10
31
+ Requires-Dist: click<9,>=8.1
32
+ Requires-Dist: pydantic<3,>=2
33
+ Requires-Dist: pyyaml<7,>=6
34
+ Requires-Dist: rich<14,>=13
35
+ Provides-Extra: dev
36
+ Requires-Dist: mypy<2,>=1; extra == 'dev'
37
+ Requires-Dist: pre-commit<4,>=3; extra == 'dev'
38
+ Requires-Dist: pytest-cov<5,>=4; extra == 'dev'
39
+ Requires-Dist: pytest<9,>=8; extra == 'dev'
40
+ Requires-Dist: ruff<1,>=0.4; extra == 'dev'
41
+ Requires-Dist: types-pyyaml<7,>=6; extra == 'dev'
42
+ Description-Content-Type: text/markdown
43
+
44
+
45
+
46
+ # Data Structures and Algorithms Practice (DSAP)
47
+
48
+ [![PyPI version](https://badge.fury.io/py/dsap-cli.svg)](https://pypi.org/project/dsap-cli/)
49
+ [![PyPI downloads](https://img.shields.io/pypi/dm/dsap-cli)](https://pypi.org/project/dsap-cli/)
50
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
51
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
52
+
53
+ DSAP is a terminal-first CLI that schedules coding interview problems using the **SM-2 spaced repetition algorithm**, helping you retain patterns long-term instead of forgetting them after solving once.
54
+
55
+ ---
56
+
57
+ # Why DSAP?
58
+
59
+ Most developers preparing for technical interviews solve algorithm problems once and never revisit them.
60
+
61
+ As a result, they forget patterns they previously learned.
62
+
63
+ DSAP solves this by scheduling problems using **spaced repetition**, a learning technique proven to improve long-term memory.
64
+
65
+ Benefits:
66
+
67
+ - Retain algorithm patterns long-term
68
+ - Structured daily practice
69
+ - Automatic scheduling of reviews
70
+ - Focus on problems you’re about to forget
71
+
72
+ Instead of guessing what to practice next, **DSAP tells you exactly what to review**.
73
+
74
+ ---
75
+
76
+ # Installation
77
+
78
+ ```bash
79
+ # Recommended
80
+ uv tool install dsap-cli
81
+
82
+ # Alternatives
83
+ pipx install dsap-cli
84
+ pip install dsap-cli
85
+ ```
86
+
87
+ Verify installation:
88
+
89
+ ```bash
90
+ dsap --version
91
+ ```
92
+
93
+ ---
94
+
95
+ # Quick Start
96
+
97
+ ```bash
98
+ # Load problems and set focus
99
+ dsap load blind75
100
+ dsap config preferred_set blind75
101
+
102
+ # Start practicing
103
+ dsap next
104
+ ```
105
+
106
+ For the full workflow see:
107
+
108
+ ```
109
+ USER_GUIDE.md
110
+ ```
111
+
112
+ ---
113
+
114
+ # Example Session
115
+
116
+ ```
117
+ $ dsap next
118
+
119
+ 📌 Next Problem
120
+ Two Sum (Easy)
121
+
122
+ Category: Arrays
123
+ Set: Blind 75
124
+
125
+ Open problem in browser? [y/N]
126
+
127
+ After solving, rate your recall:
128
+
129
+ 5 - Perfect
130
+ 4 - Good
131
+ 3 - Hard
132
+ 2 - Incorrect but remembered idea
133
+ 1 - Incorrect
134
+ 0 - Complete blackout
135
+ ```
136
+
137
+ DSAP then schedules the next review automatically.
138
+
139
+ ---
140
+
141
+ # Commands
142
+
143
+ | Command | Description |
144
+ |--------|-------------|
145
+ | `dsap next` | Get next recommended problem |
146
+ | `dsap review` | Review due problems in a session |
147
+ | `dsap list` | List problems with filters |
148
+ | `dsap stats` | View progress and statistics |
149
+ | `dsap load` | Load curated problem sets |
150
+ | `dsap config` | Manage configuration |
151
+ | `dsap reset` | Reset problems and/or progress |
152
+ | `dsap add` | Add a custom problem |
153
+
154
+ ---
155
+
156
+ # Examples
157
+
158
+ ```bash
159
+ # Filter by problem set
160
+ dsap next --set blind75
161
+ dsap review --set neetcode150
162
+
163
+ # Filter by difficulty
164
+ dsap next --difficulty Easy
165
+ dsap list --difficulty Hard
166
+
167
+ # Filter by category
168
+ dsap list --category "Dynamic Programming"
169
+
170
+ # Other options
171
+ dsap review --limit 5
172
+ dsap next --new-only
173
+ dsap list --due
174
+
175
+ # Reset progress
176
+ dsap reset --progress
177
+
178
+ # Reset a specific set
179
+ dsap reset --set blind75 --all
180
+ ```
181
+
182
+ ---
183
+
184
+ # Problem Sets
185
+
186
+ | Set | Problems | Description |
187
+ |----|----|----|
188
+ | `blind75` | 75 | Core interview essentials |
189
+ | `neetcode150` | 150 | Comprehensive curriculum |
190
+ | `grind75` | 75 | Flexible study roadmap |
191
+
192
+ ```bash
193
+ dsap load --list
194
+ dsap load blind75
195
+ dsap load ./custom.yaml
196
+ ```
197
+
198
+ ---
199
+
200
+ # Configuration
201
+
202
+ ```bash
203
+ dsap config --list
204
+ dsap config preferred_set blind75
205
+ dsap config daily_goal 5
206
+ dsap config preferred_difficulty Medium
207
+ dsap config auto_open_browser false
208
+ dsap config --reset
209
+ ```
210
+
211
+ | Setting | Default | Description |
212
+ |----|----|----|
213
+ | `preferred_set` | None | Default problem set |
214
+ | `daily_goal` | 5 | Target problems per day |
215
+ | `preferred_difficulty` | None | Filter by difficulty |
216
+ | `show_hints` | true | Show problem hints |
217
+ | `auto_open_browser` | true | Open problems in browser |
218
+
219
+ ---
220
+
221
+ # How It Works
222
+
223
+ DSAP implements the **SM-2 (SuperMemo 2)** spaced repetition algorithm.
224
+
225
+ After solving each problem, rate your recall from **0–5**.
226
+
227
+ | Rating | Meaning | Effect |
228
+ |----|----|----|
229
+ | 5 | Perfect | Interval grows |
230
+ | 4 | Good | Interval grows |
231
+ | 3 | Hard | Interval grows slowly |
232
+ | 0-2 | Forgot | Interval resets |
233
+
234
+ Typical interval progression:
235
+
236
+ ```
237
+ 1 day → 6 days → 15 days → 38 days → 95 days
238
+ ```
239
+
240
+ After several successful reviews, problems reappear only every few months.
241
+
242
+ ---
243
+
244
+ # Data Storage
245
+
246
+ DSAP stores all data locally:
247
+
248
+ ```
249
+ ~/.dsap/
250
+ ├── dsap.db
251
+ └── config.json
252
+ ```
253
+
254
+ To completely uninstall:
255
+
256
+ ```bash
257
+ uv tool uninstall dsap-cli
258
+ rm -rf ~/.dsap
259
+ ```
260
+
261
+ ---
262
+
263
+ # Development
264
+
265
+ ```bash
266
+ git clone https://github.com/juma-paul/dsap-cli.git
267
+ cd dsap-cli
268
+
269
+ uv sync --all-extras
270
+ uv run pytest
271
+ ```
272
+
273
+ ---
274
+
275
+ # Changelog
276
+
277
+ See the full release history in:
278
+
279
+ ```
280
+ CHANGELOG.md
281
+ ```
282
+
283
+ ---
284
+
285
+ # License
286
+
287
+ MIT