Skip to content

Commit fa5f554

Browse files
balogh.adam@icloud.combalogh.adam@icloud.com
authored andcommitted
project version in docs
1 parent 9d5660b commit fa5f554

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

docs/opengradient/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ outline: [2,3]
66

77
# Package opengradient
88

9+
**Version: 0.6.0**
10+
911
OpenGradient Python SDK for interacting with AI models and infrastructure.
1012

1113
## Submodules

templates/text.mako

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ outline: [2,3]
88
import re
99
import textwrap
1010
import inspect
11+
import tomllib
12+
13+
with open('pyproject.toml', 'rb') as _f:
14+
_project_version = tomllib.load(_f)['project']['version']
1115
1216
def convert_to_sentence(text):
1317
# First, handle snake_case by replacing underscores with spaces
@@ -215,6 +219,10 @@ ${show_func(f, qual)}
215219
## 'Module'} <code>${module.name}</code></h1>
216220
217221
${header('Package ' + module.name, 1)}
222+
% if not module.supermodule:
223+
224+
**Version: ${_project_version}**
225+
% endif
218226
219227
${module.docstring}
220228

0 commit comments

Comments
 (0)