Skip to content

Latest commit

 

History

History
144 lines (107 loc) · 2.96 KB

File metadata and controls

144 lines (107 loc) · 2.96 KB

Contributing to NetLens

Thank you for your interest in contributing! This document provides guidelines for contributing to the project.

Code of Conduct

  • Be respectful and inclusive
  • Provide constructive feedback
  • Focus on the code, not the person
  • Help others learn and grow

How to Contribute

1. Report Bugs

  • Check if the bug is already reported
  • Provide clear, reproducible steps
  • Include system information (OS, Python version, etc.)
  • Attach relevant logs or screenshots

2. Suggest Features

  • Check if the feature is already suggested
  • Explain the use case and benefit
  • Provide examples if possible
  • Be open to discussion and refinement

3. Submit Code

  • Fork the repository
  • Create a feature branch: git checkout -b feature/your-feature
  • Follow the code style (PEP 8)
  • Add tests and documentation
  • Submit a pull request with clear description

Development Setup

# Clone the repository
git clone https://github.com/yourusername/netlens.git
cd netlens

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run tests
pytest

# Run the dashboard
sudo ./.venv/bin/streamlit run dashboard.py

Code Standards

Style Guide

  • Follow PEP 8
  • Use type hints
  • Write comprehensive docstrings
  • Maximum line length: 100 characters

Naming Conventions

  • ClassName for classes
  • function_name() for functions
  • CONSTANT_NAME for constants
  • _private_method() for private methods

Documentation

  • Add docstrings to all functions
  • Use Google-style docstrings
  • Include examples in docstrings
  • Update README.md for user-facing changes

Testing

# Run all tests
pytest

# Run specific test file
pytest tests/test_packet_processor.py

# Run with coverage
pytest --cov=src

Commit Messages

Write clear, descriptive commit messages:

Add feature: Device filtering in dashboard

- Implement device selection dropdown
- Add per-device filtering logic
- Update UI components
- Add unit tests

Pull Request Process

  1. Update documentation
  2. Add tests for new features
  3. Ensure all tests pass: pytest
  4. Keep PR focused on one feature/fix
  5. Write clear PR description
  6. Link related issues

Areas for Contribution

High Priority

  • Performance optimization
  • Additional network protocols
  • Geolocation mapping
  • Anomaly detection
  • Database integration

Medium Priority

  • Dark mode UI
  • Export capabilities (CSV, JSON)
  • Alert system
  • Custom dashboards
  • API endpoint

Low Priority

  • Additional visualizations
  • Documentation improvements
  • Code optimization
  • Error handling enhancements

Questions?

  • Open an issue for discussion
  • Check existing documentation
  • Review past issues and PRs
  • Ask in the community

License

By contributing, you agree that your contributions will be licensed under the MIT License.


Thank you for making NetLens better! 🎉