{"id":18695145,"url":"https://github.com/ebraheemtammam/ultramacro","last_synced_at":"2025-10-15T01:32:31.595Z","repository":{"id":251331245,"uuid":"767957874","full_name":"EbraheemTammam/UltraMacro","owner":"EbraheemTammam","description":"Educational Management System","archived":false,"fork":false,"pushed_at":"2024-08-08T08:05:32.000Z","size":495,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T07:37:16.027Z","etag":null,"topics":["alembic","fastapi","pytest","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EbraheemTammam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-06T07:59:18.000Z","updated_at":"2024-09-23T13:39:15.000Z","dependencies_parsed_at":"2024-08-02T09:26:22.549Z","dependency_job_id":"e0f502ea-10cd-474f-bc6c-9a438a5a705d","html_url":"https://github.com/EbraheemTammam/UltraMacro","commit_stats":null,"previous_names":["ebraheemtammam/gpa_xl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EbraheemTammam/UltraMacro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EbraheemTammam%2FUltraMacro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EbraheemTammam%2FUltraMacro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EbraheemTammam%2FUltraMacro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EbraheemTammam%2FUltraMacro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EbraheemTammam","download_url":"https://codeload.github.com/EbraheemTammam/UltraMacro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EbraheemTammam%2FUltraMacro/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265179112,"owners_count":23723408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alembic","fastapi","pytest","python3"],"created_at":"2024-11-07T11:14:04.827Z","updated_at":"2025-10-15T01:32:26.566Z","avatar_url":"https://github.com/EbraheemTammam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ultra Macro\nEducational Management System with some data engineering features\n\n\n## Project Overview\nThis project is considered with handling all data concerned with the students throughout their college lifetime beginning from when they register untill graduation. this project using FastAPI which is a python framework and follow app-based structure like Django.\n\n## Database Design\nThe following ERD describes the database design\n\n![ERD of the system](.github/erd.png)\n\n### we have 8 main tables:\n- *regulations*: regulations to be followed in the college\n- *departments*: departments of the college\n- *divisions*: divisions are specialized departments that follow some department\n- *courses*: courses of a regulation\n- *students*: students of the college\n- *enrollments*: enrollments registered for the students\n- *users*: users to use the system\n- *tokens*: corresponding to users\n\n### we also have 2 secondary tables\n- *user_divisions*: represents many to many relation between user and division\n- *course_divisions*: represents many to many relation between course and division\n\n\u003e the alembic version table considered with migrations\n\n\n## Project Structure\nAs we mentioned previously in the overview our project structure is app-based.\nIn this section we'll explain each app and the config of the project.\n\n### migrations \u0026 alembic.ini\nthose are concerned with migrations and config of alembic package that's used to apply migrations on the database\n\n### main.py\ncontains the main app the its configurations. \\\nthis following function includes all routers of the registered apps in the main application\n```py\nfor app_name in settings.APPS:\n\tmodule_path = f\"{app_name}.router\"  # Adjust path as needed\n\tmodule = import_module(module_path)\n\trouter = getattr(module, f\"{app_name}_router\", None)\n\tif app_name in ['authentication', 'user']:\n\t\tapp.include_router(router, prefix='/accounts', tags=['authentication'])\n\t\tcontinue\n\tif app_name == 'upload':\n\t\tapp.include_router(router, prefix='/data', tags=['uploads'])\n\t\tcontinue\n\tapp.include_router(router, prefix=f'/{app_name}s', tags=[f'{app_name}s'])\n```\n\n### config.py\ncontains the main settings of the application to be read from the environment variables, the logging settings and a function to combine all model base as follows:\n```py\ndef get_base():\n    models = []\n    for app in settings.APPS:\n        try:\n            module = import_module(f'{app}.models')\n            logging.info(f'Successfully imported {app}.models')\n        except Exception as e:\n            logging.warning(f'\\tFailed to import {app}.models: {e}')\n            continue\n        base = getattr(module, 'Base', None)\n        if base is not None:\n            models.append(base)\n        else:\n            logging.info(f'No Base in {app}.models')\n\n    if not models:\n        logging.error('No models found with a Base class.')\n        return None\n\n    return models[-1]\n```\n\n### database directory\ncontains all needed database clients: Sync Client, Async Client and Test Client to be used in API testing containd the *tests* directory.\n\n### tests\ncontains API tests and testing configurations to be used by pytest package\n\n### generics\ncontains generic classes to be used directly or as a base class to more specific classes in the system like generic mixins, exceptions and permissions\n\n### other apps\neach app contains 4 file:\n- models.py \\\ncontains orm models \\\ndoesn't depend on other layers\n- schemas.py \\\ncontains data transfer objects \\\ndoesn't depend on other layers\n- handler.py \\\ncontains implementation of main CRUD operations and some more methods for required processes if needed \\\ndepends on schemas and models\n- router.py \\\ncontain the main router to be included in the app and the endpoints defined within it \\\ndepends on handler\n\n### upload app\nthis app has 2 differences from other apps: \\\n- first it have one more file that called xl_handler \\\nthis file contains pandas methods conerned with handling uploaded Excel file using some data engineering technique called Extract Transform Load (ETL) to extract the data from the uploaded file, reforming that data to a proper format for storage and calculations and then load the data inside the system and there are 2 pictures shows the transformation: \\\nraw data before transformation:\n![raw data](.github/raw_data.png)\ndata after cleanup and transformation:\n![transformed data](.github/prepared_data.png)\n\n- second difference is the handler.py file doesn't contain normal CRUD operations like other apps, but instead it contains handlers for uploading the Excel files, apply calculations on the extracted dataand finally store the loaded data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febraheemtammam%2Fultramacro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febraheemtammam%2Fultramacro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febraheemtammam%2Fultramacro/lists"}