1
- Developer Workflow
2
- ==================
1
+ Developer Guide
2
+ ===============
3
3
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:
8
14
9
15
.. list-table ::
10
16
:header-rows: 1
@@ -37,15 +43,45 @@ follow:
37
43
- containerizing and hosting this documentation
38
44
39
45
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
+
40
75
Development Environment
41
76
-----------------------
42
77
78
+ If you've already :ref:
43
79
In order to work with IDOM's source code you'll need to install Git _ (or `Git Bash `_ on
44
80
Windows). Once done you can clone a local copy of this repository:
45
81
46
82
.. code-block :: bash
47
83
48
- git clone https://github.com/rmorshea /idom.git
84
+ git clone https://github.com/idom-team /idom.git
49
85
cd idom
50
86
51
87
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:
54
90
55
91
- Download, build, and install Javascript dependencies
56
92
57
- - Install some pre-commit hooks for Git
93
+ - Install some pre-commit _ hooks for Git
58
94
59
95
.. code-block :: bash
60
96
@@ -102,12 +138,36 @@ If you prefer to run the tests using a headless browser:
102
138
103
139
nox -s test -- pytest[--headless]
104
140
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
+ -------------------
105
150
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.
108
155
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 >`.
111
171
112
172
113
173
Building The Documentation
@@ -141,35 +201,17 @@ installed, you can run:
141
201
You should then navigate to to see the documentation.
142
202
143
203
144
- Making a Pull Request
145
- ---------------------
146
-
147
- Under construction...
148
-
149
-
150
204
Release Process
151
205
---------------
152
206
153
207
Under construction...
154
208
155
209
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
-
168
210
Other Core Repositories
169
211
-----------------------
170
212
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
173
215
174
216
- https://github.com/idom-team/idom-client-react - Javascript client for IDOM
175
217
- 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
194
236
.. _GitHub Actions : https://github.com/features/actions
195
237
.. _pre-commit : https://pre-commit.com/
196
238
.. _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