Skip to content

Commit

Permalink
refactor the hardcoded constant and close opened file (#57)
Browse files Browse the repository at this point in the history
there are some constant that are hardcoded into the code before in this commit those are at the top of the file for better code readability and there is a opened file that didn't close before in this commit that is closed
  • Loading branch information
ai-naymul committed Sep 18, 2023
1 parent 35cbf73 commit 21163e3
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
from setuptools import setup, find_packages
from os import path

AUTHOR = 'Jina AI'
AUTHOR_EMAIL = 'hello@jina.ai'
LICENSE = 'Apache 2.0'
GITHUB_URL = 'https://github.com/jina-ai/vectordb/'
DOWNLOAD_URL = 'https://github.com/jina-ai/vectordb/tags'
try:
pkg_name = 'vectordb'
libinfo_py = path.join(pkg_name, '__init__.py')
libinfo_content = open(libinfo_py, 'r', encoding='utf-8').readlines()
with open(libinfo_py, 'r', encoding='utf-8') as f:
libinfo_content = f.readlines()
version_line = [l.strip() for l in libinfo_content if l.startswith('__version__')][
0
]
Expand All @@ -29,11 +34,11 @@
description='The Python VectorDB. Build your vector database from working as a library to scaling as a database in the cloud',
long_description=_long_description,
long_description_content_type='text/markdown',
author='Jina AI',
author_email='hello@jina.ai',
license='Apache 2.0',
url='https://github.com/jina-ai/vectordb/',
download_url='https://github.com/jina-ai/vectordb/tags',
author= AUTHOR,
author_email=AUTHOR_EMAIL,
license=LICENSE,
url=GITHUB_URL,
download_url=DOWNLOAD_URL,
packages=find_packages(),
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand Down

0 comments on commit 21163e3

Please sign in to comment.