Skip to content

Commit e73a4d0

Browse files
Release version 1.0.1: Improved testing, documentation, and type checking
1 parent ce1dee0 commit e73a4d0

36 files changed

+1551
-553
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,6 @@ results/
181181

182182
# Sensitive or personal files
183183
config.ini
184-
secrets.yaml
184+
secrets.yaml
185+
186+
.ruff_cache/

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Changelog
2+
3+
All notable changes to the Advanced Image Sensor Interface project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.1] - 2024-03-04
9+
10+
### Fixed
11+
- Fixed MIPI driver performance optimization test to be deterministic
12+
- Fixed signal processing noise reduction implementation to properly reduce noise
13+
- Fixed power management validation for input configuration parameters
14+
- Fixed handling of zero values in dynamic range calculation
15+
- Fixed voltage stability issues in power management system
16+
17+
### Added
18+
- Comprehensive test suite with 67+ unit tests across all components
19+
- New testing guide documentation with best practices
20+
- Type checking with both MyPy and Pyright
21+
- Clean separation of test fixtures for better test stability
22+
- Improved error handling across all components
23+
24+
### Changed
25+
- Updated dependencies to address security vulnerabilities
26+
- Improved code quality and test reliability
27+
- Enhanced documentation with detailed API references
28+
- Optimized performance testing approach for reliability
29+
- Restructured signal processing pipeline for better noise reduction
30+
31+
## [1.0.0] - 2024-01-15
32+
33+
### Added
34+
- Initial release of Advanced Image Sensor Interface
35+
- MIPI Driver with support for high-speed data transfer
36+
- Signal Processing Pipeline with noise reduction and color correction
37+
- Power Management System with dual-rail support
38+
- Performance Metrics utilities and benchmarking tools
39+
- Comprehensive documentation including API docs, design specs, and performance analysis
40+
41+
[1.0.1]: https://github.com/muditbhargava66/Advanced-Image-Sensor-Interface/compare/v1.0.0...v1.0.1
42+
[1.0.0]: https://github.com/muditbhargava66/Advanced-Image-Sensor-Interface/releases/tag/v1.0.0

CONTRIBUTING.md

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# Contributing to Advanced Image Sensor Interface
2+
3+
Thank you for your interest in contributing to the Advanced Image Sensor Interface project! This document provides guidelines and instructions for contributing to the project.
4+
5+
## Table of Contents
6+
7+
- [Code of Conduct](#code-of-conduct)
8+
- [Getting Started](#getting-started)
9+
- [Development Workflow](#development-workflow)
10+
- [Coding Standards](#coding-standards)
11+
- [Testing](#testing)
12+
- [Documentation](#documentation)
13+
- [Pull Request Process](#pull-request-process)
14+
- [Release Process](#release-process)
15+
16+
## Code of Conduct
17+
18+
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [muditbhargava666@gmail.com](mailto:muditbhargava666@gmail.com).
19+
20+
## Getting Started
21+
22+
1. **Fork the repository** on GitHub.
23+
2. **Clone your fork** locally:
24+
```
25+
git clone https://github.com/yourusername/Advanced-Image-Sensor-Interface.git
26+
cd Advanced-Image-Sensor-Interface
27+
```
28+
3. **Set up the development environment**:
29+
```
30+
python -m venv venv
31+
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
32+
pip install -e ".[dev,docs]"
33+
```
34+
4. **Create a new branch** for your feature or bug fix:
35+
```
36+
git checkout -b feature/your-feature-name
37+
```
38+
39+
## Development Workflow
40+
41+
1. Make your changes in the appropriate files.
42+
2. Run the automated tests and linting:
43+
```
44+
tox
45+
```
46+
3. If you've added new functionality, add tests for it in the `tests/` directory.
47+
4. Update documentation as needed in the `docs/` directory.
48+
5. Commit your changes with a descriptive commit message:
49+
```
50+
git commit -m "Add feature: your feature description"
51+
```
52+
6. Push your branch to your fork:
53+
```
54+
git push origin feature/your-feature-name
55+
```
56+
7. Create a pull request against the main repository.
57+
58+
## Coding Standards
59+
60+
This project follows these coding standards:
61+
62+
- **PEP 8** for general Python coding style.
63+
- **Black** for code formatting (line length of 130 characters).
64+
- **MyPy** for type annotations.
65+
- **Ruff** for additional linting.
66+
67+
These tools are configured in the `pyproject.toml` file and can be run using `tox` or directly.
68+
69+
### Type Annotations
70+
71+
All new code should include type annotations. Example:
72+
73+
```python
74+
def calculate_snr(signal: np.ndarray, noise: np.ndarray) -> float:
75+
"""
76+
Calculate the Signal-to-Noise Ratio.
77+
78+
Args:
79+
signal: The clean signal or reference image.
80+
noise: The noise component.
81+
82+
Returns:
83+
The calculated SNR in decibels.
84+
"""
85+
# Implementation...
86+
```
87+
88+
## Testing
89+
90+
This project uses `pytest` for testing. All new code should include appropriate tests.
91+
92+
### Running Tests
93+
94+
To run the tests:
95+
96+
```
97+
pytest
98+
```
99+
100+
For more detailed output:
101+
102+
```
103+
pytest -v
104+
```
105+
106+
To run tests with coverage:
107+
108+
```
109+
pytest --cov=src
110+
```
111+
112+
See the [Testing Guide](docs/testing_guide.md) for more detailed information on test design and implementation.
113+
114+
## Documentation
115+
116+
Documentation should be updated whenever you change code. This includes:
117+
118+
- **Docstrings** for all modules, classes, and functions.
119+
- **API documentation** in `docs/api_documentation.md`.
120+
- **Design specifications** in `docs/design_specs.md` if you're making architectural changes.
121+
- **Performance analysis** in `docs/performance_analysis.md` if you're changing performance-critical code.
122+
123+
### Building Documentation
124+
125+
To build the documentation:
126+
127+
```
128+
cd docs
129+
make html
130+
```
131+
132+
The built documentation will be available in `docs/_build/html/`.
133+
134+
## Pull Request Process
135+
136+
1. Ensure your code passes all tests and linting checks.
137+
2. Update documentation as needed.
138+
3. Add your change to the CHANGELOG.md file in the "Unreleased" section.
139+
4. Make sure your PR description clearly describes the problem and solution. Include any relevant issue numbers.
140+
141+
### PR Review Checklist
142+
143+
Before submitting your PR, check that:
144+
145+
- [ ] All tests pass, including any new tests for your feature
146+
- [ ] Code follows the project's coding standards
147+
- [ ] Documentation is updated
148+
- [ ] Changelog is updated
149+
150+
## Release Process
151+
152+
Releases are managed by the project maintainers. The process is as follows:
153+
154+
1. Update the version number in `pyproject.toml`.
155+
2. Move entries from "Unreleased" to a new version section in CHANGELOG.md.
156+
3. Create a new GitHub release with the version number as the tag.
157+
4. Package and upload the release to PyPI.
158+
159+
## Questions or Need Help?
160+
161+
If you have questions or need help with the contribution process, please open an issue on GitHub or contact the project maintainers.
162+
163+
Thank you for contributing to the Advanced Image Sensor Interface project!

README.md

Lines changed: 58 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1+
<div align="center">
2+
13
# Advanced Image Sensor Interface
24

35
![Project Banner](assets/image-sensor-interface-logo.png)
46

5-
![Python Version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10-blue)
7+
[![Python Version](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)](https://www.python.org/)
68
![License](https://img.shields.io/badge/license-MIT-green)
9+
[![CodeQL](https://github.com/muditbhargava66/Advanced-Image-Sensor-Interface/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/muditbhargava66/Advanced-Image-Sensor-Interface/actions/workflows/github-code-scanning/codeql)
710
![Build Status](https://img.shields.io/badge/build-passing-brightgreen)
811
![Code Coverage](https://img.shields.io/badge/coverage-95%25-brightgreen)
9-
![Documentation](https://img.shields.io/badge/docs-passing-brightgreen)
12+
[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
13+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
14+
[![Type Checking: Mypy & Pyright](https://img.shields.io/badge/types-mypy%20%7C%20pyright-%23eedc5b)](https://github.com/microsoft/pyright)
15+
[![Testing: pytest](https://img.shields.io/badge/testing-pytest-brightgreen)](https://docs.pytest.org/)
16+
[![Documentation Status](https://readthedocs.org/projects/advanced-image-sensor-interface/badge/?version=latest)](https://advanced-image-sensor-interface.readthedocs.io/en/latest/?badge=latest)
1017
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)
1118
![Last Commit](https://img.shields.io/github/last-commit/muditbhargava66/Advanced-Image-Sensor-Interface)
1219
![Stars](https://img.shields.io/github/stars/muditbhargava66/Advanced-Image-Sensor-Interface?style=social)
13-
14-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
15-
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
16-
[![Type Checking: mypy](https://img.shields.io/badge/type%20checking-mypy-brightgreen)](http://mypy-lang.org/)
17-
[![Linting: flake8](https://img.shields.io/badge/linting-flake8-brightgreen)](https://flake8.pycqa.org/)
18-
[![Testing: pytest](https://img.shields.io/badge/testing-pytest-brightgreen)](https://docs.pytest.org/)
20+
</div>
1921

2022
## Overview
2123

@@ -34,6 +36,7 @@ This diagram illustrates the key components and data flow of our Advanced Image
3436
- **Efficient Power Management**: Reduces power consumption by 25% while maintaining high performance.
3537
- **Flexible Architecture**: Modular design allows easy customization and extension for various sensor types.
3638
- **Comprehensive Testing Suite**: Includes unit tests, integration tests, and performance benchmarks.
39+
- **Strict Type Checking**: Dual-layer type checking with both MyPy and Pyright.
3740

3841
## Technical Specifications
3942

@@ -73,24 +76,30 @@ advanced_image_sensor_interface/
7376
├── docs/
7477
│ ├── design_specs.md
7578
│ ├── performance_analysis.md
76-
│ └── api_documentation.md
79+
│ ├── api_documentation.md
80+
│ └── testing_guide.md
7781
├── scripts/
7882
│ ├── simulation.py
7983
│ ├── data_analysis.py
8084
│ └── automated_testing.py
8185
├── assets/
8286
│ └── logo.svg
8387
├── README.md
88+
├── CHANGELOG.md
89+
├── CONTRIBUTING.md
8490
├── requirements.txt
8591
├── pyproject.toml
92+
├── tox.ini
93+
├── mypy.ini
94+
├── pyrightconfig.json
8695
└── .gitignore
8796
```
8897

8998
## Installation
9099

91100
1. Clone the repository:
92101
```
93-
git clone https://github.com/muditbhargava66/advanced_image_sensor_interface.git
102+
git clone https://github.com/muditbhargava66/Advanced-Image-Sensor-Interface.git
94103
cd advanced_image_sensor_interface
95104
```
96105

@@ -105,6 +114,11 @@ advanced_image_sensor_interface/
105114
pip install -r requirements.txt
106115
```
107116

117+
4. For development, install with the development and documentation dependencies:
118+
```
119+
pip install -e ".[dev,docs]"
120+
```
121+
108122
## Usage
109123

110124
### Basic Usage
@@ -146,12 +160,20 @@ python scripts/data_analysis.py --plot --output analysis_results.json simulation
146160

147161
### Running Tests
148162

149-
To run the automated test suite:
163+
To run the complete test suite using tox:
150164

151165
```
152-
python scripts/automated_testing.py --unit-tests --integration-tests --benchmarks --output test_results.json
166+
tox
153167
```
154168

169+
To run just the unit tests:
170+
171+
```
172+
pytest
173+
```
174+
175+
For more information on testing, see the [Testing Guide](docs/testing_guide.md).
176+
155177
## Performance Benchmarks
156178

157179
| Metric | Value | Improvement |
@@ -168,6 +190,11 @@ Detailed documentation is available in the `docs/` directory:
168190
- [Design Specifications](docs/design_specs.md)
169191
- [API Documentation](docs/api_documentation.md)
170192
- [Performance Analysis](docs/performance_analysis.md)
193+
- [Testing Guide](docs/testing_guide.md)
194+
195+
## Changelog
196+
197+
For a detailed list of changes between versions, see the [CHANGELOG.md](CHANGELOG.md) file.
171198

172199
## Contributing
173200

@@ -177,11 +204,25 @@ Contributions to the Advanced Image Sensor Interface project are welcome. Please
177204

178205
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
179206

180-
## Contact
207+
<div align="center">
208+
209+
## Star History
181210

182-
For any questions or inquiries, please contact the project maintainer:
211+
<a href="https://star-history.com/#muditbhargava66/Advanced-Image-Sensor-Interface&Date">
212+
<picture>
213+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=muditbhargava66/Advanced-Image-Sensor-Interface&type=Date&theme=dark" />
214+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=muditbhargava66/Advanced-Image-Sensor-Interface&type=Date" />
215+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=muditbhargava66/Advanced-Image-Sensor-Interface&type=Date" />
216+
</picture>
217+
</a>
183218

184-
- Name: Mudit Bhargava
185-
- GitHub: [@muditbhargava66](https://github.com/muditbhargava66)
219+
---
186220

187-
---
221+
⭐️ Star the repo and consider contributing!
222+
223+
📫 **Contact**: [@muditbhargava66](https://github.com/muditbhargava66)
224+
🐛 **Report Issues**: [Issue Tracker](https://github.com/muditbhargava66/Advanced-Image-Sensor-Interface/issues)
225+
226+
© 2025 Mudit Bhargava. [MIT License](LICENSE)
227+
<!-- Copyright symbol using HTML entity for better compatibility -->
228+
</div>

benchmarks/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Benchmarks Package for Advanced Image Sensor Interface
2+
Benchmarks Package for Advanced Image Sensor Interface.
33
44
This package contains benchmark tests for evaluating the performance
55
and quality of the Advanced Image Sensor Interface project.
@@ -9,11 +9,11 @@
99
noise_analysis: Benchmarks for analyzing noise characteristics and reduction efficacy.
1010
"""
1111

12-
from .speed_tests import run_speed_benchmarks
1312
from .noise_analysis import run_noise_analysis
13+
from .speed_tests import run_speed_benchmarks
1414

1515
__all__ = ['run_speed_benchmarks', 'run_noise_analysis']
1616

17-
__version__ = '1.0.0'
17+
__version__ = '1.0.1'
1818
__author__ = 'Mudit Bhargava'
1919
__license__ = 'MIT'

0 commit comments

Comments
 (0)