Skip to content

Commit

Permalink
Add __version__ (#103)
Browse files Browse the repository at this point in the history
Add __version__ to kor public interface
  • Loading branch information
eyurtsev authored Apr 1, 2023
1 parent 838f957 commit eb35feb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
TypeDescriptor,
TypeScriptDescriptor,
)
from .version import __version__

__all__ = (
"BulletPointDescriptor",
Expand All @@ -22,4 +23,5 @@
"TypeDescriptor",
"TypeScriptDescriptor",
"XMLEncoder",
"__version__",
)
7 changes: 7 additions & 0 deletions kor/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Get the version of the package."""
from importlib import metadata

try:
__version__ = metadata.version("kor")
except metadata.PackageNotFoundError:
__version__ = "local"
1 change: 1 addition & 0 deletions tests/test_public_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def test_kor__all__() -> None:
"TypeDescriptor",
"TypeScriptDescriptor",
"XMLEncoder",
"__version__",
"create_extraction_chain",
"from_pydantic",
]

0 comments on commit eb35feb

Please sign in to comment.