Skip to content

Commit 7621e37

Browse files
authored
Use "backend" instead of "server" (#726)
* rename server to backend * rework docs to use backend instead of server * update import * add changelog entry * fix doctree * fix doc ref * rename to sections to "using a custom ..." * move build dir to _client * improve docstring * misc doc fixes - "server" -> "web server" - "Built-in Backends" -> "Native Backends" - spelling mistakes * more minor doc improvements
1 parent e43bcc0 commit 7621e37

Some content is hidden

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

43 files changed

+154
-135
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# --- Build Artifacts ---
2+
src/idom/_client
3+
14
# --- Jupyter ---
25
*.ipynb_checkpoints
36
*Untitled*.ipynb
@@ -37,6 +40,5 @@ pip-wheel-metadata
3740
.vscode
3841

3942
# --- JS ---
40-
4143
node_modules
42-
src/idom/client
44+

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
recursive-include src/idom/client *
1+
recursive-include src/idom/_client *
22
recursive-include src/idom/web/templates *
33
include src/idom/py.typed

docs/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from sanic import Sanic, response
66

77
from idom import component
8+
from idom.backend.sanic import Options, configure, use_request
89
from idom.core.types import ComponentConstructor
9-
from idom.server.sanic import Options, configure, use_request
1010

1111
from .examples import get_normalized_example_name, load_examples
1212

docs/source/about/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ Changed:
4848

4949
- IDOM's client now uses Preact instead of React - :pull:`721`
5050

51+
- Renamed ``idom.server`` to ``idom.backend`` - :pull:`726`
52+
53+
Other references to "server implementations" have been renamed to "backend
54+
implementations" throughout the documentation and code.
55+
5156
Removed:
5257

5358
- ``redirect_root`` server option - :pull:`721`

docs/source/about/contributor-guide.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ Still aren't sure what you have to offer? Just :discussion-type:`ask us <questio
3232
we'll help you make your first contribution.
3333

3434

35-
.. note::
36-
37-
If you have any questions during set up or development post on our
38-
:discussion-type:`discussion board <question>` and we'll answer them.
39-
40-
4135
Making a Pull Request
4236
---------------------
4337

@@ -53,21 +47,25 @@ about how to get started. To make a change to IDOM you'll do the following:
5347
You use a ``git clone`` command to copy the code from GitHub to your computer.
5448

5549
`Create a new branch <https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging>`__:
56-
You'll ``git checkout -b your-first-branch`` to create a new space to start your work
50+
You'll ``git checkout -b your-first-branch`` to create a new space to start your work.
5751

5852
:ref:`Prepare your Development Environment <Development Environment>`:
59-
We explain in more detail below how to install all IDOM's dependencies
53+
We explain in more detail below how to install all IDOM's dependencies.
6054

6155
`Push your changes <https://docs.github.com/en/github/using-git/pushing-commits-to-a-remote-repository>`__:
6256
Once you've made changes to IDOM, you'll ``git push`` them to your fork.
6357

58+
:ref:`Create a changelog entry <Creating a changelog entry>`:
59+
Record your changes in the :ref:`changelog` so we can publicize them in the next release.
60+
6461
`Create a Pull Request <https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request>`__:
6562
We'll review your changes, run some :ref:`tests <Running The Tests>` and
6663
:ref:`equality checks <Code Quality Checks>` and, with any luck, accept your request.
6764
At that point your contribution will be merged into the main codebase!
6865

66+
6967
Creating a Changelog Entry
70-
..........................
68+
--------------------------
7169

7270
As part of your pull request, you'll want to edit the `Changelog
7371
<https://github.com/idom-team/idom/blob/main/docs/source/about/changelog.rst>`__ by
@@ -112,6 +110,11 @@ might look like:
112110
Development Environment
113111
-----------------------
114112

113+
.. note::
114+
115+
If you have any questions during set up or development post on our
116+
:discussion-type:`discussion board <question>` and we'll answer them.
117+
115118
In order to develop IDOM locally you'll first need to install the following:
116119

117120
.. list-table::
@@ -120,7 +123,7 @@ In order to develop IDOM locally you'll first need to install the following:
120123
* - What to Install
121124
- How to Install
122125

123-
* - Git_
126+
* - Git
124127
- https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
125128

126129
* - Python >= 3.7

docs/source/guides/adding-interactivity/components-with-state/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ does not work:
2222

2323
Try clicking the button to see that it does not cause a change.
2424

25-
After clicking "Next", if you check the server logs, you'll discover an
25+
After clicking "Next", if you check your web server's logs, you'll discover an
2626
``UnboundLocalError`` error. It turns out that in this case, the ``index = index + 1``
2727
statement is similar to `trying to set global variables
2828
<https://stackoverflow.com/questions/9264763/dont-understand-why-unboundlocalerror-occurs-closure>`__.

docs/source/guides/adding-interactivity/responding-to-events/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Event Data Serialization
100100

101101
Not all event data is serialized. The most notable example of this is the lack of a
102102
``target`` key in the dictionary sent back to the handler. Instead, data which is not
103-
inherhently JSON serializable must be treated on a case-by-case basis. A simple case
103+
inherently JSON serializable must be treated on a case-by-case basis. A simple case
104104
to demonstrate this is the ``currentTime`` attribute of ``audio`` and ``video``
105105
elements. Normally this would be accessible via ``event.target.currentTime``, but here
106106
it's simply passed in under the key ``currentTime``:

docs/source/guides/creating-interfaces/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ conditionally display more complex UIs.
4545
Section 1: HTML with IDOM
4646
-------------------------
4747

48-
In a typical Python-base web application the resonsibility of defining the view along
48+
In a typical Python-base web application the responsibility of defining the view along
4949
with its backing data and logic are distributed between a client and server
5050
respectively. With IDOM, both these tasks are centralized in a single place. The most
5151
foundational pilar of this capability is formed by allowing HTML interfaces to be
@@ -112,7 +112,7 @@ Section 3: Rendering Data
112112
The last pillar of knowledge you need before you can start making :ref:`interactive
113113
interfaces <adding interactivity>` is the ability to render sections of the UI given a
114114
collection of data. This will require you to understand how elements which are derived
115-
from data in this way must be orgnized with :ref:`"keys" <Organizing Items With Keys>`.
115+
from data in this way must be organized with :ref:`"keys" <Organizing Items With Keys>`.
116116
One case where we might want to do this is if items in a todo list come from a list of
117117
data that we want to sort and filter:
118118

docs/source/guides/escape-hatches/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Escape Hatches
66

77
javascript-components
88
distributing-javascript
9-
writing-your-own-server
10-
writing-your-own-client
9+
using-a-custom-backend
10+
using-a-custom-client
1111

1212
.. note::
1313

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. _Writing Your Own Backend:
2+
.. _Using a Custom Backend:
3+
4+
Using a Custom Backend 🚧
5+
=========================
6+
7+
.. note::
8+
9+
Under construction 🚧

0 commit comments

Comments
 (0)