Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madhurimarawat/software-engineering
This repository provides exercises for practicing software engineering techniques, including version control, code review, unit testing with Python, continuous integration, and agile methodologies.
https://github.com/madhurimarawat/software-engineering
git pytest python software-engineering software-testing
Last synced: about 1 month ago
JSON representation
This repository provides exercises for practicing software engineering techniques, including version control, code review, unit testing with Python, continuous integration, and agile methodologies.
- Host: GitHub
- URL: https://github.com/madhurimarawat/software-engineering
- Owner: madhurimarawat
- License: mit
- Created: 2024-09-08T15:22:59.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-08T15:50:32.000Z (4 months ago)
- Last Synced: 2024-10-12T08:21:02.872Z (2 months ago)
- Topics: git, pytest, python, software-engineering, software-testing
- Language: Python
- Homepage: https://madhurimarawat.github.io/Semester-Notes/Git-Commands.html
- Size: 710 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Software-Engineering
This repository provides exercises for practicing software engineering techniques, including version control, code review, unit testing with Python, continuous integration, and agile methodologies.## Python
Python is a high-level, interpreted programming language known for its simplicity and versatility. It is widely used in software engineering for tasks such as unit testing, code analysis, and automation. The `pytest` framework, used in this repository, is a popular testing tool in the Python ecosystem for writing simple and scalable test cases.
**[pytest Documentation](https://docs.pytest.org/en/latest/)**
`pytest` is a Python-based testing framework that simplifies writing small to complex test cases. It supports the development of unit tests by providing mechanisms for writing assertions, handling test fixtures, and generating test reports. Its ability to scale from simple functions to complex applications makes it ideal for ensuring code reliability and correctness.**[Git Documentation](https://madhurimarawat.github.io/Semester-Notes/Git-Commands.html)**
Git is a distributed version control system that tracks changes to files and allows multiple people to collaborate on a project. It enables users to manage and coordinate changes to the source code, ensuring that different versions of the code are maintained efficiently. Key operations include creating repositories, committing changes, and pushing to remote repositories.**[Sphinx Documentation](https://www.sphinx-doc.org/en/master/)**
**[MkDocs Documentation](https://www.mkdocs.org/)**
Sphinx and MkDocs are documentation generation tools designed to convert Python code comments (docstrings) into rich, accessible HTML documentation. Sphinx supports automatic API documentation and extensive formatting features, while MkDocs emphasizes simplicity and markdown-based writing. Both tools are used to create well-organized and professional documentation for software projects.**[unittest.mock Documentation](https://docs.python.org/3/library/unittest.mock.html)**
The `unittest.mock` module in Python allows for replacing parts of a system under test with mock objects to simulate real-world behaviors. This technique is useful in unit testing when isolating the function under test by removing dependencies on external components or systems, ensuring that tests remain focused and independent.**[dependency-injector Documentation](https://python-dependency-injector.ets-labs.org/)**
`dependency-injector` is a Python framework for implementing dependency injection, a design pattern that decouples the creation of dependencies from their usage. By injecting dependencies into objects rather than hard-coding them, this technique promotes flexibility, testability, and modularity in software design.**[GitHub Actions Documentation](https://docs.github.com/en/actions)**
**[Travis CI Documentation](https://docs.travis-ci.com/)**
GitHub Actions and Travis CI are continuous integration (CI) tools that automate the building and testing of code whenever changes are pushed to a repository. CI pipelines ensure that code quality is maintained by running tests automatically after each commit, allowing teams to detect and fix errors early in the development process.---
## Directory Structure π
This repository **Software-Engineering** organizes various experiments related to software engineering practices, each identified by its experiment number. Each experiment contains subfolders for source code, documentation, and output files. For instance, Experiment 1 includes Python source and test code using `pytest`, alongside documentation that explains the testing methodology and a summary of the output. Similarly, Experiment 2 focuses on Git operations, with relevant text files and output documentation.
Subsequent experiments (Experiments 3 to 7) explore topics such as documentation generation using Sphinx and MkDocs, as well as practical exercises in mocking, dependency injection, and code refactoring, with respective Jupyter notebooks for hands-on learning. Experiment 7 specifically addresses continuous integration (CI) processes, containing documentation related to both GitHub Actions and Travis CI. Additionally, Markdown files have been converted to PDF format using [md2pdf](https://md2pdf.netlify.app/). This structured approach facilitates easy navigation and understanding of the resources and outcomes related to each experiment.
```
Software-Engineering/
β
βββ Experiment 1/
β βββ Source Code/ π» # Contains Python source code related to unit testing using pytest.
| βββ Test/ π» # Contains Python test code related to unit testing using pytest
β βββ Documentation/ π # Includes word documentation explaining test cases and methodology.
β β βββ Pytest Unit Testing.docx
β βββ Output/ π # Holds Word document with output for Experiment 1.
β β βββ Experiment 1 Output.docx
β
βββ Experiment 2/
β βββ Documentation/ π # Contains text files related to Git operations and learning.
β β βββ Git Setup And Commands.txt
β βββ Output/ π # Holds Word document with output for Experiment 2.
β β βββ Experiment 2 Output.docx
β βββ Learning-Git Repo Content/ # Stores content from the associated Learning Git repository.
β β βββ repo_files/
β
βββ Experiment 3/
β βββ Documentation/ π # Example projects demonstrating Sphinx and MkDocs usage.
β β βββ Experiment 3 Commands.docx # Contains commands and procedures used in Experiment 3.
β βββ Experiment Output/ π # Holds Word document with output for Experiment 3.
β β βββ Experiment 3 Output.docx # Output from Experiment 3.
β βββ Example Documentation/ # Contains simple examples of output files.
β βββ MkDocs Pdoc Documentation/ # Documentation generated using MkDocs and Pdoc.
β βββ Sphinx Docstring Documentation/ # Documentation generated automatically using Sphinx.
β βββ Docstring Documentation/ π # Contains docstring documentation in markdown format.
β β βββ docstrings.md # Markdown file containing docstrings.
β βββ Output/ π # Word file containing the output from MkDocs and Pdoc tools.
β β βββ Experiment 3 Output.docx # Consolidated output for Experiment 3.
β βββ Reference Documents/ π # Additional reference materials or readings related to Sphinx and MkDocs.
β β βββ additional_readings.md # Contains further documentation regarding Sphinx and MkDocs.
β βββ Experiment Output Docstring Documentation # Contains the output and generated documentation for Experiment 3.
β βββ README.md π # Contains the Documentation for this folder
β
βββ Experiment 4/ π»
β βββ Mocking.ipynb # Jupyter notebook for mocking exercises.
β
βββ Experiment 5/ π»
β βββ Dependency Injection.ipynb # Jupyter notebook for dependency injection exercises.
β
βββ Experiment 6/ π»
β βββ Code Refactoring.ipynb # Jupyter notebook for code refactoring exercises.
β
βββ Experiment 7/
βββ Output/ π # Single Word document with output for CI processes.
β βββ Experiment 7 Output.docx
βββ GitHub Actions/ # Contains markdown and PDF documentation related to GitHub Actions CI.
β βββ Documentation/ π
β β βββ GitHub Actions Description.md
β β βββ GitHub Actions Description.pdf
βββ Travis CI/ # Contains markdown and PDF documentation related to Travis CI.
β βββ Documentation/ π
β β βββ Travis CI Description.md
β β βββ Travis CI Description.pdf
```---
## Table Of Contents π π π
### 1. [Unit Testing with pytest](https://github.com/madhurimarawat/Software-Engineering/tree/main/Experiment%201)
**Description:** This experiment focuses on writing and executing unit tests for Python functions using the pytest framework. You will cover various test cases and assertions to ensure the correctness and reliability of your code.
### 2. [Version Control with Git](https://github.com/madhurimarawat/Software-Engineering/tree/main/Experiment%202)
**Description:** This experiment involves practicing basic Git operations such as repository creation, file addition, committing changes, and pushing to a remote repository. You can find additional practice and details in the [Learning Git Repository](https://github.com/madhurimarawat/Learning-Git).
### 3. [Code Documentation Practice](https://github.com/madhurimarawat/Software-Engineering/tree/main/Experiment%203)
**Description:** Write Python function and class docstrings to document code functionality. Students will then generate HTML documentation using tools like Sphinx or MkDocs. This exercise stresses the importance of maintaining clear and accessible code documentation.
### 4. [Mocking](https://github.com/madhurimarawat/Software-Engineering/tree/main/Experiment%204)
**Description:** Practice the technique of mocking in Python using libraries such as `unittest.mock`. Students will isolate and test individual components of a software system by replacing dependencies with mock objects, simulating real components in a controlled environment.
### 5. [Dependency Injection](https://github.com/madhurimarawat/Software-Engineering/tree/main/Experiment%205)
**Description:** Explore the concept of dependency injection using libraries like `dependency-injector`. This technique enables students to write flexible and testable code by decoupling the components from their dependencies, allowing easier integration and testing.
### 6. [Code Refactoring Exercise](https://github.com/madhurimarawat/Software-Engineering/tree/main/Experiment%206)
**Description:** Identify and refactor code snippets to improve code quality, readability, and performance. Focus on techniques such as extracting methods, removing duplication, and improving naming conventions. This exercise aims to enhance the maintainability and efficiency of the code while adhering to best practices in software development.
### 7. [Continuous Integration Setup](https://github.com/madhurimarawat/Software-Engineering/tree/main/Experiment%206)
**Description:** Set up a basic continuous integration (CI) pipeline using tools like Travis CI or GitHub Actions. You can refer to additional resources in the [Learning Travis CI Repository](https://github.com/madhurimarawat/Learning-Travis-CI) and [Learning GitHub Actions Repository](https://github.com/madhurimarawat/Learning-GitHub-Actions-CI).
---
## Thanks for Visiting π
- Drop a π if you find this repository useful.
- If you have any doubts or suggestions, feel free to reach me.
π« How to reach me: Β [![Linkedin Badge](https://img.shields.io/badge/-madhurima-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/madhurima-rawat/) Β Β
- **Contribute and Discuss:** Feel free to open issues π, submit pull requests π οΈ, or start discussions π¬ to help improve this repository!