1- Developer Workflow
2- ==================
1+ Developer Guide
2+ ===============
33
4- This project uses the `GitHub Flow `_ for collaboration and consists primarilly of Python
5- code and Javascript code. A variety of tools are used to aid in its development. Below
6- is a short list of the tools which will be most commonly referenced in the sections to
7- follow:
4+ .. note ::
5+
6+ If you have any questions during set up or development post on our
7+ `discussion board <https://github.com/idom-team/idom/discussions >`__ and we'll
8+ answer them.
9+
10+ This project uses the `GitHub Flow `_ (more detail :ref: `below <Making a Pull Request >`)
11+ for collaboration and consists primarilly of Python code and Javascript code. A variety
12+ of tools are used to aid in its development. Below is a short list of the tools which
13+ will be most commonly referenced in the sections to follow:
814
915.. list-table ::
1016 :header-rows: 1
@@ -37,15 +43,45 @@ follow:
3743 - containerizing and hosting this documentation
3844
3945
46+ Making a Pull Request
47+ ---------------------
48+
49+ To make your first code contribution to IDOM, you'll need to install Git _ (or
50+ `Git Bash `_ on Windows). Thankfully there are many helpful
51+ `tutorials <https://github.com/firstcontributions/first-contributions/blob/master/README.md >`__
52+ about how to get started. To make a change to IDOM you'll do the following:
53+
54+ `Fork IDOM <https://docs.github.com/en/github/getting-started-with-github/fork-a-repo >`__:
55+ Go to `this URL <https://github.com/idom-team/idom >`__ and click the "Fork" button.
56+
57+ `Clone your fork <https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository >`__:
58+ You use a ``git clone `` command to copy the code from GitHub to your computer.
59+
60+ `Create a new branch <https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging >`__:
61+ You'll ``git checkout -b your-first-branch `` to create a new space to start your work
62+
63+ :ref: `Prepare your Development Environment <Development Environment >`:
64+ We explain in more detail below how to install all IDOM's dependencies
65+
66+ `Push your changes <https://docs.github.com/en/github/using-git/pushing-commits-to-a-remote-repository >`__:
67+ Once you've made changes to IDOM, you'll ``git push `` them to your fork.
68+
69+ `Create a Pull Request <https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request >`__:
70+ We'll review your changes, run some :ref: `tests <Running The Tests >` and
71+ :ref: `qaulity checks <Code Quality Checks >` and, with any luck, accept your request.
72+ At that point your contribution will be merged into the main codebase!
73+
74+
4075Development Environment
4176-----------------------
4277
78+ If you've already :ref:
4379In order to work with IDOM's source code you'll need to install Git _ (or `Git Bash `_ on
4480Windows). Once done you can clone a local copy of this repository:
4581
4682.. code-block :: bash
4783
48- git clone https://github.com/rmorshea /idom.git
84+ git clone https://github.com/idom-team /idom.git
4985 cd idom
5086
5187 At this point you should be able to run the command below to:
@@ -54,7 +90,7 @@ At this point you should be able to run the command below to:
5490
5591- Download, build, and install Javascript dependencies
5692
57- - Install some pre-commit hooks for Git
93+ - Install some pre-commit _ hooks for Git
5894
5995.. code-block :: bash
6096
@@ -102,12 +138,36 @@ If you prefer to run the tests using a headless browser:
102138
103139 nox -s test -- pytest[--headless]
104140
141+ You can pass other options to pytest in a similar manner:
142+
143+ .. code-block :: bash
144+
145+ nox -s test -- pytest[arg,--flag,--key= value]
146+
147+
148+ Code Quality Checks
149+ -------------------
105150
106- Code Style
107- ----------
151+ Several tools are run on the Python codebase to help validate its quality. For the most
152+ part, if you set up your :ref: `Development Environment ` with ``pre-commit `` to check
153+ your work before you commit it, then you'll be notified when changes need to be made or,
154+ in the best case, changes will be made automatically for you.
108155
109- Under construction... in the meantime though, we use
110- `Black <https://github.com/psf/black >`__ to format our code.
156+ The following are currently being used:
157+
158+ - MyPy _ - a static type checker
159+ - Black _ - an opinionated code formatter
160+ - Flake8 _ - a style guide enforcement tool
161+ - ISort _ - a utility for alphabetically sorting imports
162+
163+ The most strict measure of quality enforced on the codebase is 100% coverage. This means
164+ that every line of coded added to IDOM requires a test case that excersizes it. This
165+ doesn't prevent all bugs, but it should ensure that we catch the most common ones.
166+
167+ If you need help understanding why code you've submitted does not pass these checks,
168+ then be sure to ask, either in the
169+ `Community Forum <https://github.com/idom-team/idom/discussions >`__ or in your
170+ :ref: `Pull Request <Making a Pull Request >`.
111171
112172
113173Building The Documentation
@@ -141,35 +201,17 @@ installed, you can run:
141201 You should then navigate to to see the documentation.
142202
143203
144- Making a Pull Request
145- ---------------------
146-
147- Under construction...
148-
149-
150204Release Process
151205---------------
152206
153207Under construction...
154208
155209
156- How It's Published to PyPI
157- ..........................
158-
159- Under construction...
160-
161-
162- How Docs are Deployed to Heroku
163- ...............................
164-
165- Under construction...
166-
167-
168210Other Core Repositories
169211-----------------------
170212
171- IDOM involves several other core projects. For documentation on them you should refer to
172- their respective documentation in the links below
213+ IDOM depends on several other core projects. For documentation on them you should refer
214+ to their respective documentation in the links below
173215
174216- https://github.com/idom-team/idom-client-react - Javascript client for IDOM
175217- https://github.com/idom-team/flake8-idom-hooks - Enforces the :ref: `Rules of Hooks `
@@ -194,3 +236,7 @@ their respective documentation in the links below
194236.. _GitHub Actions : https://github.com/features/actions
195237.. _pre-commit : https://pre-commit.com/
196238.. _GitHub Flow : https://guides.github.com/introduction/flow/
239+ .. _MyPy : http://mypy-lang.org/
240+ .. _Black : https://github.com/psf/black
241+ .. _Flake8 : https://flake8.pycqa.org/en/latest/
242+ .. _ISort : https://pycqa.github.io/isort/
0 commit comments