gitlab-cicd-project 0.0.4
wifi speed test package

# GitLab CI/CD Project - WiFi Speed Tester

[![PyPI version](https://img.shields.io/pypi/v/gitlab-cicd-project.svg)](https://pypi.org/project/gitlab-cicd-project/)
[![Python Versions](https://img.shields.io/pypi/pyversions/gitlab-cicd-project.svg)](https://pypi.org/project/gitlab-cicd-project/)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://img.shields.io/gitlab/pipeline-status/gitlab-shrprabh/gitlab-cicd-project)](https://gitlab.com/gitlab-shrprabh/gitlab-cicd-project/-/pipelines)

A lightweight Python package demonstrating GitLab CI/CD capabilities with an interactive WiFi Speed Test dashboard for Jupyter notebooks.

## ✨ Features

- 🚀 Interactive WiFi Speed Test Dashboard
- 📊 Real-time speed metrics visualization with Plotly
- 📡 Network information display
- 📷 Snapshot capability to save test results
- 🔄 Fully automated CI/CD pipeline with GitLab
- 📦 Seamless PyPI package deployment
- ⚙️ Cross-platform compatibility (Windows, macOS, Linux)
- 🛠️ Python package development best practices

## 📋 Table of Contents

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Usage Examples](#usage-examples)
- [Dependencies](#dependencies)
- [Environment Support](#environment-support)
- [Development Setup](#development-setup)
- [Building the Package](#building-the-package)
- [Publishing to PyPI](#publishing-to-pypi)
- [Release History](#release-history)
- [License](#license)
- [Contributing](#contributing)

## 🔧 Installation

Install the package using pip:

```bash
pip install gitlab-cicd-project
```

## 🚀 Quick Start

After installation, start a Jupyter notebook and run:

```python
from gitlab_cicd_project import hello

# Launch the WiFi Speed Test Dashboard
hello()
```

You can also use the package from the command line:

```bash
gitlab-cicd-project
```

Alternatively, you can use it in your Python code:

```python
from gitlab_cicd_project import hello

# Print welcome message
hello()
```

## 📝 Usage Examples

### WiFi Speed Test Dashboard

```python
from gitlab_cicd_project import WifiSpeedTester

# Create a speed tester instance
tester = WifiSpeedTester()

# Display the dashboard
tester.display()
```

![WiFi Speed Test Dashboard](https://raw.githubusercontent.com/shreyasprabhakar/gitlab-cicd-project/images/dashboard_sample.png)

The dashboard provides:

- Real-time download and upload speed monitoring
- Ping latency tracking
- Current WiFi network information
- Interactive charts and gauges
- Snapshot functionality to save test results as JSON

## 📦 Dependencies

This package relies on the following key libraries:

- **ipywidgets** (8.0.6+): Interactive widgets for Jupyter
- **plotly** (5.24.1+): Interactive visualization library
- **speedtest-cli** (2.1.3+): Speed test measurement
- **pandas** (2.1.3+): Data manipulation
- **psutil** (6.0.0+): System monitoring and network information
- **jupyter** (1.0.0+): Jupyter notebook environment
- **ipython** (8.12.0+): Interactive Python shell

## 🖥️ Environment Support

**⚠️ Important: Currently Only Supports Jupyter Notebook Environment**

This package is designed to work exclusively within Jupyter Notebook environments. The interactive dashboard features rely on Jupyter's widget system and will not function in:

- Standard Python scripts
- Command-line interfaces
- Regular web browsers without Jupyter

To use this package, you must run it from within a Jupyter notebook.

## 🛠️ Development Setup

### Prerequisites

- Python 3.6 or higher
- pip

### Local Development

1. Clone the repository:

   ```bash
   git clone https://gitlab.com/gitlab-shrprabh/gitlab-cicd-project.git
   cd gitlab-cicd-project
   ```

2. Install development dependencies:
   ```bash
   pip install -e ".[dev]"
   ```

## 📦 Building the Package

1. Install build tools:

   ```bash
   pip install setuptools wheel twine
   ```

2. Build distribution packages:

   ```bash
   python setup.py sdist bdist_wheel
   ```

   This will create distribution files in the `dist/` directory.

## 🚢 Publishing to PyPI

### Manual Publishing

1. Set up your PyPI credentials:

   ```bash
   export TWINE_USERNAME=__token__
   export TWINE_PASSWORD=your-pypi-token
   ```

2. Upload the package to PyPI:
   ```bash
   twine upload dist/*
   ```

### GitLab CI/CD Integration

This project includes GitLab CI/CD configuration for automated testing and publishing:

1. Set the following environment variables in your GitLab CI/CD settings:

   - `TWINE_USERNAME`: Set to `__token__`
   - `TWINE_PASSWORD`: Your PyPI API token

2. The CI/CD pipeline will automatically:
   - Run tests
   - Build distribution packages
   - Publish to PyPI (on tagged releases)

#### CI/CD Pipeline Workflow

1. **Build Stage**: Creates distribution packages
2. **Test Stage**: Runs automated tests
3. **Publish Stage**: Uploads the package to PyPI (only on tagged commits)

To create a new release:

```bash
git tag v0.1.0
git push origin v0.1.0
```

## 📋 Release History

### v0.0.3 (2025-07-04)

- ✨ Added interactive WiFi Speed Test Dashboard
- 📊 Real-time speed metrics with Plotly visualization
- 📡 WiFi network information display
- 📷 Snapshot feature to save test results as JSON
- 📈 Multi-chart dashboard with download, upload, and ping metrics
- 🔄 Continuous testing capability with adjustable intervals

### v0.0.1 (2025-07-04)

- 🎉 Initial release
- ✨ Basic functionality with `hello()` function
- 📦 Package structure set up with proper imports
- 🚀 Command-line interface
- 🔄 GitLab CI/CD pipeline integration

### v0.0.0 (2025-06-28)

- 🚧 Pre-release development version
- 🏗️ Basic project structure

## 📄 License

This project is licensed under the MIT License - see below for a summary:

### MIT License

Copyright (c) 2025 Shreyas Prabhakar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

## 👥 Contributing

Contributions are welcome! Here's how you can help:

1. Fork the repository
2. Create a feature branch: `git checkout -b feature/amazing-feature`
3. Commit your changes: `git commit -m 'Add amazing feature'`
4. Push to the branch: `git push origin feature/amazing-feature`
5. Open a pull request

### Code of Conduct

- Be respectful and inclusive
- Provide constructive feedback
- Focus on the best outcome for the project

## 📞 Support

If you encounter any issues or have questions, please open an issue on the [GitLab repository](https://gitlab.com/gitlab-shrprabh/gitlab-cicd-project/-/issues).

---

Made with ❤️ by [Shreyas Prabhakar](mailto:shreyas.prabhakar97@gmail.com)