Welcome to the Documentation Hub
Teaching and working with adolescents is one of the busiest jobs. The abundance of audiences,
curriculum requirements, age, emotional, and learning sensitivities on the one hand, and the
abundance of job duties on the other, make teachers one of the busiest employees. Despite the
availability of ready-made textbooks, one of their most important tasks is to prepare and compile
a variety of teaching resources tailored to the needs of learners. In addition, compiling tests to
measure academic progress, understanding the emotional needs of learners, making appropriate decisions
at critical moments of interaction with audiences, and guiding them on the path of appropriate and
personalized learning are among the most important issues related to the job of teachers. This
program is a personal program in which we try to record all events throughout the school year so
that we can gain appropriate insights about the above topics and, based on the data collected,
we can make effective decisions and discover appropriate methods of dealing with different situations.
With its help, we can compile a set of educational materials and extract unique results from the data.
Note: This document is written only for memorizing code
functionality and program design and currently serves no other purpose.
Introduction
This document serves as my personal technical reference and developer notes for the Teacher Assistant application.
As the sole developer of this project, I've created this guide to document the codebase architecture, design decisions,
and development procedures for my own reference. This helps me remember implementation details, understand the
rationale behind architectural choices, and quickly recall how to set up, build, and maintain the application.
The Teacher Assistant is a desktop application built with Python and PySide6 (Qt for Python), designed to help
educators manage their teaching activities, track student progress, compile educational materials, and make
data-driven decisions throughout the school year. The application follows modern software development practices
and is structured to be maintainable and extensible.
This developer guide documents various aspects of the project, including:
- Project setup and development environment configuration
- Application architecture and code organization
- Core concepts and design patterns used throughout the codebase
- Build and packaging procedures
- Resource management and icon integration
- Best practices and coding standards
- Practical examples and common development scenarios
This guide is a living document that evolves with the project, serving as both a memory aid and a reference
manual for ongoing development work. It helps me quickly recall how different components interact, understand
past architectural decisions, and efficiently navigate and modify the codebase.
Chapter 1: Getting Started
This section explains how to set up, run, build, and package the
Teacher Assistant application.
1. Running the Application
-
Activate the virtual environment:
env\Scripts\activate
-
Run the application: Use the Run option from the VS Code menu,
or run from terminal python main.py
2. Installing Required Dependencies
This project depends on the custom UI package
PySideAbdhUI. You can install it using one of the
following methods:
-
Option 1 - Install from local wheel file:
pip install F:\Projects\Python\PySideAbdhUI\dist\PySideAbdhUI-[version]-py3-none-any.whl
-
Option 2 - Install using project Python interpreter:
env\Scripts\python.exe -m pip install F:\Projects\Python\PySideAbdhUI
-
Option 3 - Editable install (recommended for developers):
pip install -e F:\Projects\Python\PySideAbdhUI
-
Option 4 - Install directly from GitHub:
pip install git+https://github.com/abdhmohammadi/PySideAbdhUI.git
-
Option 5 - Install from wheel using project path:
cd F:\Projects\Python\Teaching-assistant-project\TeacherAssistant
env\Scripts\python.exe -m pip install F:\Projects\Python\PySideAbdhUI\dist\PySideAbdhUI-[version]-py3-none-any.whl
3. Building the Application (Windows)
Step 1: Create Executable with PyInstaller
pyinstaller scripts\TeacherAssistant.spec
If PyInstaller is not available in PATH, use:
C:\Users\[user]\AppData\Roaming\Python\Python314\Scripts\pyinstaller scripts\TeacherAssistant.spec
Step 2: Create Windows Installer
Use Inno Setup to generate a professional Windows
installer from the executable files.
4. Icons and Resources
All icons have been downloaded from the free version of
Lucide Icons (and modified if needed) and placed in src/teacher_assistant/resources/.
For portable usage of the icons, we created resources.qrc from PNG and SVG files. The script scripts/build_qrc.py
generates resources.qrc in the resources folder. We need to compile resources.qrc to generate embedded icon files.
Any changes in resources.qrc require recompiling this file. The script scripts/compile_qrc.py performs this task
and creates resources_rc.py. We imported resources_rc in src/teacher_assistant/core/app_context.py to use icons
in the app scope.
In short:
- Icons are stored in
src/teacher_assistant/resources
- Icons are embedded using a Qt resource file (
resources.qrc)
-
scripts/build_qrc.py generates the resources.qrc
file from PNG and SVG icons
-
scripts/compile_qrc.py compiles the QRC file into
resources_rc.py
-
Any change in
resources.qrc requires recompilation
-
resources_rc.py is imported in
app_context.py to make icons available application-wide
Section 1.1
More detailed content...