Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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/) Β  Β 
Mail IllustrationπŸ“«


- **Contribute and Discuss:** Feel free to open issues πŸ›, submit pull requests πŸ› οΈ, or start discussions πŸ’¬ to help improve this repository!