@@ -9,8 +9,8 @@ Developer Guide
9
9
10
10
This project uses the `GitHub Flow `_ (more detail :ref: `below <Making a Pull Request >`)
11
11
for collaboration and consists primarily 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 :
12
+ of tools are used to aid in its development. Below is a brief list of the most commonly
13
+ used tools :
14
14
15
15
.. list-table ::
16
16
:header-rows: 1
@@ -75,16 +75,38 @@ about how to get started. To make a change to IDOM you'll do the following:
75
75
Development Environment
76
76
-----------------------
77
77
78
- If you've already :ref:
79
- In order to work with IDOM's source code you'll need to install Git _ (or `Git Bash `_ on
80
- Windows). Once done you can clone a local copy of this repository:
78
+ In order to develop IDOM locally you'll first need to install the following:
79
+
80
+ .. list-table ::
81
+ :header-rows: 1
82
+
83
+ * - What to Install
84
+ - How to Install
85
+
86
+ * - Git _
87
+ - https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
88
+
89
+ * - Python _ >= 3.7
90
+ - https://realpython.com/installing-python/
91
+
92
+ * - NodeJS >= 14
93
+ - https://nodejs.org/en/download/package-manager/
94
+
95
+ * - NPM >= 7.7
96
+ - https://docs.npmjs.com/try-the-latest-stable-version-of-npm
97
+
98
+ .. note ::
99
+
100
+ NodeJS distributes a version of NPM, but you'll want to get the latest
101
+
102
+ Once done, you can clone a local copy of this repository:
81
103
82
104
.. code-block :: bash
83
105
84
106
git clone https://github.com/idom-team/idom.git
85
107
cd idom
86
108
87
- At this point you should be able to run the command below to:
109
+ Then, you should be able to run the command below to:
88
110
89
111
- Install an editable version of the Python code
90
112
@@ -102,20 +124,26 @@ If you modify any Javascript, you'll need to re-install IDOM:
102
124
103
125
pip install -e .
104
126
105
- However you may also ``cd `` to the ``idom/client/app `` directory which contains a
127
+ However you may also ``cd `` to the ``src/ idom/client/app `` directory which contains a
106
128
``package.json `` that you can use to run standard ``npm `` commands from.
107
129
108
130
109
131
Running The Tests
110
132
-----------------
111
133
112
- The test suite for IDOM is executed using Nox _ and covers :
134
+ The test suite for IDOM uses Nox _ and NPM _ in order to validate :
113
135
114
136
1. Server-side Python code with PyTest _
115
137
116
- 2. The end-to-end application using Selenium _
138
+ 2. The end-to-end application using Selenium _ in Python
139
+
140
+ 3. Client-side Javascript code with UVU _
141
+
117
142
118
- To run the full suite of tests you'll need to install:
143
+ Running Python Tests
144
+ ....................
145
+
146
+ To run the full suite of Python tests you'll need to install:
119
147
120
148
- `Google Chrome `_
121
149
@@ -145,6 +173,21 @@ You can pass other options to pytest in a similar manner:
145
173
nox -s test -- pytest[arg,--flag,--key= value]
146
174
147
175
176
+ Running Javascript Tests
177
+ ........................
178
+
179
+ If you've already run ``npm install `` inside the ``src/idom/client/app `` directory, you
180
+ can execute the suite of workspace tests under ``packages/* `` with:
181
+
182
+ .. code-block ::
183
+
184
+ npm test
185
+
186
+ As a final check, you might want to run ``npm run build ``. This command is run in the
187
+ top-level ``setup.py `` installation script for the Python package, so if this command
188
+ fails, the installation of the Python package with ``pip `` will too.
189
+
190
+
148
191
Code Quality Checks
149
192
-------------------
150
193
@@ -247,3 +290,4 @@ to their respective documentation in the links below
247
290
.. _Black : https://github.com/psf/black
248
291
.. _Flake8 : https://flake8.pycqa.org/en/latest/
249
292
.. _ISort : https://pycqa.github.io/isort/
293
+ .. _UVU : https://github.com/lukeed/uvu
0 commit comments