Skip to content

Commit

Permalink
Retrieve the version number at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
lapp0 authored and rlouf committed Oct 9, 2024
1 parent cf63eb5 commit b755e4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ ignore_missing_imports = true
[tool.coverage.run]
omit = [
"python/outlines_core/_version.py",
"python/outlines_core/__init__.py",
"tests/*",
]
branch = true
Expand Down
8 changes: 8 additions & 0 deletions python/outlines_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
"""Outlines is a Generative Model Programming Framework."""
from importlib.metadata import PackageNotFoundError, version

import outlines_core.models

try:
__version__ = version("outlines_core")
except PackageNotFoundError:
pass


__all__ = ["models"]

0 comments on commit b755e4d

Please sign in to comment.