Skip to content

Commit 3f8803e

Browse files
authored
Re-organize docs + start using "Keep a Changelog" style (#689)
* doc reorg + apply "keep a changelog" style to changelog.rst * fix spelling mistakes * minor improvements * remove unused ref * fix typos
1 parent 2a54b34 commit 3f8803e

File tree

132 files changed

+219
-426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+219
-426
lines changed

docs/source/developing-idom/changelog.rst renamed to docs/source/about/changelog.rst

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,41 @@
11
Changelog
22
=========
33

4-
The IDOM team manages their short and long term plans with `GitHub Projects
5-
<https://github.com/orgs/idom-team/projects/1>`__. If you have questions about what the
6-
team are working on, or have feedback on how issues should be prioritized, feel free to
7-
:discussion-type:`open up a discussion <question>`.
4+
.. note::
85

6+
The IDOM team manages their short and long term plans with `GitHub Projects
7+
<https://github.com/orgs/idom-team/projects/1>`__. If you have questions about what
8+
the team are working on, or have feedback on how issues should be prioritized, feel
9+
free to :discussion-type:`open up a discussion <question>`.
10+
11+
All notable changes to this project will be recorded in this document. The style of
12+
which is based on `Keep a Changelog <https://keepachangelog.com/>`__. The versioning
13+
scheme for the project adheres to `Semantic Versioning <https://semver.org/>`__.
14+
15+
16+
Unreleased
17+
----------
18+
19+
While this release doesn't warrant a minor version bump, the last release should have
20+
been. Thus, to make up for that, this release will be a minor bump. It includes misc
21+
bug fixes, and several feature adds, the most important of which is the addition of the
22+
``use_context`` hook.
23+
24+
Added:
25+
26+
- Support for keys in HTML fragments - :issue:`682`
27+
28+
**Merged Pull Requests**
29+
30+
- reset schedule_render_later flag after triggering - :pull:`688`
31+
- support keys in HTML fragments - :pull:`683`
32+
- Add Use Context Hook - :pull:`585`
33+
34+
----
35+
36+
Releases below do not use the "Keep a Changelog" style guidelines.
37+
38+
----
939

1040
0.36.3
1141
------
@@ -92,7 +122,7 @@ for elements at the root did not trigger unmounts.
92122
------
93123

94124
As part of :pull:`614`, elements which changed type were not deeply unmounted. This
95-
behavior is probably undesireable though since the state for children of the element
125+
behavior is probably undesirable though since the state for children of the element
96126
in question would persist (probably unexpectedly).
97127

98128
**Pull Requests**
@@ -136,7 +166,7 @@ this marker file.
136166
The highlight of this release is that the default :ref:`"key" <Organizing Items With
137167
Keys>` of all elements will be their index amongst their neighbors. Previously this
138168
behavior could be engaged by setting ``IDOM_FEATURE_INDEX_AS_DEFAULT_KEY=1`` when
139-
running IDOM. In this release though, you will need to explicitely turn off this feature
169+
running IDOM. In this release though, you will need to explicitly turn off this feature
140170
(i.e. ``=0``) to return to the old behavior. With this change, some may notice
141171
additional error logs which warn that:
142172

@@ -200,7 +230,7 @@ event dictionary. As part of this change we also add ``event["currentTarget"]``
200230
0.33.3
201231
------
202232

203-
Contains a small number of bug fixes and improvements. The most signicifact change is
233+
Contains a small number of bug fixes and improvements. The most significant change is
204234
the addition of a warning stating that `IDOM_FEATURE_INDEX_AS_DEFAULT_KEY=1` will become
205235
the default in a future release. Beyond that, a lesser improvement makes it possible to
206236
use the default export from a Javascript module when calling `module_from_template` by
@@ -277,7 +307,7 @@ yet.
277307

278308
- move VdomDict and VdomJson to proto - :pull:`492`
279309
- only send error info in debug mode - :pull:`491`
280-
- correcly apply client-side JSON patch - :pull:`490`
310+
- correctly apply client-side JSON patch - :pull:`490`
281311
- add script to set version of all packages in IDOM - :pull:`483`
282312
- Pass import source to bind - :pull:`482`
283313
- Do not mutate client-side model - :pull:`481`
@@ -339,12 +369,12 @@ The latter behavior is the most egregious design issue since there's absolutely
339369
indication that the component instance can be swapped out (not even a comment).
340370

341371
The new refactor no longer binds component or layout instances to a ``LifeCycleHook``.
342-
Instead, the hook simply receives an unparametrized callback that can be triggered to
372+
Instead, the hook simply receives an un-parametrized callback that can be triggered to
343373
schedule a render. While some error logs lose clarity (since we can't say what component
344374
caused them). This change precludes a need for the layout to ever mutate the hook.
345375

346-
To accomodate this change, the internal representation of the layout's state had to
347-
change. Previsouly, a class-based approach was take, where methods of the state-holding
376+
To accommodate this change, the internal representation of the layout's state had to
377+
change. Previously, a class-based approach was take, where methods of the state-holding
348378
classes were meant to handle all use cases. Now we rely much more heavily on very simple
349379
(and mostly static) data structures that have purpose built constructor functions that
350380
much more narrowly address each use case.
@@ -497,7 +527,7 @@ and breaking changes, the most significant of which are:
497527
- refactor flask - :commit:`94681b6`
498528
- refactor tornado + misc fixes to sanic/fastapi - :commit:`16c9209`
499529
- refactor fastapi using server protocol - :commit:`0cc03ba`
500-
- recactor sanic server - :commit:`43d4b4f`
530+
- refactor sanic server - :commit:`43d4b4f`
501531
- use server protocol instead of inheritance - :commit:`abe0fde`
502532
- support currentTime attr of audio/video elements - :commit:`975b54a`
503533
- pass children as props to mount() - :commit:`9494bc0`
@@ -554,7 +584,7 @@ several bugs that had cropped up related to improper usage of ``anyio``.
554584

555585
**Highlighted Commits:**
556586

557-
- improve docs + simplify multiview - :commit:`4129b60`
587+
- improve docs + simplify multi-view - :commit:`4129b60`
558588
- require anyio>=3.0 - :commit:`24aed28`
559589
- refactor dispatchers - :commit:`ce8e060`
560590

docs/source/developing-idom/contributor-guide.rst renamed to docs/source/about/contributor-guide.rst

Lines changed: 89 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,42 @@
11
Contributor 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

1641
Making 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

45111
Development Environment
46112
-----------------------
@@ -104,19 +170,15 @@ However you may also ``cd`` to the ``src/client`` directory which contains a
104170
Running 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

109175
1. Server-side Python code with PyTest_
110176

111177
2. The end-to-end application using Selenium_ in Python
112178

113179
3. 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

184225
If you need help understanding why code you've submitted does not pass these checks,
185226
then 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>`.
196237
Building 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

227268
Release 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

306296
Creating 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>`__
326316
in 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

332322
Other Core Repositories

docs/source/credits-and-licenses.rst renamed to docs/source/about/credits-and-licenses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ copy language or examples where IDOM's behavior mirrors that of React's.
1212
Source Code License
1313
-------------------
1414

15-
.. literalinclude:: ../../LICENSE
15+
.. literalinclude:: ../../../LICENSE
1616
:language: text

0 commit comments

Comments
 (0)