How mdwiki-td/mdwiki-python-files works
• Bot Modules/Packages: Each major directory (for example, copy_text, copy_to_en, fix_use, md_core, td_core, wprefs, newupdater, md_core_helps) should be represented as independent modules or sub-systems. These modules appear to encapsulate various automated tasks such as copying text, fixing references, adding data to wiki pages, and handling one-time operations.
• API & Integration Interfaces: Within some modules (especially in md_core_helps and related directories) there are files that reference API interactions (e.g., wikidataapi, mdwiki_api). Mark these as external interface components that communicate with external systems.
• Data and Database Access Components: There are several files that deal with SQL (in modules like mdapi_sql in md_core_helps and also in td_core). Represent these as a “Database Access/SQL Module” to show how data is queried, updated, or integrated within the processing pipeline.
• Testing & Configuration: Although not part of the main execution flow, include a component for tests (as many directories include tests subfolders and unit tests like test_*.py) and notice the configuration files (.gitattributes, .gitignore, .pre-commit-config.yaml, and others) that regulate development practices.
Relationships and Interactions
• How each bot module may act as an independent service or script that potentially interacts with a shared database and/or calls shared utility functions across the project.
• That scheduling and automation may be externally controlled (e.g., via GitHub workflows found in .github/workflows) which could be represented as an “Automation/CI/CD” component that triggers these scripts or bots.
Architectural Patterns and Design Principles
• Extensibility: The presence of many “bots” and subdirectories within them (like bots, tests, and one_time tasks) indicates a design that allows adding or updating discrete functionality without affecting the entire system.
• Reusability: Common functionality (for example, repeated API wrappers or shared SQL utilities) is likely abstracted into central helper modules, e.g., md_core_helps, underscoring an emphasis on code reuse.
Relevant Technologies, Frameworks, or Libraries
• Based on file names and structure, the project is written in Python. You might note the use of YAML configuration files (such as .coderabbit.yaml and sweep.yaml) that suggest integration with external tools.
• Testing frameworks: The unit test files imply the use of a Python testing framework (like pytest or unittest), so adding a “Testing Framework” component may be useful.