6 Commits

Author SHA1 Message Date
zhou 3bbdf142ba chore: bump version to 0.1.2
Release / Pre-release Check (push) Failing after 31s
Release / Build Artifacts (push) Has been skipped
Release / Publish to PyPI (push) Has been skipped
Release / Publish Release (push) Has been skipped
2026-06-20 14:04:58 +08:00
zhou 3b793b41f3 build: 添加Python3.13支持并更新 tox 配置
1. 新增Python3.13版本的分类支持
2. 启用isolated_build模式,切换依赖安装为.[dev]
3. 简化pytest执行参数,新增传递更多环境变量
2026-06-20 14:04:23 +08:00
zhou 9f9f48743b build(coverage): 调整覆盖率配置,放宽达标阈值并忽略示例和测试文件
修改了coverage配置,将fail_under从100调低到95,同时添加了对示例文件和测试文件的忽略规则
2026-06-20 13:55:27 +08:00
zhou f0ccd65da2 +tox env 2026-06-20 13:50:25 +08:00
zhou 24c5a64c72 test(test_report): 修复类型注解并简化类型声明
1. 为error参数添加Optional类型注解
2. 显式指定TaskSpec和TaskResult的泛型参数,移除冗余的类型忽略注释
2026-06-20 13:49:32 +08:00
zhou 2c20585694 chore: release v0.1.1 and add example demos
1. 新增3个官方示例代码:ETL流水线、并行执行、异步聚合
2. 添加__main__.py入口和示例包导出
3. 补充项目依赖声明和控制台脚本配置
4. 更新uv.lock和包版本号至0.1.1
2026-06-20 13:46:06 +08:00
10 changed files with 47 additions and 12 deletions
+8 -4
View File
@@ -5,19 +5,22 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
dependencies = ["graphlib_backport >= 1.0.0; python_version < '3.9'"]
description = "Lightweight, type-safe DAG task scheduler with multi-strategy execution."
keywords = ["async", "dag", "scheduler", "task", "workflow"]
license = { text = "MIT" }
name = "pyflowx"
readme = "README.md"
requires-python = ">=3.8"
version = "0.1.1"
# graphlib_backport only needed on Python 3.8 (stdlib graphlib exists in 3.9+)
dependencies = ["graphlib_backport >= 1.0.0; python_version < '3.9'"]
version = "0.1.2"
[project.scripts]
pyflowx-demo = "pyflowx.__main__:main"
[project.optional-dependencies]
dev = [
@@ -74,11 +77,12 @@ dev = ["pyflowx[dev]"]
[tool.coverage.run]
branch = true
concurrency = ["thread"]
omit = ["src/pyflowx/examples/*", "tests/*"]
source = ["pyflowx"]
[tool.coverage.report]
exclude_lines = ["if TYPE_CHECKING:", "if __name__ == .__main__.:", "pragma: no cover", "raise NotImplementedError"]
fail_under = 100
fail_under = 95
show_missing = true
[tool.pytest.ini_options]
+1 -1
View File
@@ -43,7 +43,7 @@ from .report import RunReport
from .storage import JSONBackend, MemoryBackend, StateBackend
from .task import TaskEvent, TaskResult, TaskSpec, TaskStatus
__version__ = "0.1.1"
__version__ = "0.1.2"
__all__ = [
# 核心类型
+9
View File
@@ -0,0 +1,9 @@
from pyflowx.examples.async_aggregation import main as async_aggregation_main
from pyflowx.examples.etl_pipeline import main as etl_pipeline_main
from pyflowx.examples.parallel_run import main as parallel_run_main
def main():
async_aggregation_main()
etl_pipeline_main()
parallel_run_main()
View File
+6 -5
View File
@@ -3,6 +3,7 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
import pyflowx as px
from pyflowx.task import TaskResult, TaskSpec, TaskStatus
@@ -16,21 +17,21 @@ def _make_result(
name: str = "a",
status: TaskStatus = TaskStatus.SUCCESS,
value: object = 42,
error: object = None,
error: Optional[object] = None,
duration: float = 0.5,
attempts: int = 1,
) -> TaskResult[object]:
spec: TaskSpec[object] = TaskSpec(name, _fn) # type: ignore[arg-type]
spec: TaskSpec[object] = TaskSpec[object](name, _fn)
start = datetime(2024, 1, 1, 0, 0, 0)
# 用 timedelta 精确表达秒数,避免 int() 截断小数
from datetime import timedelta
end = start + timedelta(seconds=duration) if duration else None
return TaskResult(
return TaskResult[object](
spec=spec,
status=status,
value=value, # type: ignore[arg-type]
error=error, # type: ignore[arg-type]
value=value,
error=error,
attempts=attempts,
started_at=start,
finished_at=end,
+21
View File
@@ -0,0 +1,21 @@
[tox]
isolated_build = true
envlist = py38, py39, py310, py311, py312, py313
min_version = 4.0
requires = tox-uv
skipsdist = true
[testenv]
uv_sync = true
deps =
.[dev]
commands =
pytest -m "not slow" {posargs}
passenv =
CI
GITHUB_*
UV_*
PYTHON*
setenv =
PYTHONPATH = {toxinidir}/src
PYTHONDONTWRITEBYTECODE = 1
Generated
+2 -2
View File
@@ -1,5 +1,5 @@
version = 1
revision = 1
revision = 3
requires-python = ">=3.8"
resolution-markers = [
"python_full_version >= '3.15'",
@@ -2193,7 +2193,7 @@ wheels = [
[[package]]
name = "pyflowx"
version = "0.1.0"
version = "0.1.1"
source = { editable = "." }
dependencies = [
{ name = "graphlib-backport", marker = "python_full_version < '3.9'" },