Enhance README.md with badges, installation instructions, and community support details. Improved project structure and added quick contribution guidelines.

This commit is contained in:
defiQUG
2025-08-06 04:09:56 +00:00
parent c8fb525651
commit 9f9f217175
47 changed files with 14593 additions and 36 deletions

190
.github/workflows/cd.yml vendored Normal file
View File

@@ -0,0 +1,190 @@
name: CD
on:
push:
tags:
- 'v*'
workflow_run:
workflows: ["CI"]
types:
- completed
env:
PYTHON_VERSION: '3.9'
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
sudo apt-get update
sudo apt-get install -y build-essential cmake libopencv-dev libeigen3-dev
- name: Build project
run: |
chmod +x tools/build.sh
./tools/build.sh
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload build artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/
asset_name: nowyouseeme-${{ github.ref_name }}-linux.tar.gz
asset_content_type: application/gzip
deploy-staging:
name: Deploy to Staging
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
environment: staging
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Deploy to staging
run: |
echo "Deploying to staging environment..."
# Add your staging deployment commands here
# Example: docker build and push to staging registry
- name: Notify deployment
run: |
echo "Staging deployment completed successfully"
deploy-production:
name: Deploy to Production
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
environment: production
needs: [release]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Deploy to production
run: |
echo "Deploying to production environment..."
# Add your production deployment commands here
# Example: docker build and push to production registry
- name: Notify deployment
run: |
echo "Production deployment completed successfully"
docker:
name: Build and Push Docker Image
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
nowyouseeme/nowyouseeme:${{ github.ref_name }}
nowyouseeme/nowyouseeme:latest
cache-from: type=gha
cache-to: type=gha,mode=max
publish-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
notify:
name: Notify Team
runs-on: ubuntu-latest
if: always()
needs: [release, deploy-production, docker, publish-pypi]
steps:
- name: Notify on success
if: success()
run: |
echo "All deployment steps completed successfully"
# Add your notification logic here (Slack, Discord, etc.)
- name: Notify on failure
if: failure()
run: |
echo "Deployment failed"
# Add your failure notification logic here

168
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,168 @@
name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
env:
PYTHON_VERSION: '3.9'
CXX_STANDARD: '17'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black isort mypy pylint
pip install -r requirements.txt
- name: Lint Python code
run: |
flake8 src/ --count --select=E9,F63,F7,F82 --show-source --statistics
black --check src/
isort --check-only src/
mypy src/ --ignore-missing-imports
test-python:
name: Test Python
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, 3.10, 3.11]
steps:
- name: Checkout code
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-mock
- name: Run Python tests
run: |
pytest src/ --cov=src --cov-report=xml --cov-report=html
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: python-${{ matrix.python-version }}
test-cpp:
name: Test C++
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libopencv-dev libeigen3-dev
- name: Build C++ code
run: |
mkdir build
cd build
cmake ..
make -j$(nproc)
- name: Run C++ tests
run: |
cd build
ctest --output-on-failure
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, test-python, test-cpp]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
sudo apt-get update
sudo apt-get install -y build-essential cmake libopencv-dev libeigen3-dev
- name: Build project
run: |
chmod +x tools/build.sh
./tools/build.sh
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build/
security:
name: Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Bandit security scan
run: |
pip install bandit
bandit -r src/ -f json -o bandit-report.json
- name: Upload security scan results
uses: actions/upload-artifact@v3
with:
name: security-scan
path: bandit-report.json
documentation:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install documentation dependencies
run: |
pip install sphinx sphinx-rtd-theme myst-parser
- name: Build documentation
run: |
cd docs
make html
- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: documentation
path: docs/_build/html/

20
.github/workflows/dependency-review.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Dependency Review
on:
pull_request:
branches: [ main, develop ]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Dependency Review
uses: actions/dependency-review-action@v3
with:
fail-on-severity: moderate