mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 12:32:30 +08:00
Feat: auto release (#10557)
### What problem does this PR solve? Add cli build to release.yml. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@ -120,3 +120,17 @@ jobs:
|
|||||||
packages-dir: sdk/python/dist/
|
packages-dir: sdk/python/dist/
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|
||||||
|
- name: Build ragflow-cli
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: |
|
||||||
|
cd admin/client && \
|
||||||
|
uv build
|
||||||
|
|
||||||
|
- name: Publish client package distributions to PyPI
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
with:
|
||||||
|
packages-dir: admin/client/dist/
|
||||||
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
verbose: true
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -149,8 +149,7 @@ out
|
|||||||
# Nuxt.js build / generate output
|
# Nuxt.js build / generate output
|
||||||
.nuxt
|
.nuxt
|
||||||
dist
|
dist
|
||||||
admin/release
|
ragflow_cli.egg-info
|
||||||
|
|
||||||
# Gatsby files
|
# Gatsby files
|
||||||
.cache/
|
.cache/
|
||||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||||
|
|||||||
@ -26,7 +26,7 @@ It consists of a server-side Service and a command-line client (CLI), both imple
|
|||||||
2. Launch from source code:
|
2. Launch from source code:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python admin/admin_server.py
|
python admin/server/admin_server.py
|
||||||
```
|
```
|
||||||
The service will start and listen for incoming connections from the CLI on the configured port.
|
The service will start and listen for incoming connections from the CLI on the configured port.
|
||||||
|
|
||||||
24
admin/client/pyproject.toml
Normal file
24
admin/client/pyproject.toml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
[project]
|
||||||
|
name = "ragflow-cli"
|
||||||
|
version = "0.21.0.dev5"
|
||||||
|
description = "Admin Service's client of [RAGFlow](https://github.com/infiniflow/ragflow). The Admin Service provides user management and system monitoring. "
|
||||||
|
authors = [{ name = "Lynn", email = "lynn_inf@hotmail.com" }]
|
||||||
|
license = { text = "Apache License, Version 2.0" }
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.10,<3.13"
|
||||||
|
dependencies = [
|
||||||
|
"requests>=2.30.0,<3.0.0",
|
||||||
|
"beartype>=0.18.5,<0.19.0",
|
||||||
|
"pycryptodomex>=3.10.0",
|
||||||
|
"lark>=1.1.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[dependency-groups]
|
||||||
|
test = [
|
||||||
|
"pytest>=8.3.5",
|
||||||
|
"requests>=2.32.3",
|
||||||
|
"requests-toolbelt>=1.0.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
ragflow-cli = "admin_client:main"
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
from flask import Blueprint, request
|
from flask import Blueprint, request
|
||||||
|
|
||||||
from auth import login_verify
|
from admin.server.auth import login_verify
|
||||||
from responses import success_response, error_response
|
from responses import success_response, error_response
|
||||||
from services import UserMgr, ServiceMgr, UserServiceMgr
|
from services import UserMgr, ServiceMgr, UserServiceMgr
|
||||||
from api.common.exceptions import AdminException
|
from api.common.exceptions import AdminException
|
||||||
@ -27,7 +27,7 @@ from api.utils.crypt import decrypt
|
|||||||
from api.utils import health_utils
|
from api.utils import health_utils
|
||||||
|
|
||||||
from api.common.exceptions import AdminException, UserAlreadyExistsError, UserNotFoundError
|
from api.common.exceptions import AdminException, UserAlreadyExistsError, UserNotFoundError
|
||||||
from config import SERVICE_CONFIGS
|
from admin.server.config import SERVICE_CONFIGS
|
||||||
|
|
||||||
|
|
||||||
class UserMgr:
|
class UserMgr:
|
||||||
@ -195,7 +195,7 @@ fi
|
|||||||
if [[ "${ENABLE_ADMIN_SERVER}" -eq 1 ]]; then
|
if [[ "${ENABLE_ADMIN_SERVER}" -eq 1 ]]; then
|
||||||
echo "Starting admin_server..."
|
echo "Starting admin_server..."
|
||||||
while true; do
|
while true; do
|
||||||
"$PY" admin/admin_server.py
|
"$PY" admin/server/admin_server.py
|
||||||
done &
|
done &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -12,21 +12,21 @@ The Admin CLI and Admin Service form a client-server architectural suite for RAG
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Starting the Admin Service
|
## Starting the Admin Service
|
||||||
|
|
||||||
#### Launching from source code
|
### Launching from source code
|
||||||
|
|
||||||
1. Before start Admin Service, please make sure RAGFlow system is already started.
|
1. Before start Admin Service, please make sure RAGFlow system is already started.
|
||||||
|
|
||||||
2. Launch from source code:
|
2. Launch from source code:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python admin/admin_server.py
|
python admin/server/admin_server.py
|
||||||
```
|
```
|
||||||
|
|
||||||
The service will start and listen for incoming connections from the CLI on the configured port.
|
The service will start and listen for incoming connections from the CLI on the configured port.
|
||||||
|
|
||||||
#### Using docker image
|
### Using docker image
|
||||||
|
|
||||||
1. Before startup, please configure the `docker_compose.yml` file to enable admin server:
|
1. Before startup, please configure the `docker_compose.yml` file to enable admin server:
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ The Admin CLI and Admin Service form a client-server architectural suite for RAG
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Using the Admin CLI
|
## Using the Admin CLI
|
||||||
|
|
||||||
1. Ensure the Admin Service is running.
|
1. Ensure the Admin Service is running.
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ The Admin CLI and Admin Service form a client-server architectural suite for RAG
|
|||||||
ragflow-cli -h 0.0.0.0 -p 9381
|
ragflow-cli -h 0.0.0.0 -p 9381
|
||||||
```
|
```
|
||||||
|
|
||||||
Enter superuser's password to login. Default password is `admin`.
|
Enter superuser's password to login. Default password is `admin`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user