diff --git a/.env b/.env index 7cb31c33..ab947b75 100644 --- a/.env +++ b/.env @@ -10,15 +10,3 @@ AI_MODE="predator" # Otras variables NODE_ENV="production" -GITHUB_TOKEN: ${{ secrets.GH_ARTIFACT_ACCESS_TOKEN }} -GIT_COMMITTER_NAME: "MechBot-9000" -GIT_COMMITTER_EMAIL: "mechbot@mechmind.io" -DEFCON: 1 # Maximum alert status -SCAN_MODE: "aggressive" -security-events: write # Threat intelligence reporting -NODE_ENV: "production" -AI_MODE: "predator" -ACTIONS_STEP_DEBUG a true - -env: - GITHUB_TOKEN: ${{ secrets.GH_ARTIFACT_ACCESS_TOKEN }} diff --git a/.github/actions/demo.yml b/.github/github-actions-demo.yml similarity index 98% rename from .github/actions/demo.yml rename to .github/github-actions-demo.yml index 15a61d6b..707bae55 100644 --- a/.github/actions/demo.yml +++ b/.github/github-actions-demo.yml @@ -16,3 +16,4 @@ jobs: run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." +workflows/ diff --git a/.github/workflows/dependency-scan.yml b/.github/workflows/dependency-scan.yml deleted file mode 100644 index 3756d1c7..00000000 --- a/.github/workflows/dependency-scan.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Dependency Scan - id: dependency-scan - uses: mechmind/ai-dependency-action@v3.0.1 - with: - strict-mode: true - auto-fix: true - Step: Run dependency scan using MechMind AI Dependency Action - forms a strict dependency analysis - Automatically fixes common issuesPerforms a strict dependency analysis - Automatically fixes common issues -- name: Report Issues - if: steps.dependency-scan.outputs.issues_found == 'true' - run: echo "Dependency issues found! Review the scan results." diff --git a/.github/workflows/dependency_ai.yml b/.github/workflows/dependency_ai.yml index a20545eb..df0d7bb7 100755 --- a/.github/workflows/dependency_ai.yml +++ b/.github/workflows/dependency_ai.yml @@ -12,7 +12,7 @@ on: push: branches: [ "main" ] # Primary defense perimeter tags: [ "v*" ] # Release version monitoring - pull_request: write + pull_request: branches: [ "main" ] # Pre-merge security checkpoint schedule: - cron: "0 3 * * 1" # Weekly deep scan (Monday 3AM UTC) @@ -32,7 +32,7 @@ jobs: dependency-scan: name: "TACTICAL_SCAN_OPERATION" runs-on: [self-hosted, linux, x64] # MechMind Battle Station - contents: + contents: write # Code modification clearance # ⚙️ OPERATIONAL PARAMETERS timeout-minutes: 30 # Mission duration limit diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml index d45ba7ac..ab873002 100644 --- a/.github/workflows/deps.yml +++ b/.github/workflows/deps.yml @@ -1,25 +1,10 @@ name: Enhanced Dependency Scan with Security Checks -2 months ago - -Update deps.yml on: push: -7 minutes ago - -Update deps.yml - branches: [main] -2 weeks ago - -Update deps.yml - pull_requests: wite -7 minutes ago - -Update deps.yml - branches: [main] -last month - -Update deps.yml + branches: [ main ] + pull_request: + branches: [ main ] permissions: contents: write # For pushing changes/fixes @@ -27,31 +12,13 @@ permissions: security-events: write # For reporting security issues actions: read # For workflow operations checks: write # For creating check runs -2 months ago - -Update deps.yml jobs: -last month - -Update deps.yml dependency-scan: name: Dependency Scan & Security Analysis -2 months ago - -Update deps.yml runs-on: ubuntu-latest -last month - -Update deps.yml -2 months ago - -Update deps.yml steps: -last month - -Update deps.yml - name: Checkout Repository uses: actions/checkout@v4 with: @@ -85,17 +52,8 @@ Update deps.yml - name: Commit Auto-Fixes if: steps.dependency-scan.outputs.fixes_made == 'true' run: | -2 weeks ago - -Update deps.yml - git config --global user.name 'mechmind-dwv' -4 days ago - -Update deps.yml - git config --global user.email 'ia.mechmind@gmail.com' -last month - -Update deps.yml + git config --global user.name 'GitHub Action' + git config --global user.email 'action@github.com' git add . git commit -m "Automated dependency fixes from scan" git push diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 2db0690a..62bc9659 100755 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -1,30 +1,27 @@ name: Django CI -on: - push: - branches: "main" - pull_request: - branches: "main" +on: [push, pull_request] jobs: - build: - + test: runs-on: ubuntu-latest - strategy: - max-parallel: 4 - matrix: - python-version: 3.7, 3.8, 3.9 - steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + + - name: Set up Python + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} - - name: Install Dependencies + python-version: '3.10' + cache: 'pip' + + - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - - name: Run Tests + + - name: Debug - List Files + run: ls -la + + - name: Run tests run: | python manage.py test diff --git a/.github/workflows/python_CI.yml b/.github/workflows/python-package.yml similarity index 60% rename from .github/workflows/python_CI.yml rename to .github/workflows/python-package.yml index a18ce085..dd349688 100644 --- a/.github/workflows/python_CI.yml +++ b/.github/workflows/python-package.yml @@ -1,27 +1,23 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versionsAdd commentMore actions -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Python package name: Python CI on: push: - branches: [ "main" ] branches: ["main"] pull_request: - branches: [ "main" ] branches: ["main"] jobs: build: runs-on: ubuntu-latest strategy: - fail-fast: true - + fail-fast: false + 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@v3 uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -37,27 +33,20 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 pip install -r requirements.txt pip install -r requirements-dev.txt - name: Run linting run: | - # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest black --check --diff . - name: Run tests run: | - pytest pytest --cov=./ --cov-report=xml - name: Upload coverage uses: codecov/codecov-action@v3 with: - fail_ci_if_error: true + fail_ci_if_error: false diff --git a/.github/workflows/runner-cleanup.yml b/.github/workflows/runner-cleanup.yml index bbdb65b5..f76bf66a 100755 --- a/.github/workflows/runner-cleanup.yml +++ b/.github/workflows/runner-cleanup.yml @@ -14,17 +14,17 @@ jobs: - name: Limpiar runners offline uses: actions/cleanup-action@v3 with: - token: ${{ secrets.RUNNER_CLEANUP_TOKEN }} # Token personalizado - remove-token: ${{ secrets.RUNNER_CLEANUP_TOKEN }} # Token personalizado + token: ${{ secrets.GITHUB_TOKEN }} + remove-token: ${{ secrets.GITHUB_TOKEN }} exclude-running: true min-age-days: 1 - dry-run: true + dry-run: false - name: Terminar workflows obsoletos uses: ./.github/actions/cancel-workflows with: token: ${{ secrets.GITHUB_TOKEN }} - hours: 48 # Cancela workflows con más de 24 horas + hours: 24 # Cancela workflows con más de 24 horas health-check: name: Verificación de Salud Completa @@ -39,7 +39,7 @@ jobs: echo "Versión del Runner: ${{ runner.version }}" echo "Sistema Operativo: ${{ runner.os }}" echo "::endgroup::" - + echo "::group::Uso de Disco" df -h || echo "Error al verificar disco" echo "::endgroup::" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1b0c807d..60ea15f4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,6 @@ name: Tests -on: push, pull_request +on: [push, pull_request] jobs: test: @@ -21,4 +21,4 @@ jobs: - name: Run tests run: | - pytest --cov=src --cov-report=xml tests/ + pytest --cov=src --cov-report=xml tests/ \ No newline at end of file diff --git a/.github/workflows/Ci.yml b/.github/workflows/yml similarity index 82% rename from .github/workflows/Ci.yml rename to .github/workflows/yml index 0d5187f1..1158088c 100644 --- a/.github/workflows/Ci.yml +++ b/.github/workflows/yml @@ -1,11 +1,11 @@ name: Ejecución en runners Ubuntu -on: push +on: [push] -jobs: read +jobs: check-version: runs-on: group: ubuntu-runners - labels: ubuntu-20.04-16 core + labels: ubuntu-20.04-16core steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 diff --git a/README.md b/README.md index 167ba846..3e4efbe6 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # MechanicalMind Dependency AI v3.0 -[![Ejecución en runners Ubuntu](https://github.com/MechBot-2x/-MechanicalMind-Dependency-AI-v3.0-/actions/workflows/Ci.yml/badge.svg)](https://github.com/MechBot-2x/-MechanicalMind-Dependency-AI-v3.0-/actions/workflows/Ci.yml) ![MechMind Logo](https://via.placeholder.com/150x50?text=MechMind+AI) **Advanced Dependency Management with AI-Powered Resolution** @@ -154,4 +153,4 @@ Apache 2.0 with Commons Clause - See [LICENSE](LICENSE) --- -**MechanicalMind AI** © 2025 - Dependency Management Reimagined +**MechanicalMind AI** © 2023 - Dependency Management Reimagined diff --git a/ai_core/__init__.py b/ai_core/__init__.py deleted file mode 100644 index 2b364a89..00000000 --- a/ai_core/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -import warnings -from pathlib import Path - -# Suppress RuntimeWarnings during specific imports -with warnings.catch_warnings():Add commentMore actions - warnings.simplefilter("ignore", category=RuntimeWarning) - # Local module imports - from .dependency_analyzer import DependencyAnalyzer, main as analyzer_main - from .error_diagnosis_engine import ErrorDiagnosisEngine - from .auto_fix_module import DependencyAutoFixer - -# Define exports dynamically to reduce maintenance overhead -__all__ = [name for name in globals() if not name.startswith("_")] diff --git a/ai_core/diagnose.py b/diagnose.py similarity index 100% rename from ai_core/diagnose.py rename to diagnose.py diff --git a/docs/architectural/Overview b/docs/architectural/Overview deleted file mode 100644 index e0c7b30f..00000000 --- a/docs/architectural/Overview +++ /dev/null @@ -1,15 +0,0 @@ -## 🧩 Architecture Overview - -```mermaid -graph TD - A[CLI Interface] --> B[Core Engine] - B --> C[Analysis Module] - B --> D[Resolution Module] - C --> E[Version Compatibility Matrix] - C --> F[Conflict Predictor] - D --> G[Auto-Fix Strategies] - D --> H[Manual Resolution Guide] - E --> I[Knowledge Base] - F --> I - G --> I -``` diff --git a/ai_core/error_diagnosis_engine.py b/error_diagnosis_engine.py similarity index 100% rename from ai_core/error_diagnosis_engine.py rename to error_diagnosis_engine.py diff --git a/src/mechanicalmind_ai/core/filtered_reqs.txt b/filtered_reqs.txt similarity index 100% rename from src/mechanicalmind_ai/core/filtered_reqs.txt rename to filtered_reqs.txt diff --git a/src/mechanicalmind_ai/manage.py b/manage.py similarity index 100% rename from src/mechanicalmind_ai/manage.py rename to manage.py diff --git a/ai_core/mechmind_cli.py b/mechmind_cli.py similarity index 100% rename from ai_core/mechmind_cli.py rename to mechmind_cli.py diff --git a/project-root/STRUCTURE.md b/project-root/STRUCTURE.md index d7f54d57..1f184b29 100644 --- a/project-root/STRUCTURE.md +++ b/project-root/STRUCTURE.md @@ -1,4 +1,3 @@ -``` project-root/ ├── src/ │ └── your_package/ @@ -6,4 +5,3 @@ project-root/ ├── setup.py ├── pyproject.toml └── requirements.txt -``` \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1a157dce..df5e7d58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -108,3 +108,4 @@ exclude = ''' | build | dist )/ +''' \ No newline at end of file diff --git a/tests/pytest.ini b/pytest.ini similarity index 100% rename from tests/pytest.ini rename to pytest.ini diff --git a/dev/requirements.txt b/requirements-dev.txt similarity index 94% rename from dev/requirements.txt rename to requirements-dev.txt index 45230214..49860f50 100644 --- a/dev/requirements.txt +++ b/requirements-dev.txt @@ -12,4 +12,4 @@ flake8>=4.0.0 # Documentation sphinx>=5.0.0 -furo>=2022.4.0 +furo>=2022.4.0 \ No newline at end of file diff --git a/requirements.fixed.txt b/requirements.fixed.txt index 3d084abb..b3df936d 100644 --- a/requirements.fixed.txt +++ b/requirements.fixed.txt @@ -1,4 +1,4 @@ -django==4.2.22 +django==4.2.20 drf-yasg==1.21.7 pytest-django==4.5.2 -e . diff --git a/scripts/auto/deploy.py b/scripts/auto_deploy.py similarity index 100% rename from scripts/auto/deploy.py rename to scripts/auto_deploy.py diff --git a/scripts/monitoring/alerts.sh b/scripts/monitoring_alerts.sh similarity index 77% rename from scripts/monitoring/alerts.sh rename to scripts/monitoring_alerts.sh index 4c169cfc..d052a3cd 100755 --- a/scripts/monitoring/alerts.sh +++ b/scripts/monitoring_alerts.sh @@ -3,4 +3,4 @@ aws cloudwatch put-metric-alarm \ --metric-name "CPUUtilization" \ --namespace "GitHubRunners" \ --threshold 80 \ - --comparison-operator GreaterThanThreshold + --comparison-operator GreaterThanThreshold \ No newline at end of file diff --git a/scripts/setup/environment.sh b/scripts/setup_environment.sh similarity index 98% rename from scripts/setup/environment.sh rename to scripts/setup_environment.sh index a418d5c7..6c564e22 100755 --- a/scripts/setup/environment.sh +++ b/scripts/setup_environment.sh @@ -1,6 +1,9 @@ -!/bin/bash -# Configuración inicial del entorno para MechanicalMind Dependency AI v3.0 +#!/bin/bash + +# Configuración inicial del entorno para MechanicalMind Dependency AI v2.0 + echo "🚀 Iniciando configuración del entorno..." + # 1. Validar si Python está instalado if ! command -v python3 &> /dev/null then diff --git a/scripts/setup/runner.sh b/scripts/setup_runner.sh similarity index 100% rename from scripts/setup/runner.sh rename to scripts/setup_runner.sh diff --git a/src/mechanicalmind_ai/setup.py b/setup.py similarity index 89% rename from src/mechanicalmind_ai/setup.py rename to setup.py index 02b44ce1..945575a5 100644 --- a/src/mechanicalmind_ai/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ packages=find_packages(where="src"), package_dir={"": "src"}, install_requires=[ - "django=4.2.22", + "django==4.2.20", "drf-yasg==1.21.7", ], ) diff --git "a/\360\237\227\221\357\270\217/1" b/src/mechanicalmind_ai/core/dependency_analyzer.p similarity index 100% rename from "\360\237\227\221\357\270\217/1" rename to src/mechanicalmind_ai/core/dependency_analyzer.p diff --git a/src/mechanicalmind_ai/core/error_diagnosis_engine.py b/src/mechanicalmind_ai/core/error_diagnosis_engine.py index aabd9fa5..cda49d45 100755 --- a/src/mechanicalmind_ai/core/error_diagnosis_engine.py +++ b/src/mechanicalmind_ai/core/error_diagnosis_engine.py @@ -1,5 +1,5 @@ """ -MechanicalMind Error Diagnosis Engine v3.0 +MechanicalMind Error Diagnosis Engine v2.0 Core module for error analysis and resolution """ diff --git a/src/mechanicalmind_ai/core/knowledge_base/__init__.py b/src/mechanicalmind_ai/core/knowledge_base/__init__.py index bd82e20a..a1092feb 100755 --- a/src/mechanicalmind_ai/core/knowledge_base/__init__.py +++ b/src/mechanicalmind_ai/core/knowledge_base/__init__.py @@ -1,5 +1,5 @@ """ -MechanicalMind Knowledge Base Package v3.0 +MechanicalMind Knowledge Base Package v2.0 Initialization for knowledge base modules """ diff --git a/tests/requirements-test.txt b/tests/requirements-test.txt index 9a2791e8..278b1d7c 100644 --- a/tests/requirements-test.txt +++ b/tests/requirements-test.txt @@ -1,3 +1,4 @@ +# requirements-test.txt pytest>=7.0.0 pytest-django>=4.5.0 factory-boy>=3.0.0 diff --git a/tests/unit_tests/test_data/requirements.txt b/tests/unit_tests/test_data/requirements.txt index 275015c3..bd53dbb2 100644 --- a/tests/unit_tests/test_data/requirements.txt +++ b/tests/unit_tests/test_data/requirements.txt @@ -1,3 +1,4 @@ numpy>=1.19.0,<2.0.0 pandas==1.3.0 -# Comentario \ No newline at end of file +# Comentario +