Skip to main content
Arka automated tests के लिए pytest का उपयोग करता है। Suite routing, LLM failover, vision, integrations, telemetry, और skill-specific behavior को कवर करता है।

Continuous integration

Pull requests और main पर pushes .github/workflows/ci.yml चलाते हैं:
  1. Ruffruff check src/ tests/
  2. Pytest gate — MCP, OpenClaw/Hermes, clipboard, agent hub, और LLM fallback suites (जैसे-जैसे अन्य modules stabilize हों, इसे बढ़ाएँ)
Tag pushes अभी भी PyPI के लिए अलग Publish workflow का उपयोग करते हैं। स्थानीय रूप से आप अभी भी pytest tests/ के साथ पूरा suite चला सकते हैं। Docs changes को local docs reliability checker भी pass करना चाहिए:

Tests चलाना

एक dev checkout से:
एक single file या test चलाएँ:

Extreme production-readiness constraints

Critical changes के लिए, Arka से opt-in उच्च-कठोरता वाला production-readiness preset माँगें:
यह सामान्य QA plan को correctness, quality gates, security/privacy, reliability/operations, और release readiness के लिए स्पष्ट constraints में विस्तारित करता है। इसमें unit tests, Gherkin/acceptance tests, integration और contract tests, e2e/smoke tests, mutation testing, test coverage, static analysis, secrets/privacy checks, dependency safety, observability, performance, rollback, configuration validation, backward compatibility, documentation, और migration integrity शामिल हैं। Arka को हर claim को evidence-backed मानना चाहिए: यदि mutation testing, coverage, security scanning, SLOs, या कोई production metric वर्तमान project में measure नहीं किया जा सकता, तो वह ईमानदारी से यह report करता है — pass का आविष्कार करने के बजाय। Dev extras install करें (इसमें pytest और ruff शामिल हैं):

Test suite overview

tests/ directory area के अनुसार organized है:

Routing और NL parsing

LLM और providers

Vision और media

Integrations

Observability

नए tests लिखना

Tests को test_ prefix के साथ tests/ में रखें। मौजूदा patterns का पालन करें:
Routing tests के लिए, सीधे arka.routing.symbolic helpers या arka.router.route() का उपयोग करें। जब tests को network hit नहीं करना चाहिए तो external APIs (LLM, web search) को mock करें।

Linting

ruff [dev] extra में शामिल है।

Local verification scripts

pytest के अलावा, repo में helper scripts शामिल हैं:
कुछ tests को optional extras ([chat], [charts], [drawings]) या API keys की आवश्यकता होती है। जिन tests को network access की आवश्यकता होती है, वे आमतौर पर mock किए जाते हैं — यदि कोई test import पर fail हो, तो पहले matching extra install करें।