Skip to content

Commit

Permalink
Add curated_transformers.__version__ and use it for doc generation (#357
Browse files Browse the repository at this point in the history
)
  • Loading branch information
danieldk committed Dec 1, 2023
1 parent 7a436e0 commit 23f3a1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions curated_transformers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import importlib.metadata

import catalogue
from catalogue import Registry

__version__: str
try:
__version__ = importlib.metadata.version("curated-transformers")
except importlib.metadata.PackageNotFoundError:
__version__ = "unknown"


class registry(object):
"""
Expand Down
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

# -- Project information

import curated_transformers

project = "Curated Transformers"
copyright = "2021-2023, ExplosionAI GmbH"
author = "ExplosionAI GmbH"
version = curated_transformers.__version__
release = curated_transformers.__version__

# -- General configuration

Expand Down

0 comments on commit 23f3a1b

Please sign in to comment.