Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/uv-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: uv-ci

on:
Comment on lines +1 to +3
push:
branches:
- main
- master
- copilot/**
pull_request:

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
Comment on lines +19 to +22
with:
python-version: "3.12"

- name: Set up uv
uses: astral-sh/setup-uv@v8.1.0
with:
version: "0.11.8"
enable-cache: true

- name: Run uv build validation
run: bash ./scripts/uv-build.sh
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> 基于 MicroClaw 思路的 Python 多功能 **AI Agent 运行时**,聚焦**任务处理**与**A股/美股/港股投资助手**,面向中国用户打造。

[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/)
[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)](tests/)

Expand Down Expand Up @@ -99,7 +99,7 @@

### 环境要求

- Python **3.11+**
- Python **3.12+**
- (可选)Docker & Docker Compose

### 1. 安装
Expand All @@ -116,6 +116,12 @@ pip install -e .
pip install -e '.[dev]'
```

也可以使用 `uv`:

```bash
uv sync --extra dev
```

### 2. 配置

**方式 A:交互式向导**
Expand Down Expand Up @@ -1292,6 +1298,12 @@ python -m pytest tests/ --cov=xclaw --cov-report=term-missing
xclaw doctor
```

使用 `uv` 时可以直接执行仓库内脚本:

```bash
bash ./scripts/uv-build.sh
```

### 测试结构

```
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "xclaw"
version = "0.1.0"
description = "Python-based intelligent Agent runtime for task processing and stock investment assistance"
readme = "README.md"
requires-python = ">=3.11"
requires-python = ">=3.12"
license = { text = "MIT" }
dependencies = [
# Core async & HTTP
Expand Down Expand Up @@ -37,12 +37,15 @@ dependencies = [
# Data analysis
"pandas>=2.2",
"pandas-ta",
"matplotlib>=3.10.9",
# Scheduling
"APScheduler>=3.10",
# Web scraping helpers
"beautifulsoup4>=4.12",
"lxml>=5.0",
"Pillow>=12.2.0",
"qrcode>=7.4",
"reportlab>=4.4.10",
Comment on lines 37 to +48
]

[project.optional-dependencies]
Expand Down
9 changes: 9 additions & 0 deletions scripts/uv-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${repo_root}"

uv sync --extra dev
uv build
uv run python -m pytest tests/ -v
Loading
Loading