230626
Github Commit 1
-
Cleaned Up Project Root & Removed IDE Tracked Artifacts: Deleted the
.idea/directory and its associated configuration files (.gitignore,.iml,misc.xml,vcs.xml) from tracking to keep the repository root clean. -
Implemented Core Allocation Logic (
allocation.py): Created the baseline weighted allocation algorithm featuringSystem,Department, andStaffclasses to handle parking spot distribution based on booking dates, periods, and staff disability priority weightings (+5). -
Expanded Application Routing & Infrastructure (
main.py): Expandedmain.py(+341 / -119 lines) to integrate new UI pages, manage reservation options, and interface with backend state configurations. -
Added Central JSON Storage (
supersecretdata.json): Created a JSON database structure containing department IDs, staff counts across school faculties (English, Mathematics, Science, TAS, CAPA, PD/H/PE, HSIE, etc.), and user profile state objects.
Github Commit 2
-
Removed Obsolete Utilities & File Cleanups: Removed
browsercheck.py, removed unused dependencies fromrequirements.txt(uvloop), and stripped compiled bytecode files (__pycache__). -
Created Error Handling & Helper Stubs: Added basic exception/log handlers (
errorhandler.py), stub functions (function_storage.py), and test scripts (testing.py,boom.txt) for counter tracking and token verification routines. -
Updated Security Credentials: Updated hashed password values in
topsecret/admin.txt.
Stumbling Blocks
-
IDE Metadata Tracking Clutter: Project configuration files from PyCharm (
.idea/) were accidentally committed to the git tree, requiring manual untracking and removal to prevent repository pollution across different developer environments. -
Weighted Allocation Logic & Priority Balancing: Designing the parking allocation engine in
allocation.pypresented challenges in balancing disability priority weightings (+5) against department booking penalties (-0.1per person) and consecutive-day penalties (-0.5), requiring careful iteration on weight decay logic during allocations. -
Syntax & Logical Errors in Helper Scripts: Early helper scripts like
testing.pyhit syntax roadblocks (e.g., missing colons inif read() is True, unhandled file read variables onFileNotFoundError, and returningNonefromprint()functions passed as values). -
Import Scope & Execution Side-Effects: Unwrapped file reads in secondary module scripts caused file-not-found crashes on startup, necessitating isolation into error handlers or explicit conditional blocks.
Reflective Comments
Overall, I made significant progress by building out the core parking allocation model in Python and structuring the data layer using JSON. Moving forward, cleaning up syntax bugs in small helper scripts prior to committing will save time, as will establishing strict .gitignore rules from day one to avoid checking in IDE metadata and bytecode files.
Resources and Code Used
-
Python Standard Libraries: Utilized standard library modules (
os,datetime,json) to handle file parsing, user data persistence, and system date tracking. -
NiceGUI & FastAPI Ecosystem: Leveraged NiceGUI for front-end rendering, routing, and interactive page layouts built on top of FastAPI and Uvicorn.
-
Object-Oriented Programming (OOP): Applied standard Python OOP patterns (
System,Department,Staffclasses) to manage state, calculate priority weights, and execute spot allocations.