nonebot-plugin-marshoai/assets/dev_project.md.CI3gYpYz.js

7 lines
5.0 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{d as l,c as i,o as t,j as s,_ as r,ae as h,G as o}from"./chunks/framework.CTVYQtO4.js";const p={class:"contributor-bar"},d="https://contrib.rocks/image?repo=LiteyukiStudio/nonebot-plugin-marshoai",k="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/graphs/contributors",c=l({__name:"ContributorsBar",setup(e){return(n,a)=>(t(),i("div",p,[s("a",{href:k},[s("div",{class:"contributor-list"},[s("img",{src:d,alt:"Contributors"})])])]))}}),g=r(c,[["__scopeId","data-v-a8a7ee99"]]),F=JSON.parse('{"title":"项目开发","description":"","frontmatter":{"order":1},"headers":[],"relativePath":"dev/project.md","filePath":"zh/dev/project.md","lastUpdated":1734972856000}'),u={name:"dev/project.md"},m=Object.assign(u,{setup(e){return(n,a)=>(t(),i("div",null,[a[0]||(a[0]=h(`<h1 id="项目开发" tabindex="-1">项目开发 <a class="header-anchor" href="#项目开发" aria-label="Permalink to &quot;项目开发&quot;"></a></h1><h2 id="先决条件" tabindex="-1">先决条件 <a class="header-anchor" href="#先决条件" aria-label="Permalink to &quot;先决条件&quot;"></a></h2><ul><li><code>Git</code></li><li><code>Python3.10+</code></li></ul><h2 id="准备工作" tabindex="-1">准备工作 <a class="header-anchor" href="#准备工作" aria-label="Permalink to &quot;准备工作&quot;"></a></h2><ul><li>克隆仓库</li></ul><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 克隆仓库</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nonebot-plugin-marshoai</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 切换目录</span></span></code></pre></div><ul><li>安装依赖 项目使用pdm作为依赖管理</li></ul><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">python3</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -m</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> venv</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> venv</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 或创建你自己的环境</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">source</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> venv/bin/activate</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 激活虚拟环境</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pip</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pdm</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 安装依赖管理</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pdm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 安装依赖</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pre-commit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 安装 pre-commit 钩子</span></span></code></pre></div><h2 id="代码规范" tabindex="-1">代码规范 <a class="header-anchor" href="#代码规范" aria-label="Permalink to &quot;代码规范&quot;"></a></h2><p>主仓库需要遵循以下代码规范</p><ul><li><a href="https://peps.python.org/pep-0008/" target="_blank" rel="noreferrer"><code>PEP8</code></a> 代码风格</li><li><a href="https://black.readthedocs.io/en/stable/index.html" target="_blank" rel="noreferrer"><code>Black</code></a> 代码格式化</li><li><a href="https://www.mypy-lang.org/" target="_blank" rel="noreferrer"><code>mypy</code></a> 静态类型检查</li><li><a href="https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html" target="_blank" rel="noreferrer"><code>Google Docstring</code></a> 文档规范</li></ul><p>可以在编辑器中安装相应的插件进行辅助</p><h2 id="其他" tabindex="-1">其他 <a class="header-anchor" href="#其他" aria-label="Permalink to &quot;其他&quot;"></a></h2><p>感谢以下的贡献者们:</p>`,14)),o(g)]))}});export{F as __pageData,m as default};