PageSourceSearch

https://doteki.org/assets/js/848dab9f.d2469b8e.js

js doteki.org collected 2026-10-03 23:20:48 UTC 5,468 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkdoteki_website=globalThis.webpackChunkdoteki_website||[]).push([[559],{1752(e,n,i){i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>l,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"developer-guide/index","title":"Developer Guide","description":"Initial setup","source":"@site/docs/developer-guide/index.md","sourceDirName":"developer-guide","slug":"/developer-guide/","permalink":"/docs/developer-guide/","draft":false,"unlisted":false,"editUrl":"https://github.com/welpo/doteki/tree/main/website/docs/developer-guide/index.md","tags":[],"version":"current","sidebarPosition":5,"frontMatter":{"sidebar_position":5,"title":"Developer Guide"},"sidebar":"tutorialSidebar","previous":{"title":"Random Choice Plugin","permalink":"/docs/plugins/random_choice"},"next":{"title":"Contributing to d\u014dteki","permalink":"/docs/developer-guide/contributing"}}');var s=i(4848),r=i(8453);const l={sidebar_position:5,title:"Developer Guide"},o=void 0,d={},c=[{value:"Initial setup",id:"initial-setup",level:2},{value:"Useful commands",id:"useful-commands",level:2},{value:"Running tests",id:"running-tests",level:3},{value:"Checking code coverage",id:"checking-code-coverage",level:3},{value:"Checking types",id:"checking-types",level:3},{value:"Formatting code",id:"formatting-code",level:3},{value:"Further reading",id:"further-reading",level:2},{value:"Questions?",id:"questions",level:2}];function a(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"initial-setup",children:"Initial setup"}),"\n",(0,s.jsx)(n.p,{children:"To get started, you'll need to set up your development environment:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://python-poetry.org/docs/#installation",children:"Install Poetry"}),":"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -sSL https://install.python-poetry.org | python3 -\n"})}),"\n",(0,s.jsxs)(n.ol,{start:"2",children:["\n",(0,s.jsx)(n.li,{children:"Set up the development environment (run from the project root):"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"poetry install --all-extras  # Remove --all-extras to ignore plugin dependencies.\n"})}),"\n",(0,s.jsxs)(n.ol,{start:"3",children:["\n",(0,s.jsx)(n.li,{children:"Start the poetry shell:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"poetry shell\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Now you can run ",(0,s.jsx)(n.code,{children:"doteki"})," within the shell:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"doteki --help\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"doteki"})," command will be available within the ",(0,s.jsx)(n.code,{children:"poetry shell"})," and is linked to the project's source code. Any changes to the code will be reflected in the command."]}),"\n",(0,s.jsx)(n.h2,{id:"useful-commands",children:"Useful commands"}),"\n",(0,s.jsx)(n.h3,{id:"running-tests",children:"Running tests"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"poetry run pytest\n"})}),"\n",(0,s.jsx)(n.h3,{id:"checking-code-coverage",children:"Checking code coverage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"poetry run pytest --cov=doteki\n"})}),"\n",(0,s.jsx)(n.h3,{id:"checking-types",children:"Checking types"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"poetry run mypy doteki\n"})}),"\n",(0,s.jsx)(n.h3,{id:"formatting-code",children:"Formatting code"}),"\n",(0,s.jsxs)(n.p,{children:["d\u014dteki uses ",(0,s.jsx)(n.a,{href:"https://github.com/psf/black",children:"Black"})," to format the code. To format a file or directory:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"poetry run black {source file or directory}\n"})}),"\n",(0,s.jsx)(n.h2,{id:"further-reading",children:"Further reading"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"contributing/",children:"Contributing Guidelines"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"plugin-standard/",children:"Developing Plugins"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"website/",children:"Website & Documentation"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"questions",children:"Questions?"}),"\n",(0,s.jsxs)(n.p,{children:["If you have any questions, don't hesitate to reach out via the ",(0,s.jsx)(n.a,{href:"https://github.com/welpo/doteki/issues",children:"issue tracker"})," or ",(0,s.jsx)(n.a,{href:"mailto:[email protected]?subject=%5BGitHub%5D%20d%C5%8Dteki",children:"email"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453(e,n,i){i.d(n,{R:()=>l,x:()=>o});var t=i(6540);const s={},r=t.createContext(s);function l(e){const n=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.