Skip to content

Commit 0d020ba

Browse files
committed
docs: update API documentation structure
- Install mkdocstrings-python for richer API docs generation - Update zensical dependency version in pyproject.toml - Reorganize docs navigation to include dedicated API section - Fix broken internal links by updating reference paths from /api/index.md# to /api/# - Add Python handler configuration for mkdocstrings in zensical.toml Closes #52
1 parent 30639a9 commit 0d020ba

13 files changed

Lines changed: 339 additions & 32 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/setup-python@v5
2222
with:
2323
python-version: 3.x
24-
- run: pip install zensical
24+
- run: pip install zensical mkdocstrings-python
2525
- run: zensical build --clean
2626
- uses: actions/upload-pages-artifact@v4
2727
with:

docs/api/index.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# API
22

33
::: plotfig.bar
4-
options:
5-
members:
6-
- plot_one_group_bar_figure
7-
- plot_one_group_violin_figure
8-
- plot_multi_group_bar_figure
94

105
::: plotfig.correlation
116

docs/usage/brain_connectivity.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
透明的大脑图,可以展示脑区间的连接关系。
44
需要准备左右半脑的surface文件、脑区相关的nii.gz文件以及连接矩阵。
55

6+
## 快速出图
7+
8+
全部参数见 [`plot_brain_connection_figure`](../api/#plotfig.brain_connection.plot_brain_connection_figure) 的 API 文档。
69

710
```python
811
from plotfig import plot_brain_connection_figure, gen_symmetric_matrix

docs/usage/brain_surface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ ax6 = plot_brain_surface_figure(plot_data, species="macaque", atlas="charm5", su
163163

164164
## 更多设置
165165

166-
全部参数见 [`plot_brain_surface_figure`](../api/index.md/#plotfig.brain_surface.plot_brain_surface_figure) 的 API 文档。
166+
全部参数见 [`plot_brain_surface_figure`](../api/#plotfig.brain_surface.plot_brain_surface_figure) 的 API 文档。
167167

168168

169169
```python

docs/usage/circos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fig = plot_circos_figure(connectome)
2828

2929
## 参数设置
3030

31-
全部参数见[`plot_circos_figure`](../api/index.md/#plotfig.circos.plot_circos_figure)的 API 文档。
31+
全部参数见[`plot_circos_figure`](../api/#plotfig.circos.plot_circos_figure)的 API 文档。
3232

3333

3434
```python

docs/usage/correlation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ cb = fig.colorbar(hb, ax=ax2, label='counts')
7373

7474
## 参数设置
7575

76-
全部参数见[`plot_correlation_figure`](../api/index.md/#plotfig.correlation)的 API 文档。
76+
全部参数见[`plot_correlation_figure`](../api/#plotfig.correlation)的 API 文档。
7777

7878

7979
```python

docs/usage/matrix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ax = plot_matrix_figure(data)
2727

2828
## 参数设置
2929

30-
全部参数见[`plot_matrix_figure`](../api/index.md/#plotfig.matrix.plot_matrix_figure)的 API 文档。
30+
全部参数见[`plot_matrix_figure`](../api/#plotfig.matrix.plot_matrix_figure)的 API 文档。
3131

3232

3333
```python

docs/usage/multi_groups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ax = plot_multi_group_bar_figure([[group1_bar1, group1_bar2, group1_bar3], [grou
4141
与单组柱状图类似,多组柱状图也提供了大量可调节的参数,用于灵活控制图像的外观。
4242
本节仅展示其中的一部分参数。
4343

44-
完整参数列表请参见 [`plot_multi_group_bar_figure`](../api/index.md/#plotfig.bar.plot_multi_group_bar_figure) 的 API 文档。
44+
完整参数列表请参见 [`plot_multi_group_bar_figure`](../api/#plotfig.bar.plot_multi_group_bar_figure) 的 API 文档。
4545

4646

4747
```python

docs/usage/single_group.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ ax4 = plot_one_group_bar_figure([ax4_bar1, ax4_bar2], ax=axes[1,1], labels_name=
9797
`plotfig` 提供了丰富的选项用于自定义图形样式。
9898
下面展示的是 `plot_one_group_bar_figure` 函数中部分常用参数的示例用法。
9999

100-
完整参数说明请参阅 [`plot_one_group_bar_figure`](../api/index.md/#plotfig.bar.plot_one_group_bar_figure) 的 API 文档。
100+
完整参数说明请参阅 [`plot_one_group_bar_figure`](../api/#plotfig.bar.plot_one_group_bar_figure) 的 API 文档。
101101

102102

103103
```python
@@ -641,7 +641,7 @@ ax = plot_one_group_bar_figure(
641641
在 plotfig 中,绘制小提琴图的函数名为 `plot_one_group_violin_figure`
642642
其大部分参数与 `plot_one_group_bar_figure` 相似,以下是部分演示。
643643

644-
完整参数说明请参阅 [`plot_one_group_violin_figure`](../api/index.md/#plotfig.bar.plot_one_group_violin_figure) 的 API 文档。
644+
完整参数说明请参阅 [`plot_one_group_violin_figure`](../api/#plotfig.bar.plot_one_group_violin_figure) 的 API 文档。
645645

646646

647647
```python

notebooks/brain_connectivity.ipynb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,22 @@
2121
"需要准备左右半脑的surface文件、脑区相关的nii.gz文件以及连接矩阵。"
2222
]
2323
},
24+
{
25+
"cell_type": "markdown",
26+
"id": "50276954",
27+
"metadata": {},
28+
"source": [
29+
"## 快速出图"
30+
]
31+
},
32+
{
33+
"cell_type": "markdown",
34+
"id": "c80ec6bc",
35+
"metadata": {},
36+
"source": [
37+
"全部参数见 [`plot_brain_connection_figure`](../api/#plotfig.brain_connection.plot_brain_connection_figure) 的 API 文档。"
38+
]
39+
},
2440
{
2541
"cell_type": "code",
2642
"execution_count": null,

0 commit comments

Comments
 (0)