@@ -83,7 +83,7 @@ GitHub repository file and directory layout:
8383
8484 - \* .py, \* .rst - Python scripts (linked to ../examples/\* .py)
8585
86- - \* .ipynb - Jupytern notebooks (linked to ../examples.ipynb)
86+ - \* .ipynb - Jupyter notebooks (linked to ../examples.ipynb)
8787
8888 + **figures/ **
8989
@@ -93,20 +93,23 @@ GitHub repository file and directory layout:
9393
9494 + \* .py - Python scripts
9595
96- + \* .ipynb - Jupytern notebooks
96+ + \* .ipynb - Jupyter notebooks
9797
9898
9999Naming conventions
100100==================
101101
102102Generally speaking, standard Python and NumPy naming conventions are
103- used through the package.
103+ used throughout the package.
104+
105+ * Python PEP 8 (code style): https://peps.python.org/pep-0008/
104106
105107
106108Filenames
107109---------
108110
109- * Source files are lower case, usually less than 10 characters
111+ * Source files are lower case, usually less than 10 characters (and 8
112+ or less is better).
110113
111114* Unit tests (in `control/tests/ `) are of the form `module_test.py ` or
112115 `module_function.py `.
@@ -116,40 +119,40 @@ Class names
116119-----------
117120
118121* Most class names are in camel case, with long form descriptions of
119- the contents (`TimeResponseData `).
122+ the object purpose/ contents (`TimeResponseData `).
120123
121- * Input/output class names are written out as long as they aren't too
122- long (`StateSpace `, `TransferFunciton `), but for very long names
124+ * Input/output class names are written out in long form as they aren't
125+ too long (`StateSpace `, `TransferFunction `), but for very long names
123126 'IO' can be used in place of 'InputOutput' (`NonlinearIOSystem `) and
124127 'IC' can be used in place of 'Interconnected' (`LinearICSystem `).
125128
126- * Some older classes don't follow these guidlines (e.g., `LTI ` instead
127- of `LinearTimeInvariantSystem `).
129+ * Some older classes don't follow these guidelines (e.g., `LTI ` instead
130+ of `LinearTimeInvariantSystem ` or ` LTISystem ` ).
128131
129132
130133Function names
131134--------------
132135
133136* Function names are lower case with words separated by underscores.
134137
135- * Function names usuall describe what they do
138+ * Function names usually describe what they do
136139 (`create_statefbk_iosys `, `find_operating_points `) or what they
137140 generate (`input_output_response `, `find_operating_point `).
138141
139- * Some abbreviations and shorted versions are used when names get very
140- long (e.g., `create_statefbk_iosys ` instead of
142+ * Some abbreviations and shortened versions are used when names get
143+ very long (e.g., `create_statefbk_iosys ` instead of
141144 `create_state_feedback_input_output_system `.
142145
143146* Factory functions for I/O systems use short names (partly from MATLAB
144- conventions, partly because they are pretty frequenctly used):
147+ conventions, partly because they are pretty frequently used):
145148 `frd `, `flatsys `, `nlsys `, `ss `, and `tf `.
146149
147- * Short versions of common commands are created by creating an object
148- with the shorter name as a copy of the main object: ` bode =
149- bode_plot `, `step = step_response `, etc.
150+ * Short versions of common commands with longer names are created by
151+ creating an object with the shorter name as a copy of the main
152+ object: ` bode = bode_plot `, `step = step_response `, etc.
150153
151154* The MATLAB compatibility library (`control.matlab `) uses names that
152- line up with MATLAB (e.g., `lsim ` instead of `forced_response `).
155+ try to line up with MATLAB (e.g., `lsim ` instead of `forced_response `).
153156
154157
155158Parameter names
@@ -163,7 +166,7 @@ general patterns are emerging:
163166 `optimal.solve_ocp ` (which probably should be named
164167 `optimal.`find_optimal_trajectory`...).
165168
166- System creating commands:
169+ System- creating commands:
167170
168171* Commands that create an I/O system should allow the use of the
169172 following standard parameters:
@@ -172,10 +175,16 @@ System creating commands:
172175
173176 - `inputs `, `outputs `, `states `: number or names of inputs, outputs, state
174177
175- These can be parsed in a consistent way using the
176- ` iosys._process_iosys_keywords ` function .
178+ - ` input_prefix `, ` output_prefix `, ` state_prefix `: change the default
179+ prefixes used for naming signals .
177180
178- * Commands
181+ - `dt `: set the timebase. This one takes a bit of care, since if it
182+ is not specified then it defaults to
183+ `config.defaults['control.default_dt'] `. This is different than
184+ setting `dt=None `, so you `dt ` should always be part of **kwargs.
185+
186+ These keywords can be parsed in a consistent way using the
187+ `iosys._process_iosys_keywords ` function.
179188
180189System arguments:
181190
@@ -185,8 +194,10 @@ System arguments:
185194 `interconnect `). A single system should also be OK.
186195
187196* `sysdata ` when an argument can either be a system, a list of
188- systems ,or data describing a response (e.g,
189- `nyquist_response `).
197+ systems, or data describing a response (e.g, `nyquist_response `).
198+
199+ .. todo :: For a future release (v 0.11.x?) we should make this more
200+ consistent across the package.
190201
191202Signal arguments:
192203
@@ -206,6 +217,12 @@ can be incorporated into the User Guide. All significant
206217functionality should have a narrative description in the User Guide in
207218addition to docstrings.
208219
220+ Generally speaking, standard Python and NumPy documentation
221+ conventions are used throughout the package:
222+
223+ * Python PEP 257 (docstrings): https://peps.python.org/pep-0257/
224+ * Numpydoc Style guide: https://numpydoc.readthedocs.io/en/latest/format.html
225+
209226
210227General docstring info
211228----------------------
@@ -223,13 +240,13 @@ General docstring info
223240Function docstrings
224241-------------------
225242
226- Follow NumPyDoc format with the following additional detals :
243+ Follow numpydoc format with the following additional details :
227244
228245* All functions should have a short (< 64 character) summary line that
229246 starts with a capital letter and ends with a period.
230247
231- * All paramter descriptions should start with a capital letter and end
232- with a period. An exception is paramters that have a list of
248+ * All parameter descriptions should start with a capital letter and end
249+ with a period. An exception is parameters that have a list of
233250 possible values, in which case a phrase sending in `: ` followed by a
234251 list (without punctuation) is OK.
235252
@@ -245,9 +262,9 @@ Follow NumPyDoc format with the following additional detals:
245262Class docstrings
246263----------------
247264
248- Follow NumpyDoc format with the follow additional details:
265+ Follow numpydoc format with the follow additional details:
249266
250- * Paramaters used in creating an object go in the class docstring and
267+ * Parameters used in creating an object go in the class docstring and
251268 not in the `__init__ ` docstring (which is not included in the
252269 Sphinx-based documentation). OK for the `__init__ ` function to have
253270 no docstring.
@@ -269,20 +286,42 @@ Follow NumpyDoc format with the follow additional details:
269286I/O system classes:
270287
271288* Subclasses of `InputOutputSystem ` should always have a factory
272- function that is used ot create them. The class documentation only
273- needs to documen the required parameters; the full list of
289+ function that is used to create them. The class documentation only
290+ needs to document the required parameters; the full list of
274291 parameters (and optional keywords) can and should be documented in
275292 the factory function docstring.
276293
277294
278- Sphinx documentation:
295+ User Guide
296+ ----------
297+
298+ The purpose of the User Guide is provide a *narrative * description of
299+ the key functions of the package. It is not expected to cover every
300+ command, but should allow someone who knows about control system
301+ design to get up and running quickly.
302+
303+ The User Guide consists of chapters that are each their own separate
304+ `.rst ` file and each of them generates a separate page. Chapters are
305+ divided into sections whose names appear in the indexo on the left of
306+ the web page when that chapter is being viewed. In some cases a
307+ section may be in its own file, including in the chapter page by using
308+ the `include ` directive (see `nlsys.py ` for an example).
309+
310+ Sphinx files guidlines:
279311
280312* Each file should declare the `currentmodule ` at or near the top of
281- the file. Excpt for sub-packages (`control.flatsys `) and modules
282- that need to be impored separatly (`control.optimal `),
313+ the file. Except for sub-packages (`control.flatsys `) and modules
314+ that need to be imported separately (`control.optimal `),
283315 `currentmodule ` should be set to control.
284316
285317
318+ Reference Manual
319+ ----------------
320+
321+ The reference manual should provide a fairly comprehensive description
322+ of every class, function and configuration variable in the package.
323+
324+
286325Utility functions
287326=================
288327
0 commit comments