11Contributor Guide
22=================
33
4+ .. note ::
5+
6+ The
7+ `Code of Conduct <https://github.com/idom-team/idom/blob/main/CODE_OF_CONDUCT.md >`__
8+ applies in all community spaces. If you are not familiar with our Code of Conduct
9+ policy, take a minute to read it before making your first contribution.
10+
11+ The IDOM team welcomes contributions and contributors of all kinds - whether they come
12+ as code changes, participation in the discussions, opening issues and pointing out bugs,
13+ or simply sharing your work with your colleagues and friends. We're excited to see how
14+ you can help move this project and community forward!
15+
16+
17+ .. _everyone can contribute :
18+
19+ Everyone Can Contribute!
20+ ------------------------
21+
22+ Trust us, there's so many ways to support the project. We're always looking for people
23+ who can:
24+
25+ - Improve our documentation
26+ - Teach and tell others about IDOM
27+ - Share ideas for new features
28+ - Report bugs
29+ - Participate in general discussions
30+
31+ Still aren't sure what you have to offer? Just :discussion-type: `ask us <question> ` and
32+ we'll help you make your first contribution.
33+
34+
435.. note ::
536
637 If you have any questions during set up or development post on our
738 :discussion-type: `discussion board <question> ` and we'll answer them.
839
9- This project uses the `GitHub Flow `_ (more detail :ref: `below <Making a Pull Request >`)
10- for collaboration and consists primarily of Python code and Javascript code. A
11- :ref: `variety of tools <Development Environment >` are used to aid in its development.
12- Any code contributed to IDOM is validated by a :ref: `series of tests <Running The
13- Tests>` to ensure its quality and correctness.
14-
1540
1641Making a Pull Request
1742---------------------
@@ -41,6 +66,47 @@ about how to get started. To make a change to IDOM you'll do the following:
4166 :ref: `equality checks <Code Quality Checks >` and, with any luck, accept your request.
4267 At that point your contribution will be merged into the main codebase!
4368
69+ Create a Changelog Entry
70+ ........................
71+
72+ As part of your pull request, you'll want to edit the :ref: `Changelog ` by adding an
73+ entry describing what you've changed or improved. You should write an entry in the style
74+ of `Keep a Changelog <https://keepachangelog.com/ >`__ that falls under one of the
75+ following categories, and add it to the :ref: `Unreleased ` section of the changelog:
76+
77+ - **Added ** - for new features.
78+ - **Changed ** - for changes in existing functionality.
79+ - **Deprecated ** - for soon-to-be removed features.
80+ - **Removed ** - for now removed features.
81+ - **Fixed ** - for any bug fixes.
82+ - **Documented ** - for improvements to this documentation.
83+ - **Security ** - in case of vulnerabilities.
84+
85+ If one of the sections doesn't exist, add it. If it does already, add a bullet point
86+ under the relevant section. Here's a short example of what an unreleased changelog entry
87+ might look like:
88+
89+ .. code-block :: rst
90+
91+ Unreleased
92+ ----------
93+
94+ **Added**
95+
96+ - A really cool new feature - :pull:`123`
97+
98+ **Changed**
99+
100+ - The behavior of some existing feature - :pull:`456`
101+
102+ **Fixed**
103+
104+ - Some really bad bug - :issue:`789`
105+
106+ .. note ::
107+
108+ ``:issue: `` and ``:pull: `` refer to issue and pull request ticket numbers.
109+
44110
45111Development Environment
46112-----------------------
@@ -104,19 +170,15 @@ However you may also ``cd`` to the ``src/client`` directory which contains a
104170Running The Tests
105171-----------------
106172
107- The test suite for IDOM uses Nox _ and NPM _ in order to validate :
173+ The test suite for IDOM is executed with Nox _. The suite covers :
108174
1091751. Server-side Python code with PyTest _
110176
1111772. The end-to-end application using Selenium _ in Python
112178
1131793. Client-side Javascript code with UVU _
114180
115-
116- Running Python Tests
117- ....................
118-
119- To run the full suite of Python tests you'll need to install:
181+ To run the full suite of tests you'll need to install:
120182
121183- `Google Chrome `_
122184
@@ -126,8 +188,7 @@ To run the full suite of Python tests you'll need to install:
126188
127189 Be sure the version of `Google Chrome `_ and ChromeDriver _ you install are compatible.
128190
129- Once you've installed the aforementioned browser and web driver you should be able to
130- run:
191+ Once you've installed the aforementioned browser and web driver you'll be able to run:
131192
132193.. code-block :: bash
133194
@@ -139,27 +200,6 @@ If you prefer to run the tests using a headless browser:
139200
140201 nox -s test -- --headless
141202
142- You can pass other options to pytest in a similar manner:
143-
144- .. code-block :: bash
145-
146- nox -s test -- arg --flag --key=value
147-
148-
149- Running Javascript Tests
150- ........................
151-
152- If you've already run ``npm install `` inside the ``src/idom/client/app `` directory, you
153- can execute the suite of workspace tests under ``packages/* `` with:
154-
155- .. code-block ::
156-
157- npm test
158-
159- As a final check, you might want to run ``npm run build ``. This command is run in the
160- top-level ``setup.py `` installation script for the Python package, so if this command
161- fails, the installation of the Python package with ``pip `` will too.
162-
163203
164204 Code Quality Checks
165205-------------------
@@ -175,11 +215,12 @@ The following are currently being used:
175215- Black _ - an opinionated code formatter
176216- Flake8 _ - a style guide enforcement tool
177217- ISort _ - a utility for alphabetically sorting imports
178- - Prettier _ - a tool for autimatically formatting Javascript code
218+ - Prettier _ - a tool for automatically formatting various file types
179219
180- The most strict measure of quality enforced on the codebase is 100% coverage. This means
181- that every line of coded added to IDOM requires a test case that exercises it. This
182- doesn't prevent all bugs, but it should ensure that we catch the most common ones.
220+ The most strict measure of quality enforced on the codebase is 100% test coverage in
221+ Python files. This means that every line of coded added to IDOM requires a test case
222+ that exercises it. This doesn't prevent all bugs, but it should ensure that we catch the
223+ most common ones.
183224
184225If you need help understanding why code you've submitted does not pass these checks,
185226then be sure to ask, either in the :discussion-type: `Community Forum <question> ` or in
@@ -196,7 +237,7 @@ your :ref:`Pull Request <Making a Pull Request>`.
196237Building The Documentation
197238--------------------------
198239
199- To build and display the documentation simply run:
240+ To build and display the documentation locally run:
200241
201242.. code-block :: bash
202243
@@ -215,13 +256,13 @@ To run some of the examples in the documentation as if they were tests run:
215256 nox -s test_docs
216257
217258 Building the documentation as it's deployed in production requires Docker _. Once you've
218- installed, you can run:
259+ installed Docker , you can run:
219260
220261.. code-block :: bash
221262
222263 nox -s docs_in_docker
223264
224- You should then navigate to to see the documentation .
265+ Where you can then navigate to http://localhost:5000. .
225266
226267
227268Release Process
@@ -249,58 +290,7 @@ To update the version for all core Javascript and Python packages in IDOM run:
249290
250291 .. note ::
251292
252- The new version must adhere to `SemVer <https://semver.org/ >`__. Once IDOM
253- becomes stable we will shift to using `CalVer <https://calver.org/ >`__.
254-
255-
256- Create Changelog Entry
257- ......................
258-
259- Immediately after updating the version you'll need to create a changelog entry for the
260- release. This should **always ** include a human authored summary of the changes it
261- includes. For example, new or deprecated features, performance improvements, and bug
262- fixes (whatever is relevant). To help with this, there are some useful tools for
263- gathering the Pull Requests and Issues that have been merged and resolved since the last
264- release. While reviewing these items can help in writing a human authored release
265- summary, you **must not ** resort to a bullet list of Pull Request and Issue
266- descriptions. Putting these two together, the format of a changelog entry should look a
267- bit like this:
268-
269- .. code-block :: text
270-
271- X.Y.Z
272- -----
273-
274- The release summary...
275-
276- **Closed Issues**
277-
278- - Some issue - :issue:`123`
279- - Another issue - :issue:`456`
280-
281- **Pull Requests**
282-
283- - Some pull request - :pull:`123`
284- - Another pull request - :pull:`456`
285-
286- **Deprecated Features**
287-
288- - Description one
289- - Description two
290-
291- To create the list of pull requests and closed issues you can copy the output of the
292- following commands using the ``<format> `` of your choosing (``rst ``, ``md ``, ``text ``):
293-
294- .. note ::
295-
296- You should currate the list - not everything needs to be included.
297-
298- .. code-block :: bash
299-
300- nox -s changes_since_release -- < format>
301-
302- Once the version has been updated and the changelog entry completed, you should commit
303- the changes.
293+ The new version must adhere to `SemVer <https://semver.org/ >`__.
304294
305295
306296Creating The Release
@@ -321,12 +311,12 @@ To create the release tag you can run the following command:
321311
322312 nox -s tag -- push
323313
324- Last, you must create a
325- ` "Release" <https://docs.github.com/en/github/administering-a-repository/releasing-projects-on-github/managing-releases-in-a-repository >`__
314+ Last, you must create a ` "Release"
315+ <https://docs.github.com/en/github/administering-a-repository/releasing-projects-on-github/managing-releases-in-a-repository> `__
326316in GitHub. Because we pushed a tag using the command above, there should already be a
327- saved draft which needs a title and desription . The title should simply be the version
328- (same as the tag), and the description should, at minimum, be a markdown version of the
329- already authored :ref: ` Changelog summary < Create Changelog Entry >` .
317+ saved draft which needs a title and description . The title should simply be the version
318+ (same as the tag), and the description should simply use GitHub's "Auto-generated
319+ release notes" .
330320
331321
332322Other Core Repositories
0 commit comments