Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Code Quality & Linting

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pylint black isort

- name: Check code formatting with black
run: |
black --check control_plane data_plane tests

- name: Check import sorting with isort
run: |
isort --check-only control_plane data_plane tests

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov pytest-asyncio

- name: Run tests with pytest
run: |
pytest tests
37 changes: 34 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
# Virtual environments
venv
vevn
env
ENV
.venv

# Python
__pycache__/
*.py[cod]
*$py.class
*.so



# Testing
pytest.ini
.pytest*
tests/__pycache__
data_plane/__pycache__
control_plane/__pycache__
.coverage
.coverage.*
htmlcov/

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# Environment
.env
.env.local
*.log

# OS
.DS_Store
68 changes: 68 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Contributing to eBPF Beacon Detection System

Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to this project.

## Getting Started

1. **Fork the repository** on GitHub
2. **Clone your fork** locally:
```bash
git clone https://github.com/yourusername/BeaconDetectionSystemGit.git
cd BeaconDetectionSystemGit
```

3. **Set up the development environment**:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
```

## Development Workflow

1. **Create a feature branch**:
```bash
git checkout -b feature/your-feature-name
```

2. **Make your changes** and commit them with clear messages:
```bash
git commit -m "Add: brief description of changes"
```

3. **Run tests and linting**:
```bash
pytest
pylint control_plane data_plane
black --check control_plane data_plane
```

4. **Push to your fork**:
```bash
git push origin feature/your-feature-name
```

5. **Create a Pull Request** with a clear description of your changes

## Testing

- Write tests for new features in the `tests/` directory
- Ensure all tests pass: `pytest`
- Aim for high test coverage, especially for critical components
- Use descriptive test names that explain what is being tested

## Reporting Issues

- Use GitHub Issues for bug reports and feature requests
- Provide clear steps to reproduce bugs
- Include relevant system information and logs

## Documentation

- Update relevant documentation for new features
- Keep the README.md up to date

## Questions?

Feel free to open an issue or discussion for questions.
Loading
Loading