-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added codes and publish python package workflow
- Loading branch information
1 parent
d814983
commit b70867b
Showing
3 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Publish Python Package | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools scikit-build | ||
- name: Build source distribution | ||
run: | | ||
python setup.py sdist | ||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from skbuild import setup | ||
|
||
from pathlib import Path | ||
|
||
this_directory = Path(__file__).parent | ||
long_description = (this_directory / "README.md").read_text(encoding="utf-8") | ||
|
||
setup( | ||
name="open_text_embeddings", | ||
description="Open Source Text Embedding Models with OpenAI API-Compatible Endpoint", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
version="1.0.0", | ||
author="Lim Chee Kin", | ||
author_email="limcheekin@vobject.com", | ||
license="MIT", | ||
package_dir={"open.text.embeddings": "open/text/embeddings", | ||
"open.text.embeddings.server": "open/text/embeddings/server"}, | ||
packages=["open.text.embeddings", "open.text.embeddings.server"], | ||
install_requires=["langchain>=0.0.200"], | ||
extras_require={ | ||
"server": ["uvicorn>=0.22.0", | ||
"fastapi>=0.100.0", | ||
"pydantic-settings>=2.0.1", | ||
"sse-starlette>=1.6.1", | ||
"sentence_transformers>=2.2.2", | ||
], | ||
}, | ||
python_requires=">=3.7", | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
], | ||
) |