{"id":19306248,"url":"https://github.com/audrbar/py-task-mng","last_synced_at":"2025-04-22T12:35:39.922Z","repository":{"id":241823071,"uuid":"807726510","full_name":"audrbar/py-task-mng","owner":"audrbar","description":"The Project Management App is a simple web-based application built using Python, SQLAlchemy and Streamlit. ","archived":false,"fork":false,"pushed_at":"2024-09-09T19:05:13.000Z","size":1028,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-09T23:35:00.119Z","etag":null,"topics":["postgresql","python","sqlalchemy","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/audrbar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-05-29T16:51:06.000Z","updated_at":"2024-09-09T19:05:16.000Z","dependencies_parsed_at":"2024-05-30T06:59:25.165Z","dependency_job_id":"4de838dc-3ef4-49ff-ae2e-708e87d27e74","html_url":"https://github.com/audrbar/py-task-mng","commit_stats":null,"previous_names":["audrbar/py-task-mng"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audrbar%2Fpy-task-mng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audrbar%2Fpy-task-mng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audrbar%2Fpy-task-mng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audrbar%2Fpy-task-mng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/audrbar","download_url":"https://codeload.github.com/audrbar/py-task-mng/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223897020,"owners_count":17221475,"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":["postgresql","python","sqlalchemy","streamlit"],"created_at":"2024-11-10T00:05:06.592Z","updated_at":"2024-11-10T00:05:07.397Z","avatar_url":"https://github.com/audrbar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)\n![Hackage Dependencies](https://img.shields.io/hackage-deps/v/:packageName)\n# Project Management App\n## Description\nThis Project Management App is a simple web-based application built using Python, PostgreSQL, SQLAlchemy and Streamlit.\nThe app allows users to manage projects, tasks, and assignees. It supports basic operations such as creating database tables,\nseeding the database with initial data, and performing CRUD (Create, Read, Update, Delete) operations on the data\nusing SQLAlchemy Object Relational Mapper. The app features one-to-one, one-to-many, and many-to-many relationships\namong the entities.\n## Features\n- Create Database: Automatically generate the database schema based on defined SQLAlchemy models.\n- Seed Database: Populate the database with initial dummy data, including projects, managers, tasks and assignees.\n- CRUD Operations: Perform operations such as creating, reading, updating, and deleting projects, managers, tasks,\nand assignees.\n- One-to-One Relationship: Between Project and Manager with cascading deletes.\n- One-to-Many Relationship: Between Project and Task.\n- Many-to-Many Relationship: Between Task and Assignee.\n- Streamlit Interface: A user-friendly interface for interacting with the database.\n## Installation\n1. Clone the Repository\n    ```\n    git clone https://github.com/audrbar/py-task-mng.git\n    cd py-task-mng\n    ```\n2. Create and Activate a Virtual Environment\n    ```\n    python3 -m venv venv\n    source venv/bin/activate\n    ```\n    On Windows use\n    ```\n    venv\\Scripts\\activate\n    ```\n3. Install Dependencies\n    ```\n    pip install -r requirements.txt\n    ```\n4. Set Up Environment Variables\u003cbr\u003eRename a `env.template` file to `.env` in the root directory with the following content:\u003cbr\u003e\n    ```\n    dbname=your_db_name\n    user=your_db_user\n    password=your_db_password\n    host=your_db_host\n    port=your_db_port\n    ```\n5. Run the App:\n    ```\n    streamlit run Home.py\n    ```\n## Usage\nOpen `db_seed.py` file, run `main()` function and type the number corresponding to the action you want to perform and\npress Enter:\n- **Option 1:** `Drop all tables in the database` This option will delete all the tables in the database. After\nselecting this option, all existing tables will be dropped from the database. Use this option if you want to start\nfresh or reset the database schema.\n- **Option 2:** `Create database tables Model provides` This option will create the database tables as defined\nby your ORM models. After selecting this option, the database tables will be created based on the models\ndefined in your code. Use this option to set up the database structure.\n- **Option 3:** `Seed database with dummy data` This option will populate the database with dummy data,\nwhich is useful for testing or development purposes. After selecting this option, the database will be filled with\npredefined sample data.\n- **Option 4:** `Just exit` This option will exit the script without making any changes to the database. If you choose\nthis option, the script will close the session and terminate.\n- **Explore App Features:** Perform operations such as creating, reading, updating, and deleting projects, managers,\ntasks and assignees. The script ensures that the database session is properly closed after any operation, ensuring\nno resources are left hanging.\n## Code Structure\n- `Home.py`: The main Streamlit application file.\n- `models.py`: Contains the SQLAlchemy models for `Project`, `Manager`, `Task`, and `Assignee`.\n- `database.py`: Contains functions to create, drop, and seed the database.\n- `requirements.txt`: Lists the Python dependencies required to run the app.\n- `.env`: Environment file for storing database credentials.\n## Data Sources\nFor testing purposes the initial data set may be used:\n\n| File Name     | Source                                | Source Link                 |\n|---------------|---------------------------------------|-----------------------------|\n| dummy_data.py | Some Demo Data for Project Management | [LINK](./src/dummy_data.py) |\n## Class Diagram\nClass Diagram was used to design the classes:\n![Class Diagram](./img/class_diagram.png)\n## DataBase Diagram\nDatabase Diagram was used to design the database structure:\n![Database Diagram](img/db_diagram.png)\n## Running tests\nThere are tests writen for connection, functions and dataframe testing in [tests directory](./tests).\nYou can run it in console by command:\n   ```\n   python -m unittest discover -s tests\n   ```\nor\n   ```\n   pytest\n   ```\n## Pre-Commit Hooks\nThis project uses pre-commit hooks to enforce code quality and style guidelines before changes are committed.\nTrailing Whitespace Removal, End of File Fixer, YAML Syntax Check, Large File Check, Python Docstring Style Check,\nStatic Type Checking with MyPy hooks are configured in [pre-commit-config.yaml](./.pre-commit-config.yaml) file.\u003cbr\u003e\nTo install and use these hooks, make sure you have pre-commit installed. You can install it via pip:\n   ```\n   pip install pre-commit\n   ```\nThen, set up the hooks by running:\n   ```\n   pre-commit install\n   ```\nTo run pre-commit:\n   ```\n   pre-commit run --all-files\n   ```\n## Project status\nWay forward:\n- Improve Error handling.\n- Implement State Management.\n- Enhance analytics with more charts.\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request if you have any improvements or bug fixes.\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudrbar%2Fpy-task-mng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faudrbar%2Fpy-task-mng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudrbar%2Fpy-task-mng/lists"}