zylab
通用科学计算仿真分析平台。
特性
- 构建工具链:hatchling + uv + ruff + pyrefly + pytest + coverage
- Python 版本:3.11 ~ 3.14
- 代码质量:pre-commit 钩子 + ruff lint/format,覆盖率阈值 95%
- CI/CD:GitHub Actions(lint + typecheck + 多版本测试 + 自动发布到 PyPI)
- 文档:Sphinx + ReadTheDocs(中文 zh_CN)
- 多版本测试:tox + tox-uv(py311, py312, py313, py314)
- 容器化:Dockerfile(含国内镜像源配置)
- GUI 框架:PySide2(Qt5,Python≤3.10)/ PySide6(Qt6,Python≥3.11),按版本自动区分
- 项目结构:src layout + py.typed 类型标记
安装
pip install zylab
或使用 uv:
uv add zylab
快速上手
import zylab
print(zylab.__version__)
命令行(无界面求解模板/工程,支持参数覆盖与扫描):
zylab # 启动图形界面
zylab templates # 列出可用模板
zylab run structural.cantilever_static -p model.nx=20
zylab run demo.zprj --scan "model.tip_load=-50:-100:5"
开发
# 安装开发依赖
uv sync --extra dev
# 运行测试(含覆盖率,阈值 95%)
uv run pytest -m "not slow" --cov=zylab --cov-fail-under=95
# 类型检查
uv run pyrefly check .
# 代码风格
uv run ruff check src tests
uv run ruff format --check src tests
Make 快捷命令
项目提供 Makefile 封装常用操作,运行 make help 查看全部命令:
make sync # 安装开发依赖
make check # 全套门禁 (lint + typecheck + cov)
make build # 构建分发包
make clean # 清理构建产物
make bump PART=patch # 版本号 bump
文档
文档由 Sphinx 构建,托管在 ReadTheDocs:
# 本地构建文档
make doc
多版本测试
使用 tox 在多个 Python 版本(py311, py312, py313, py314)下运行测试:
make tox
许可证
MIT
Metadata
Release files for zylab 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zylab-0.1.1.tar.gz | 379.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zylab-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 555.9 kB
Release files / zylab-0.1.1.tar.gz
| Download URL | zylab-0.1.1.tar.gz |
|---|---|
| Size | 379.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
511b1365722dc6c4218e87ec09b896d112a972c30c4ce0d7c7f0115c891fc9fe
|
|
BLAKE2b-256 checksum How to use checksums |
546c891910e2612a08b632f18760e6474eaae6c58480f0b0f2603fd5d4673318
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / zylab-0.1.1-py3-none-any.whl
| Download URL | zylab-0.1.1-py3-none-any.whl |
|---|---|
| Size | 176.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aff09436d47440262dedd13933d5f4329e581a256203bf510ce53fc977f22206
|
|
BLAKE2b-256 checksum How to use checksums |
9aa3b5565df7038714e6058edfec8d2cf3b78e2831989291439c1babf5e350a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|