Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit 8d0100b

Browse files
committed
scripts: docs: Make it so numpy docstrings work
Signed-off-by: John Andersen <[email protected]>
1 parent 93ab9f7 commit 8d0100b

File tree

9 files changed

+42
-42
lines changed

9 files changed

+42
-42
lines changed

dffml/operation/dataflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ class run_dataflow(OperationImplementationContext):
4343
Starts a subflow ``self.config.dataflow`` and adds ``inputs`` in it.
4444
4545
Parameters
46-
++++++++++
46+
----------
4747
inputs : dict
4848
The inputs to add to the subflow. These should be a key value mapping of
4949
the context string to the inputs which should be seeded for that context
5050
string.
5151
5252
Returns
53-
+++++++
53+
-------
5454
dict
5555
Maps context strings in inputs to output after running through dataflow.
5656
5757
Examples
58-
++++++++
58+
--------
5959
6060
The following shows how to use run dataflow in its default behavior.
6161

dffml/operation/db.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ async def db_query_create_table(
8484
Generates a create table query in the database.
8585
8686
Parameters
87-
++++++++++
87+
----------
8888
table_name : str
8989
The name of the table to be created.
9090
cols : list[str]
9191
Columns of the table.
9292
9393
Examples
94-
++++++++
94+
--------
9595
9696
>>> import asyncio
9797
>>> from dffml import *
@@ -141,14 +141,14 @@ async def db_query_insert(self, *, table_name: str, data: Dict[str, Any]):
141141
Generates an insert query in the database.
142142
143143
Parameters
144-
++++++++++
144+
----------
145145
table_name : str
146146
The name of the table to insert data in to.
147147
data : dict
148148
Data to be inserted into the table.
149149
150150
Examples
151-
++++++++
151+
--------
152152
153153
>>> import asyncio
154154
>>> from dffml import *
@@ -223,7 +223,7 @@ async def db_query_update(
223223
Generates an Update table query in the database.
224224
225225
Parameters
226-
++++++++++
226+
----------
227227
table_name : str
228228
The name of the table to insert data in to.
229229
data : dict
@@ -232,7 +232,7 @@ async def db_query_update(
232232
List of query conditions.
233233
234234
Examples
235-
++++++++
235+
--------
236236
237237
>>> import asyncio
238238
>>> from dffml import *
@@ -313,14 +313,14 @@ async def db_query_remove(
313313
Generates a remove table query in the database.
314314
315315
Parameters
316-
++++++++++
316+
----------
317317
table_name : str
318318
The name of the table to insert data in to.
319319
conditions : Conditions
320320
Query conditions.
321321
322322
Examples
323-
++++++++
323+
--------
324324
325325
>>> import asyncio
326326
>>> from dffml import *
@@ -395,7 +395,7 @@ async def db_query_lookup(
395395
Generates a lookup query in the database.
396396
397397
Parameters
398-
++++++++++
398+
----------
399399
table_name : str
400400
The name of the table.
401401
cols : list[str]
@@ -404,7 +404,7 @@ async def db_query_lookup(
404404
Query conditions.
405405
406406
Examples
407-
++++++++
407+
--------
408408
409409
>>> import asyncio
410410
>>> from dffml import *
@@ -466,14 +466,14 @@ async def db_query_insert_or_update(
466466
Automatically uses the better suited operation, insert query or update query.
467467
468468
Parameters
469-
++++++++++
469+
----------
470470
table_name : str
471471
The name of the table to insert data in to.
472472
data : dict
473473
Data to be inserted or updated into the table.
474474
475475
Examples
476-
++++++++
476+
--------
477477
478478
>>> import asyncio
479479
>>> from dffml import *

dffml/operation/io.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ class AcceptUserInput(OperationImplementation):
4040
Accept input from stdin using python input()
4141
4242
Returns
43-
+++++++
43+
-------
4444
dict
4545
A dictionary containing user input.
4646
4747
Examples
48-
++++++++
48+
--------
4949
5050
The following example shows how to use AcceptUserInput.
5151
(Assumes that the input from stdio is "Data flow is awesome"!)
@@ -97,12 +97,12 @@ async def print_output(data: Any):
9797
Print the output on stdout using python print()
9898
9999
Parameters
100-
++++++++++
100+
----------
101101
data : Any
102102
A python literal to be printed.
103103
104104
Examples
105-
++++++++
105+
--------
106106
107107
The following example shows how to use print_output.
108108

dffml/operation/mapping.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ def mapping_extract_value(mapping: Dict[str, Any], traverse: List[str]):
2020
Extracts value from a given mapping.
2121
2222
Parameters
23-
++++++++++
23+
----------
2424
mapping : dict
2525
The mapping to extract the value from.
2626
traverse : list[str]
2727
A list of keys to traverse through the mapping dictionary and extract the values.
2828
2929
Returns
30-
+++++++
30+
-------
3131
dict
3232
A dictionary containing the value of the keys.
3333
3434
Examples
35-
++++++++
35+
--------
3636
3737
>>> import asyncio
3838
>>> from dffml import *
@@ -76,19 +76,19 @@ def create_mapping(key: str, value: Any):
7676
Creates a mapping of a given key and value.
7777
7878
Parameters
79-
++++++++++
79+
----------
8080
key : str
8181
The key for the mapping.
8282
value : Any
8383
The value for the mapping.
8484
8585
Returns
86-
+++++++
86+
-------
8787
dict
8888
A dictionary containing the mapping created.
8989
9090
Examples
91-
++++++++
91+
--------
9292
9393
>>> import asyncio
9494
>>> from dffml import *

dffml/operation/math.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ async def multiply(multiplicand, multiplier):
1717
Multiply record values
1818
1919
Parameters
20-
++++++++++
20+
----------
2121
multiplicand : generic
2222
An arithmetic type value.
2323
multiplier : generic
2424
An arithmetic type value.
2525
2626
Returns
27-
+++++++
27+
-------
2828
dict
2929
A dict containing the product.
3030
3131
Examples
32-
++++++++
32+
--------
3333
3434
The following example shows how to use multiply.
3535

dffml/operation/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ async def model_predict(self, features: Dict[str, Any]) -> Dict[str, Any]:
4141
Predict using dffml models.
4242
4343
Parameters
44-
++++++++++
44+
----------
4545
features : dict
4646
A dictionary contaning feature name and feature value.
4747
4848
Returns
49-
+++++++
49+
-------
5050
dict
5151
A dictionary containing prediction.
5252
5353
Examples
54-
++++++++
54+
--------
5555
5656
The following example shows how to use model_predict.
5757

dffml/operation/output.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,18 @@ class GetMulti(OperationImplementationContext):
118118
Output operation to get all Inputs matching given definitions.
119119
120120
Parameters
121-
++++++++++
121+
----------
122122
spec : list
123123
List of definition names. Any Inputs with matching definition will be
124124
returned.
125125
126126
Returns
127-
+++++++
127+
-------
128128
dict
129129
Maps definition names to all the Inputs of that definition
130130
131131
Examples
132-
++++++++
132+
--------
133133
134134
The following shows how to grab all Inputs with the URL definition. If we
135135
had we run an operation which output a URL, that output URL would have also
@@ -216,18 +216,18 @@ class GetSingle(GetMulti):
216216
Output operation to get a single Input for each definition given.
217217
218218
Parameters
219-
++++++++++
219+
----------
220220
spec : list
221221
List of definition names. An Input with matching definition will be
222222
returned.
223223
224224
Returns
225-
+++++++
225+
-------
226226
dict
227227
Maps definition names to an Input of that definition
228228
229229
Examples
230-
++++++++
230+
--------
231231
232232
The following shows how to grab an Inputs with the URL definition. If we
233233
had we run an operation which output a URL, that output URL could have also
@@ -322,7 +322,7 @@ async def run(self, inputs: Dict[str, Any]) -> Dict[str, Any]:
322322
class AssociateDefinition(OperationImplementationContext):
323323
"""
324324
Examples
325-
++++++++
325+
--------
326326
327327
>>> import asyncio
328328
>>> from dffml import *

dffml/operation/preprocess.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ async def literal_eval(str_to_eval: str):
1919
Evaluate the input using ast.literal_eval()
2020
2121
Parameters
22-
++++++++++
22+
----------
2323
str_to_eval : str
2424
A string to be evaluated.
2525
2626
Returns
27-
+++++++
27+
-------
2828
dict
2929
A dict containing python literal.
3030
3131
Examples
32-
++++++++
32+
--------
3333
3434
The following example shows how to use literal_eval.
3535

scripts/docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def gen_docs(
203203
"tag": f".. _plugin_{plugin_type}_{name}:",
204204
"name": name,
205205
"install": name.replace("_", "-"),
206-
"underline": "-" * len(name),
206+
"underline": "+" * len(name),
207207
}
208208
)
209209
+ (

0 commit comments

Comments
 (0)