{"id":19091942,"url":"https://github.com/matheusafonseca/c214-projeto1","last_synced_at":"2026-06-17T18:04:41.219Z","repository":{"id":257050306,"uuid":"853032020","full_name":"matheusAFONSECA/C214-projeto1","owner":"matheusAFONSECA","description":"Repository dedicated to the first project of the discipline C214 - Software Engineering at INATEL. The project consists of a modularized Python application that includes automation scripts and organized code.","archived":false,"fork":false,"pushed_at":"2024-09-30T22:07:57.000Z","size":197,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T07:31:41.967Z","etag":null,"topics":["mock","python","tests","unit-testing"],"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/matheusAFONSECA.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-09-05T21:30:51.000Z","updated_at":"2024-10-30T15:04:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c94139e-b7c4-415b-8fd9-db1cb23a671b","html_url":"https://github.com/matheusAFONSECA/C214-projeto1","commit_stats":null,"previous_names":["matheusafonseca/c214-projeto1"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/matheusAFONSECA/C214-projeto1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusAFONSECA%2FC214-projeto1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusAFONSECA%2FC214-projeto1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusAFONSECA%2FC214-projeto1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusAFONSECA%2FC214-projeto1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matheusAFONSECA","download_url":"https://codeload.github.com/matheusAFONSECA/C214-projeto1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusAFONSECA%2FC214-projeto1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283910126,"owners_count":26915128,"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","status":"online","status_checked_at":"2025-11-11T02:00:06.610Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["mock","python","tests","unit-testing"],"created_at":"2024-11-09T03:17:36.521Z","updated_at":"2025-11-11T18:34:15.372Z","avatar_url":"https://github.com/matheusAFONSECA.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C214 - Project 1\n\nRepository dedicated to the first project of the discipline **C214 - Software Engineering** at **INATEL**. The project consists of a modularized Python application that includes automation scripts and organized code.\n\n## Overview\n\nThe main objective of this project is to create a Python application using good software development practices, such as code modularization, virtual environment setup, and automation scripts to simplify the workflow. The application allows for data manipulation from a JSON file, unit testing, and the use of auxiliary scripts to automate recurring tasks such as creating virtual environments and Git commits.\n\n## Folder Structure\n\nThe project folder structure is organized as follows:\n\n```mermaid\ngraph TD;\n    A[C214-PROJETO1] --\u003e B[data]\n    A --\u003e C[images]\n    A --\u003e D[scripts]\n    A --\u003e E[src]\n    A --\u003e F[.gitignore]\n    A --\u003e G[main.sh]\n    A --\u003e H[README.md]\n    A --\u003e I[requirements.txt]\n\n    B --\u003e J[dados.json]\n\n    C --\u003e K[authors.png]\n\n    D --\u003e L[create_and_activate_venv.sh]\n    D --\u003e M[git_commit.sh]\n    D --\u003e N[message.txt]\n    D --\u003e O[update_and_create_requirements.sh]\n\n    E --\u003e P[modules]\n    E --\u003e Q[tests]\n\n    P --\u003e S[__init__.py]\n    P --\u003e T[mock_test.py]\n    P --\u003e U[modules.py]\n\n    Q --\u003e W[__init__.py]\n    Q --\u003e X[test_atendimento.py]\n    Q --\u003e Y[test_professor_data.py]\n    Q --\u003e Z[test_professor_name.py]\n```\n\n## Folder Explanation\n\n- **scripts/**: Contains utility scripts that automate recurring tasks:\n  - **create_and_activate_venv.sh**: Creates and activates a Python virtual environment. This script installs all necessary dependencies for the development environment, ensuring that libraries are not installed globally, which helps avoid version conflicts.\n  - **update_and_create_requirements.sh**: Automates the process of updating and creating the `requirements.txt` file, which lists all project dependencies. It ensures that `requirements.txt` is always up-to-date with the libraries installed in the virtual environment.\n  - **git_commit.sh**: Facilitates the Git commit process by allowing the user to set a commit message in a file (`message.txt`) and executing the `git commit` command automatically with that message. This streamlines the Git workflow.\n\n- **src/**: Main source code folder. Contains the project modules and tests:\n  - **modules/**: Contains the main application modules:\n    - **modules.py**: This file contains the core modules of the application. It implements the main functionalities of the project used by other parts of the code.\n    - **mock_test.py**: A test module that contains mocks used in unit tests. It simulates the behavior of functions or classes in a controlled manner to test parts of the code in isolation.\n  - **tests/**: Contains unit tests and mocks related to the project:\n    - **test_atendimento.py**, **test_professor_data.py**, **test_professor_name.py**: Unit test files for different parts of the project. They verify that the methods and functionalities of the project are working as expected, helping ensure code stability.\n\n- **data/**: Contains data files:\n  - **dados.json**: A JSON file used by the project for data input.\n\n- **requirements.txt**: List of dependencies required to run the project.\n\n- **.gitignore**: Configuration file to ignore unwanted files and folders in Git.\n\n- **README.md**: Project documentation file.\n\n- **main.sh**: A Bash script that serves as the entry point for running tests. It can be configured to execute all tests defined in the files within the `tests` folder.\n\n## How to Run the Project\n\n### Creating and Activating the Virtual Environment\n\nTo ensure an isolated environment for the project, you need to create a virtual environment. There are two ways to create and activate the virtual environment:\n\n#### Traditional Method\n\n1. Create a virtual environment using the command:\n    ```bash\n    python -m venv C214venv\n    ```\n\n2. Activate the virtual environment:\n- Windows:\n    ```bash\n    .\\venv\\Scripts\\activate\n    ```\n\n- Linux or macOS:\n    ```bash\n    source venv/bin/activate\n    ```\n\n#### Using the Available Script\n\n1. Use the `create_and_activate_venv.sh` script to automate the creation and activation of the virtual environment:\n\n    ```bash\n    ./scripts/create_and_activate_venv.sh\n    ```\n\n### Installing Dependencies\n\nOnce the virtual environment is activated, install the necessary dependencies by running the command:\n\n```bash\npip install -r requirements.txt\n```\n\n### Running the Tests\n\n#### Running Tests via Terminal\n\nTo run the tests directly from the terminal, use the following command:\n\n```bash\npython -m unittest discover -s src/tests\n```\n\n#### Running Tests Using the Provided Script\n\nTo run the tests using a script, you can use the following command:\n\n```bash\n./main.sh\n```\n\n## Authors\n\n![Autores - Tico e Teco](images/authors.png)\n\n*Tico (Matheus) and Teco (Álvaro) - Aspiring testers in this project. Whether it was done correctly is up to Chris to decide.*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheusafonseca%2Fc214-projeto1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatheusafonseca%2Fc214-projeto1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheusafonseca%2Fc214-projeto1/lists"}