Skip to content

Commit ea6d332

Browse files
committed
adds versionadded
1 parent 66449d0 commit ea6d332

File tree

7 files changed

+33
-8
lines changed

7 files changed

+33
-8
lines changed

doc/_toc.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ parts:
1313

1414
- caption: API Reference
1515
chapters:
16-
- file: api
16+
- file: api/deprecated
17+
- file: api/telemetry
1718

1819
- caption: Community
1920
chapters:

doc/api.rst

-5
This file was deleted.

doc/api/deprecated.rst

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
``ploomber_core.deprecated``
2+
============================
3+
4+
.. automodule:: ploomber_core.deprecated
5+
:members:

doc/api/telemetry.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``ploomber_core.telemetry``
2+
===========================
3+
4+
.. autoclass:: ploomber_core.telemetry.Telemetry
5+
:members: log_call
6+

doc/deprecation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class SomeClass:
140140
custom_message="Parameters changed from x, y to a, b")
141141
def do_something(self, *args, **kwargs):
142142
return self.do_something_else(*args, **kwargs)
143-
143+
144144
def do_something_else(self, a, b):
145145
return a + b
146146

doc/exceptions.md

+12
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ The `ploomber_core.exceptions` module implements some exceptions that customize
2020

2121
## `PloomberValueError`
2222

23+
```{versionadded} 0.1
24+
Ensure you pin this version in the `setup.py` file (`ploomber-core>=0.1.*`)
25+
```
26+
2327
A subclass of the built-in `ValueError`, use it when the value is unexpected:
2428

2529
```{code-cell} ipython3
@@ -48,6 +52,10 @@ call_person("John")
4852

4953
## `PloomberTypeError`
5054

55+
```{versionadded} 0.1
56+
Ensure you pin this version in the `setup.py` file (`ploomber-core>=0.1.*`)
57+
```
58+
5159
A subclass of the built-in `TypeError`, use it when the type is unexpected:
5260

5361
```{code-cell} ipython3
@@ -76,6 +84,10 @@ add_one("hello")
7684

7785
## `PloomberKeyError`
7886

87+
```{versionadded} 0.1
88+
Ensure you pin this version in the `setup.py` file (`ploomber-core>=0.1.*`)
89+
```
90+
7991
A subclass of the built-in `KeyError`, use it when a key is missing:
8092

8193
```{code-cell} ipython3

src/ploomber_core/deprecated.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ def wrapper(*args, **kwargs):
102102

103103

104104
def method(deprecated_in, removed_in, *, name_new=None, custom_message=None):
105-
"""A decorator for deprecated methods"""
105+
"""A decorator for deprecated methods
106+
107+
Notes
108+
-----
109+
.. versionchanged:: 0.1
110+
Added ``name_new`` and ``custom_message``
111+
"""
106112

107113
def decorator(fn):
108114
@wraps(fn)

0 commit comments

Comments
 (0)