app/assets/en_dev_guide.md.D7Lu3_81.js

2 lines
6.7 KiB
JavaScript
Raw Normal View History

import{C as o}from"./chunks/ContributorBar.pjj_m5_8.js";import{o as t,c as i,a7 as r,G as a}from"./chunks/framework._avq4Ty7.js";import"./chunks/theme.C4kBN4Ub.js";const h=JSON.parse('{"title":"Development Guide","description":"","frontmatter":{"title":"Development Guide","order":0},"headers":[],"relativePath":"en/dev/guide.md","filePath":"en/dev/guide.md","lastUpdated":1725389024000}'),l={name:"en/dev/guide.md"},p=Object.assign(l,{setup(n){return(d,e)=>(t(),i("div",null,[e[0]||(e[0]=r('<h1 id="development-guide" tabindex="-1">Development Guide <a class="header-anchor" href="#development-guide" aria-label="Permalink to &quot;Development Guide&quot;"></a></h1><h2 id="how-to-develop" tabindex="-1">How to Develop <a class="header-anchor" href="#how-to-develop" aria-label="Permalink to &quot;How to Develop&quot;"></a></h2><p>Please read the <a href="./plugin.html">Plugin Development</a> and <a href="./api/">API Reference</a> documents if you are developing a plugin.</p><p>If you need to submit code to the Liteyuki repository, please read the following:</p><ol><li>First <a href="https://github.com/LiteyukiStudio/LiteyukiBot/fork" target="_blank" rel="noreferrer">fork</a> a copy of the Liteyuki repository to your personal/organization account.</li><li>Develop in your repository.</li><li>Create a new branch in your repository and submit your code to this branch.</li><li>Create a Pull Request in your repository to merge your branch into the <code>main</code> branch of the Liteyuki repository.</li></ol><ul><li>Participation in development assumes that you are already familiar with the basic usage of the Python language and the Liteyuki framework.</li><li>If you are developing documentation, please ensure that you are familiar with Markdown syntax and basic front-end knowledge.</li><li>Contact the repository maintainer in case of conflicts.</li></ul><h3 id="suggestions" tabindex="-1">Suggestions <a class="header-anchor" href="#suggestions" aria-label="Permalink to &quot;Suggestions&quot;"></a></h3><ul><li>During development, you can use tools such as <code>mypy</code>, <code>flake8</code>, and <code>black</code> for code checking and formatting.</li><li>Enable developer mode by setting <code>dev_mode: true</code> in <code>config.yml</code> to see more debugging information in the console.</li></ul><h2 id="project-structure" tabindex="-1">Project Structure <a class="header-anchor" href="#project-structure" aria-label="Permalink to &quot;Project Structure&quot;"></a></h2><ul><li><code>main.py</code>: Bot entry file</li><li><code>liteyuki</code>: Framework directory (liteyukibot)</li><li><code>src</code>: Bot application source code directory <ul><li><code>liteyuki_plugins</code>: Liteyuki plugin directory</li><li><code>nonebot_plugins</code>: Nonebot plugin directory</li><li><code>resources</code>: Built-in resource packs directory</li><li><code>utils</code>: Utility directory</li></ul></li><li><code>tests</code>: Unit test directory</li><li><code>docs</code>: Documentation directory <ul><li><code>en</code>: English documentation</li><li><code>zh</code>: Chinese documentation</li></ul></li><li><code>docker</code>: Docker related content directory</li></ul><p>The <code>liteyuki</code> framework is included in the <code>LiteyukiBot</code> application, so this project is both the <code>LiteyukiBot</code> application repository and the <code>liteyuki</code> framework repository.</p><p>The <code>src</code> directory is the application part, please develop business logic in this directory. <code>liteyuki_plugins</code> and <code>nonebot_plugins</code> directories are plugin directories, please develop plugins in these directories.</p><h2 id="standardization" tabindex="-1">Standardization <a class="header-anchor" href="#standardization" aria-label="Permalink to &quot;Standardization&quot;"></a></h2><ul><li>Code should follow <a href="https://pep8.org/" target="_blank" rel="noreferrer"><code>PEP8</code></a> and <a href="https://google.github.io/styleguide/pyguide.html" target="_blank" rel="noreferrer"><code>Google Python Sty