Skip to content

Commit 0f78aae

Browse files
committed
catching up
2 parents 39a7a8f + a89225f commit 0f78aae

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ df.row_by_value('x', 10)
123123

124124
## Registered methods tracing
125125

126-
The pandas_flavor 0.5.0 release introduced [tracing of the registered method calls](/docs/tracing_ext.md). Now it is possible to add additional run-time logic around registered method execution which can be used for some support tasks. This extention was introduced
126+
The pandas_flavor 0.5.0 release introduced [tracing of the registered method calls](/docs/tracing_ext.md). Now it is possible to add additional run-time logic around registered method execution which can be used for some support tasks. This extention was introduced
127127
to allow visualization of [pyjanitor](https://github.com/pyjanitor-devs/pyjanitor) method chains as implemented in [pyjviz](https://github.com/pyjanitor-devs/pyjviz)
128128

129129

docs/tracing_ext.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@ to allow the methods registered via `pandas_flavors` to be traced.
66
Default value of `method_call_ctx_factory` is None.
77

88
Starting version 0.5.0 `pandas_flavor` implements the way to pass registered method name, signature and parameters to
9-
be handled by user-defined object when the call is made. To allow this the user of pandas_flavor must set
9+
be handled by user-defined object when the call is made. To allow this the user of pandas_flavor must set
1010
`method_call_ctx_factory` to refer to function with signature `(method_name: str, method_args: list, method_kwargs: dict) -> tracing_ctx`.
1111
`tracing_ctx` should be class which implements methods with signatures as below:
1212

1313
```python
1414
class tracing_ctx:
1515
def __enter__(self) -> None: pass
1616
def __exit__(self, type, value, traceback): -> None: pass
17-
def handle_start_method_call(self, method_name: str,
17+
def handle_start_method_call(self, method_name: str,
1818
method_signature: inspect.Signature,
1919
method_args: list,
2020
method_kwargs: dict) -> (list, dict): pass
2121
def handle_end_method_call(self, method_ret: object) -> None: pass
2222
```
2323

2424
During method call `pandas_flavor` will create object of class `tracing_ctx` then will use that object to enter *with* code block.
25-
`handle_start_method_call` and `handle_end_method_call` will be called before and after actual method call. The input arguments
25+
`handle_start_method_call` and `handle_end_method_call` will be called before and after actual method call. The input arguments
2626
and return object of actual method call will be passed to corresponding `tracing_ctx` method.
2727

2828
So `handle_start_method_call` and `handle_end_method_call` will have the chance to implement required tracing logic.
29-
Aslo, __exit__ method will be called if any exception would occur. This way it is possible to handle the situation of
29+
Aslo, __exit__ method will be called if any exception would occur. This way it is possible to handle the situation of
3030
actual method ends by raising exception.
3131

3232
The example of tracer class implementation and factory function registration is given in [tracing_ext-demo.py](/docs/tracing_ext-demo.py)

0 commit comments

Comments
 (0)