"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([["7810"],{8120:function(e,n,t){t.r(n),t.d(n,{default:()=>u,frontMatter:()=>r,metadata:()=>o,assets:()=>l,toc:()=>a,contentTitle:()=>c});var o=JSON.parse('{"id":"meta/contributing","title":"Contributing","description":"Contributing to COSMOS using the github workflow","source":"@site/docs/meta/contributing.md","sourceDirName":"meta","slug":"/meta/contributing","permalink":"/tools/staticdocs/docs/meta/contributing","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/meta/contributing.md","tags":[],"version":"current","frontMatter":{"title":"Contributing","description":"Contributing to COSMOS using the github workflow","sidebar_custom_props":{"myEmoji":"\uD83D\uDE42"}},"sidebar":"defaultSidebar","previous":{"title":"Meta","permalink":"/tools/staticdocs/docs/meta"},"next":{"title":"Licenses","permalink":"/tools/staticdocs/docs/meta/licenses"}}'),i=t("2322"),s=t("2840");let r={title:"Contributing",description:"Contributing to COSMOS using the github workflow",sidebar_custom_props:{myEmoji:"\uD83D\uDE42"}},c=void 0,l={},a=[{value:"Test Dependencies",id:"test-dependencies",level:2},{value:"Workflow",id:"workflow",level:2}];function d(e){let n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"So you've got an awesome idea to throw into COSMOS. Great! This is the basic process:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Fork the project on Github"}),"\n",(0,i.jsx)(n.li,{children:"Create a feature branch"}),"\n",(0,i.jsx)(n.li,{children:"Make your changes"}),"\n",(0,i.jsx)(n.li,{children:"Submit a pull request"}),"\n"]}),"\n",(0,i.jsxs)(n.admonition,{title:"Don't Forget the Contributor License Agreement!",type:"note",children:[(0,i.jsxs)(n.p,{children:["By contributing to this project, you accept our Contributor License Agreement which is found here: ",(0,i.jsx)(n.a,{href:"https://github.com/OpenC3/cosmos/blob/main/CONTRIBUTING.txt",children:"Contributor License Agreement"})]}),(0,i.jsx)(n.p,{children:"This protects both you and us and you retain full rights to any code you write."})]}),"\n",(0,i.jsx)(n.h2,{id:"test-dependencies",children:"Test Dependencies"}),"\n",(0,i.jsxs)(n.p,{children:["To run the test suite and build the gem you'll need to install COSMOS's\ndependencies. COSMOS uses Bundler, so a quick run of the ",(0,i.jsx)(n.code,{children:"bundle"})," command and\nyou're all set!"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"\\$ bundle\n"})}),"\n",(0,i.jsx)(n.p,{children:"Before you start, run the tests and make sure that they pass (to confirm your\nenvironment is configured properly):"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"\\$ bundle exec rake build spec\n"})}),"\n",(0,i.jsx)(n.h2,{id:"workflow",children:"Workflow"}),"\n",(0,i.jsx)(n.p,{children:"Here's the most direct way to get your work merged into the project:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Fork the project."}),"\n",(0,i.jsx)(n.li,{children:"Clone down your fork:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"git clone git://github.com//openc3.git\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Create a topic branch to contain your change:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"git checkout -b my_awesome_feature\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Hack away, add tests. Not necessarily in that order."}),"\n",(0,i.jsxs)(n.li,{children:["Make sure everything still passes by running ",(0,i.jsx)(n.code,{children:"bundle exec rake"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"If necessary, rebase your commits into logical chunks, without errors."}),"\n",(0,i.jsx)(n.li,{children:"Push the branch up:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"git push origin my_awesome_feature\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Create a pull request against openc3/cosmos",":main"," and describe what your\nchange does and the why you think it should be merged."]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{title:"Find a problem in the code or documentation?",type:"note",children:(0,i.jsxs)(n.p,{children:["Please ",(0,i.jsx)(n.a,{href:"https://github.com/OpenC3/cosmos/issues/new/choose",children:"create an issue"})," on\nGitHub describing what we can do to make it better."]})})]})}function u(e={}){let{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},2840:function(e,n,t){t.d(n,{Z:function(){return c},a:function(){return r}});var o=t(2784);let i={},s=o.createContext(i);function r(e){let n=o.useContext(s);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]);