Skip to content

Commit

Permalink
fix: incorrect docq version showing in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
janaka committed Sep 7, 2024
1 parent 68da366 commit 1ad03b2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "docq"
version = "0.13.1"
version = "0.13.2"
description = "Docq.AI - Your private ChatGPT alternative. Securely unlock knowledge from confidential documents."
authors = ["Docq.AI Team <[email protected]>"]
maintainers = ["Docq.AI Team <[email protected]>"]
Expand Down
35 changes: 18 additions & 17 deletions source/docq/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
"""Docq module."""
import importlib.metadata as __metadata__

_pkg_metadata = __metadata__.metadata(__package__).json
project_urls = {}
for item in _pkg_metadata["project_url"]:
key, value = item.split(", ")
project_urls[key] = value


# data from pyproject.toml
__version__ = _pkg_metadata["version"] # version field
__version_str__ = str(__version__)
__summary__ = _pkg_metadata["summary"] # description field
__description__ = _pkg_metadata["description"] # readme field
__homepage_url__ = _pkg_metadata["home_page"] # homepage field
__documentation_url__ = project_urls["Documentation"] # documentation field
__repository_url__ = project_urls["Repository"] # repository field
__author_email__ = _pkg_metadata["author_email"] # authors field
__maintainer_email__ = _pkg_metadata["maintainer_email"] # maintainers field
if __package__ is not None:
_pkg_metadata = __metadata__.metadata(__package__).json
project_urls = {}
for item in _pkg_metadata["project_url"]:
key, value = item.split(", ")
project_urls[key] = value

# data from pyproject.toml
__version__ = _pkg_metadata["version"] # version field
__version_str__ = str(__version__)
__summary__ = _pkg_metadata["summary"] # description field
__description__ = _pkg_metadata["description"] # readme field
__homepage_url__ = _pkg_metadata["home_page"] # homepage field
__documentation_url__ = project_urls["Documentation"] # documentation field
__repository_url__ = project_urls["Repository"] # repository field
__author_email__ = _pkg_metadata["author_email"] # authors field
__maintainer_email__ = _pkg_metadata["maintainer_email"] # maintainers field
else:
raise ValueError("Package name is not defined")

__all__ = [
"config",
Expand Down

0 comments on commit 1ad03b2

Please sign in to comment.