Skip to content

Commit 699e8c6

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
Expose torchcodec.__version__ attribute (#129)
Summary: Also address a TODO Pull Request resolved: #129 Reviewed By: scotts Differential Revision: D60457436 Pulled By: NicolasHug fbshipit-source-id: 658a68a9d14e727580690efdfb1cf2e9b51c9664
1 parent 13bd5c5 commit 699e8c6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import sys
3131

3232
import pytorch_sphinx_theme
33+
import torchcodec
3334

3435
sys.path.append(os.path.abspath("."))
3536

@@ -97,8 +98,7 @@
9798
#
9899
source_suffix = [".rst"]
99100

100-
# TODO_BEFORE_RELEASE: Indicate version number here
101-
html_title = "TorchCodec Documentation"
101+
html_title = f"TorchCodec {torchcodec.__version__} Documentation"
102102

103103
# The master toctree document.
104104
master_doc = "index"

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
[project]
22
name = "TorchCodec"
3-
version = "0.0.1.dev"
43
description = "A video decoder for PyTorch"
54
readme = "README.md"
65
requires-python = ">=3.8"
76
license = {file = "LICENSE"}
87
authors = [
98
{ name = "PyTorch Team", email = "[email protected]" },
109
]
10+
dynamic = ["version"]
1111

1212
[project.urls]
1313
GitHub = "https://github.com/pytorch/torchcodec"
1414
Documentation = "https://pytorch.org/torchcodec/stable/index.html"
1515

16+
[tool.setuptools.dynamic]
17+
version = {attr = "torchcodec.__version__"}
18+
1619
[build-system]
1720
requires = ["setuptools>=61.0"]
1821
build-backend = "setuptools.build_meta"

src/torchcodec/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
# LICENSE file in the root directory of this source tree.
66

77
from . import decoders # noqa
8+
9+
__version__ = "0.0.1.dev"

0 commit comments

Comments
 (0)