Skip to content

Commit 52688ec

Browse files
committed
fix: ipc output issue
1 parent c9def0b commit 52688ec

File tree

5 files changed

+8
-52
lines changed

5 files changed

+8
-52
lines changed

.github/workflows/publish_python.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ name: Publish Python Package
22

33
on:
44
push:
5-
branches: [ main, test, develop ]
5+
branches: [ main, develop ]
66
pull_request:
77
types:
88
- opened
99

1010
env:
1111
PACKAGE_NAME: crawlab-sdk
12-
PYPI_REPOSITORY_URL: https://test.pypi.org/legacy/
13-
PYPI_TEST_REPOSITORY_URL: https://test.pypi.org/legacy/
1412

1513
jobs:
1614
build:
@@ -38,6 +36,10 @@ jobs:
3836
poetry build
3937
echo "version=$(poetry version -s)" >> $GITHUB_OUTPUT
4038
39+
- name: Run tests
40+
run: |
41+
python -m pytest tests/
42+
4143
- name: Upload artifact
4244
uses: actions/upload-artifact@v4
4345
with:
@@ -73,15 +75,6 @@ jobs:
7375
id-token: write
7476
if: needs.check_version.outputs.is_new_version == 'true'
7577
steps:
76-
- name: Configure repository URL
77-
id: configure
78-
run: |
79-
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
80-
echo "repository_url=${{ env.PYPI_REPOSITORY_URL }}" >> $GITHUB_OUTPUT
81-
else
82-
echo "repository_url=${{ env.PYPI_TEST_REPOSITORY_URL }}" >> $GITHUB_OUTPUT
83-
fi
84-
8578
- name: Download artifact
8679
uses: actions/download-artifact@v4
8780
with:

compile_grpc.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

crawlab/core/item.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ def save_items(items: Iterable[dict]):
1313
type="data",
1414
payload=items,
1515
)
16-
sys.stdout.writelines([msg.model_dump_json()])
16+
sys.stdout.write(msg.model_dump_json() + "\n")
1717
sys.stdout.flush()

crawlab/entity/ipc_message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
class IPCMessage(BaseModel):
77
type: Optional[Literal["data", "log"]] = Field(description="Message type")
8-
ipc: bool = Field(description="The message is IPC", default=True)
98
payload: Iterable[dict] | dict = Field(description="Message payload")
9+
ipc: bool = Field(description="The message is IPC", default=True)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "crawlab-sdk"
3-
version = "0.7.0rc4"
3+
version = "0.7.0rc5"
44
description = "Python SDK for Crawlab"
55
authors = ["Marvin Zhang <tikazyq@163.com>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)