From c4475b68c85ba77496f3b1ad8779b845f22ccde5 Mon Sep 17 00:00:00 2001 From: Pratik Bhavsar Date: Sun, 23 May 2021 12:58:49 +0530 Subject: [PATCH] init --- .github/workflows/release.yml | 34 +++++++++++++++++++++++++ requirements.txt | 1 + semantic_search/__init__.py | 0 semantic_search/__version__.py | 1 + setup.py | 46 ++++++++++++++++++++++++++++++++++ 5 files changed, 82 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 requirements.txt create mode 100644 semantic_search/__init__.py create mode 100644 semantic_search/__version__.py create mode 100644 setup.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dd483c9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +# This workflows will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [published] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.7' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: publish to PyPI + if: github.event_name != 'pull_request' + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..74415dd --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +sentence-transformers>=1.1 \ No newline at end of file diff --git a/semantic_search/__init__.py b/semantic_search/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/semantic_search/__version__.py b/semantic_search/__version__.py new file mode 100644 index 0000000..3aa0d7b --- /dev/null +++ b/semantic_search/__version__.py @@ -0,0 +1 @@ +__version__ = "0.0.0" \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..390c13a --- /dev/null +++ b/setup.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + +import io +import os + +from setuptools import find_packages, setup + +# Package meta-data. +NAME = "semantic_search" +DESCRIPTION = "Make semantic search easier" +URL = "https://github.com/bhavsarpratik/semantic-search" +EMAIL = "pratik.a.bhavsar@gmail.com" +AUTHOR = "Pratik Bhavsar" + +here = os.path.abspath(os.path.dirname(__file__)) + +# Import the README and use it as the long-description. +# Note: this will only work if 'README.rst' is present in your MANIFEST.in file! +with io.open(os.path.join(here, "README.md")) as f: + long_description = "\n" + f.read() + +# Load the package's __version__.py module as a dictionary. +about = {} +with open(os.path.join(here, NAME, "__version__.py")) as f: + exec(f.read(), about) + +# Load requirements file +with open(os.path.join(here, "requirements.txt")) as f: + INSTALL_PACKAGES = f.read().splitlines() + +setup( + name=NAME, + version=about["__version__"], + description=DESCRIPTION, + long_description=long_description, + author=AUTHOR, + author_email=EMAIL, + url=URL, + packages=find_packages(exclude=("tests", "notebooks", "data")), + test_suite="tests", + include_package_data=True, + zip_safe=False, # the package can run out of an .egg file + install_requires=INSTALL_PACKAGES, +)