-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48688af
commit 7da419a
Showing
18 changed files
with
208 additions
and
88 deletions.
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 |
---|---|---|
@@ -1,41 +1,9 @@ | ||
# python-ragflow | ||
# ragflow-sdk | ||
|
||
# update python client | ||
# build and publish python SDK to pypi.org | ||
|
||
- Update "version" field of [project] chapter | ||
- Build new python SDK | ||
- Upload to pypi.org | ||
- Install new python SDK | ||
|
||
# build python SDK | ||
|
||
```shell | ||
rm -f dist/* && python setup.py sdist bdist_wheel | ||
``` | ||
|
||
# install python SDK | ||
```shell | ||
pip uninstall -y ragflow && pip install dist/*.whl | ||
``` | ||
|
||
This will install ragflow-sdk and its dependencies. | ||
|
||
# upload to pypi.org | ||
```shell | ||
twine upload dist/*.whl | ||
``` | ||
|
||
Enter your pypi API token according to the prompt. | ||
|
||
Note that pypi allows a version of a package [be uploaded only once](https://pypi.org/help/#file-name-reuse). You need to change the `version` inside the `pyproject.toml` before building and uploading. | ||
|
||
# using | ||
|
||
```python | ||
|
||
``` | ||
|
||
# For developer | ||
```shell | ||
pip install -e . | ||
poetry build | ||
poetry config pypi-token.pypi $YOUR_PYPI_API_TOKEN | ||
poetry publish | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,24 +1,17 @@ | ||
[project] | ||
name = "ragflow" | ||
version = "0.8.0.dev1" | ||
authors = [ | ||
{ name = "The RAGFlow Development Team", email = "[email protected]" }, | ||
] # TODO: email | ||
dependencies = ["pytest~=8.2.0"] | ||
description = "ragflow" | ||
[tool.poetry] | ||
name = "ragflow-sdk" | ||
version = "0.0.2" | ||
description = "Python client sdk of [RAGFlow](https://github.com/infiniflow/ragflow). RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding." | ||
authors = ["Zhichang Yu <[email protected]>"] | ||
license = "Apache License, Version 2.0" | ||
readme = "README.md" | ||
requires-python = ">=3.10" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: Apache License2", | ||
"Operating System :: OS Independent", | ||
] | ||
package-mode = true | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
requests = "^2.30.0" | ||
|
||
[build-system] | ||
requires = ["setuptools>=61.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/pypa/sampleproject" | ||
"Bug Tracker" = "https://github.com/pypa/sampleproject/issues" | ||
# TODO | ||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
2 changes: 1 addition & 1 deletion
2
sdk/python/ragflow/__init__.py → sdk/python/ragflow_sdk/__init__.py
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
sdk/python/ragflow/modules/dataset.py → sdk/python/ragflow_sdk/modules/dataset.py
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from ragflow import RAGFlow | ||
from ragflow_sdk import RAGFlow | ||
import random | ||
import pytest | ||
|
||
|
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