Skip to content

Commit 1079c1f

Browse files
committed
doc(autog) generate API for (underdoced) Autograph
1 parent a707512 commit 1079c1f

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

docs/source/reference.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ API Reference
66

77
graphtik
88
graphtik.fnop
9+
graphtik.autograph
910
graphtik.pipeline
1011
graphtik.modifier
1112
graphtik.planning
@@ -37,6 +38,12 @@ Module: `fnop`
3738
:private-members:
3839
:special-members:
3940

41+
.. automodule:: graphtik.autograph
42+
:members:
43+
:undoc-members:
44+
:private-members:
45+
:special-members:
46+
4047
Module: `pipeline`
4148
==================
4249

graphtik/autograph.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ class Autograph(Prefkey):
399399
400400
**Example:**
401401
402+
>>> from graphtik.autograph import *
403+
>>> from graphtik import keyword
402404
>>> def calc_sum_ab(a, b=0):
403405
... return a + b
404406
@@ -407,7 +409,7 @@ class Autograph(Prefkey):
407409
... overrides={
408410
... "autographed": {"needs": [keyword("fn", "other_fn"), ...]},
409411
... })
410-
>>> aug.wrap_funcs([autographed, get_autograph_decors, is_regular_class])
412+
>>> aug.wrap_funcs([autographed, get_autograph_decors, is_regular_class, FnHarvester])
411413
[FnOp(name='autographed',
412414
needs=['fn'(>'other_fn'),
413415
'name'(?),
@@ -427,7 +429,15 @@ class Autograph(Prefkey):
427429
fn='get_autograph_decors'),
428430
FnOp(name='is_regular_class',
429431
needs=['name', 'item'],
430-
fn='is_regular_class')]
432+
fn='is_regular_class'),
433+
FnOp(name='FnHarvester',
434+
needs=['excludes'(?),
435+
'base_modules'(?),
436+
'predicate'(?),
437+
'include_methods'(?),
438+
'sep'(?)],
439+
provides=['fn_harvester'],
440+
fn='FnHarvester')]
431441
432442
.. hint::
433443
Notice the use of triple-dot(``...``) to indicate that the rest of the

0 commit comments

Comments
 (0)