Skip to content
Apothem
आर्किटेक्चर

स्रोत लेआउट

Apothem src/ लेआउट का उपयोग क्यों करता है और ट्री कैसे व्यवस्थित है।

Apothem ने PyPA src-layout अपनाया है, जिसमें सारा इम्पोर्ट-योग्य Python src/apothem/ के अंतर्गत रखा जाता है।

src-layout क्यों

  • इम्पोर्ट पृथक्करण। import apothem केवल तभी हल होता है जब src/ पथ पर हो (इंजन PYTHONPATH=src python -m apothem के रूप में चलता है), जिससे किसी असंबंधित डायरेक्टरी से वर्किंग ट्री का आकस्मिक इम्पोर्ट रुकता है।
  • स्व-निहित रनटाइम। Apothem सीधे किसी चेकआउट से चलता है, और उसकी निर्भरताएँ src/apothem/_vendor/ के अंतर्गत वेंडर की गई होती हैं — किसी इंस्टॉल चरण की आवश्यकता नहीं होती। src-layout उस इम्पोर्ट-योग्य सतह को रिपॉज़िटरी के टूलिंग, परीक्षणों, और स्क्रिप्टों से साफ़ तौर पर अलग रखता है।
  • स्वच्छ वितरण। वही लेआउट एक सुगठित sdist और wheel (और एक वैकल्पिक pip install -e . एडिटेबल इंस्टॉल) उत्पन्न करता है, जिसकी सामग्री ठीक उसी से मेल खाती है जो शिप होता है, और कोई भटका हुआ शीर्ष-स्तरीय मॉड्यूल अंदर नहीं घुसता।

ट्री संरचना

src/apothem/
    agents/         persistent agent definitions (*.md)
    audit/          inventory and provenance tools
    benchmarks/     performance benchmarks
    cli/            Click CLI (top-level commands listed below the tree)
    commands/       slash command definitions (*.md)
    conformity/     mechanical gate checkers (*_grep.py)
    harnesses/      one sub-package per harness adapter (17 adapters)
    hooks/          hook dispatcher + message files
    lib/            shared Python library
    output-styles/  output-style definitions (*.md)
    rules/          behavioral rules (*.md)
    schemas/        YAML/JSON schemas
    skills/         reusable skill templates (folder/SKILL.md)
    statuslines/    status-line config (*.json)
    templates/      reusable template artifacts

CLI कमांड

नीचे दी गई सूची Click कमांड ट्री से उत्पन्न होती है।

The cli/ package registers 14 top-level commands:

इम्पोर्ट-योग्य बनाम कॉन्फ़िगरेशन आर्टिफ़ैक्ट

src/apothem/ के अंतर्गत कई आइटम Markdown कॉन्फ़िगरेशन आर्टिफ़ैक्ट हैं, Python मॉड्यूल नहीं। इम्पोर्ट-योग्य Python सतह यह है:

  • src/apothem/cli/ (apothem एंट्री पॉइंट के रूप में उजागर Click CLI)
  • src/apothem/harnesses/ (17 हार्नेस अडैप्टर उप-पैकेज)
  • src/apothem/lib/ (साझा लाइब्रेरी: प्रोफ़ाइल, रजिस्ट्री, मूर्तीकारक, प्रसार)
  • src/apothem/hooks/ (dispatch.py, lib/)
  • src/apothem/conformity/ (यांत्रिक grep स्क्रिप्ट)
  • src/apothem/audit/ (इन्वेंटरी स्क्रिप्ट)
  • src/apothem/benchmarks/ (प्रदर्शन बेंचमार्क ड्राइवर)

On this page