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
64 changes: 64 additions & 0 deletions .github/workflows/pipe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Based Sigma pipeline +aura

on:
push:
branches: [dev] # All checks on dev
pull_request:
branches: [dev] # Qual checks on pull

jobs:
lint:
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install ruff
run: pipx install ruff

- name: Run ruff check
run: |
ruff check src
ruff format --check src

semgrep:
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run semgrep
uses: returntocorp/semgrep-action@v1
with:
config: auto
continue-on-error: false

quality-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Code complexity (max 15)
run: |
radon cc src/ | awk '$2 > 13 {exit 1}' # FAIL при > 13

# - name: Install mypy
# run: pipx install mypy

# - name: Run mypy
# run: |
# if [ "${{ github.event_name }}" = "pull_request" ]; then
# git diff --name-only origin/${{ github.base_ref }} | grep '\.py$' | xargs mypy || mypy src/
# else
# mypy src/
# fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ research
session/
**__pycache__**
reports
**/.env
**/.env
dist/
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Only check style
check:
ruff check src/

# Format
format:
ruff format src/ && isort src/ && ruff check --fix

dev-check:
@grep -q "dev=True" src/shared.py && (echo "❌ dev=True found!" && exit 1) || echo "✅ OK"
9 changes: 7 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Ver 1.0:
+ Сделать функционал связи пользователей и каналов
+ Рекурсивно обнаруживать каналы пользователей в целевом канале
+ Сделать функционал связи пользователей и каналов ✅
+ Рекурсивно обнаруживать каналы пользователей в целевом канале ✅

Ver 2.0:
+ Сделать resume файл
+ Сделать .exe для винды
+ Рефактор кода для уменьшения цикл. сложности (< 10)
79 changes: 0 additions & 79 deletions main.py

This file was deleted.

Loading