Skip to main content

zylab

通用科学计算仿真分析平台。

PyPI CI Python License Coverage

特性

  • 构建工具链: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.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zylab 0.1.3
File Size Uploaded
zylab-0.1.3.tar.gz 743.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zylab 0.1.3
File Interpreter ABI Platform
zylab-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / zylab-0.1.3.tar.gz

Download URL zylab-0.1.3.tar.gz
Size 743.6 kB
Tags Source
SHA-256 checksum
How to use checksums
dfc13f722be0d8cd2f41ac4c7f60dfe9210dc05cb92ed6c68a73c9008c0a3514
BLAKE2b-256 checksum
How to use checksums
1521391f02ced83416be6a0af6ba8f644a4e54f8fe87cf5abae192d2d2953943
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / zylab-0.1.3-py3-none-any.whl

Download URL zylab-0.1.3-py3-none-any.whl
Size 526.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8760d6f0064276e831daa627a9aa01d50927d381d5885bf33a0af75eed9aefc
BLAKE2b-256 checksum
How to use checksums
bc392a28cbd84336628dd6646e593e4849062020664eed0f99fb935c7ef2da25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page