Skip to content

Commit b746710

Browse files
authored
Add svg for profiling tasks. (#259)
1 parent 9cd69f6 commit b746710

File tree

4 files changed

+159
-2
lines changed

4 files changed

+159
-2
lines changed
Lines changed: 141 additions & 0 deletions
Loading

docs/source/changes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ chronological order. Releases follow [semantic versioning](https://semver.org/)
55
releases are available on [PyPI](https://pypi.org/project/pytask) and
66
[Anaconda.org](https://anaconda.org/conda-forge/pytask).
77

8-
## 0.2.0 - 2022-xx-xx
8+
## 0.2.1 - 2022-xx-xx
9+
10+
- {pull}`259` adds an `.svg` for profiling tasks.
11+
12+
## 0.2.0 - 2022-04-14
913

1014
- {pull}`211` allows for flexible dependencies and products which can be any pytree of
1115
native Python objects as supported by pybaum.

docs/source/tutorials/profiling_tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ $ pytask profile
99

1010
Here is an example
1111

12-
```{image} /_static/images/pytask-profile.png
12+
```{image} /_static/images/profile.svg
1313
```

scripts/svgs/profile.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from __future__ import annotations
2+
3+
import pytask
4+
from click.testing import CliRunner
5+
6+
7+
if __name__ == "__main__":
8+
runner = CliRunner()
9+
10+
pytask.console.record = True
11+
runner.invoke(pytask.cli, ["profile"])
12+
pytask.console.save_svg("profile.svg", title="pytask")

0 commit comments

Comments
 (0)