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.4

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.4
File Size Uploaded
zylab-0.1.4.tar.gz 743.7 kB Details

Built distribution (wheel)

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

Total release size: 1.3 MB

Release files / zylab-0.1.4.tar.gz

Download URL zylab-0.1.4.tar.gz
Size 743.7 kB
Tags Source
SHA-256 checksum
How to use checksums
aead137218b4bda1a73847d3fe60eb1367403e5dc0537d582d2ca226b3da6a2a
BLAKE2b-256 checksum
How to use checksums
9d8903d19c76c3a77418feeed6c8ee1c26c6ad982a6a1145ce2eb69f54bf38e1
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.4-py3-none-any.whl

Download URL zylab-0.1.4-py3-none-any.whl
Size 526.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be22faa7832b408740ccac664831c07738b64c50b18b87409ec365b6e6198c78
BLAKE2b-256 checksum
How to use checksums
114e4f33626e03a080246b2466182664930b3c8de73efd14886babe574a49717
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

This release

0.1.4 This release

2 release files

0.1.3

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