Productivity toolkit with three subpackages (core, planner, analytics) plus demos (run_demo.py, test_code.py). Model tasks/habits, generate daily plans, and produce weekly focus analytics.
https://pypi.org/project/focuspro-data533/0.0.1/#description
pip install focuspro-data533==0.0.1
core/— models and state (Task,Habit,FocusSession, managers, exceptions). Seesrc/project/core/introduction.md.planner/— planners, priority strategies, schedulers, andgenerate_daily_plan. Seesrc/project/planner/introduction.md.analytics/— distraction rates, weekly summaries, focus score/grade, markdown export. Seesrc/project/analytics/introduction.md.
- Core:
tasks.py/task.py(task model + manager),habit.py(habit model + manager + CLI helpers),focus_session.py(session lifecycle, distractions, ratings),exceptions.py(domain errors). - Planner:
base_planner.py(planners,PlannedBlock),priority_strategy.py(scoring),schedulers.py(sequential, Pomodoro),daily_plan.py(planner selection + validation). - Analytics:
distraction.py(overall/per-task rates),weekly_report.py(weekly summary + markdown export),focuscore.py(focus score + grade),exceptions.py(report export errors).
1)python src/project/run_demo.py
2)python src/project/run_demo.py --auto
3)python src/project/run_demo.py --fast
4)python src/project/run_demo.py --days N
5)python src/project/run_demo.py --export file.txt
$env:PYTHONPATH="src\project"
python src/project/run_demo.pyPlace JSON alongside run_demo.py:
tasks.json:name,duration,category,difficulty,priority,completed,pomodoro,planned_distractions.habits.json:name,frequency.
$env:PYTHONPATH="src\project"
python -m unittest discover -s tests -t .
python -m coverage run -m unittest discover -s tests -t .
python -m coverage report
## ▶️ Running the Package (Demonstration)
This project includes a Jupyter Notebook that demonstrates how to install and run the published package after uploading it to TestPyPI.
### 📄 Demonstration File
Please refer to the following notebook `test_run_focuspro.ipynb` to see a complete execution example- Planner only:
python -m unittest -v tests.test_planner tests.test_planner_helpers - Core/analytics:
python -m unittest -v tests.test_core tests.test_focuscore
GitHub Actions runs coverage run -m unittest discover -s tests -t . on pushes/PRs (see .github/workflows/ci.yml).
- Persistence is JSON + prompts (educational); swap storage as needed.
- Planners/schedulers are swappable; add strategies without breaking callers.
- Analytics handles malformed data defensively and surfaces export errors via custom exceptions.