Skip to content
ztxtechPublic

Repository files navigation

dstz

PRs Welcome Python Python Version MIT License GitHub Repository GitHub Issues Documentation Status

简介

dstz是一个用于证据理论的Python包,提供了一系列工具和函数,帮助用户处理和应用证据理论。

安装

使用pip安装dstz:

pip install dstz

要求 Python >= 3.9。

例子

仓库中的示例脚本用模块方式运行,例如:

git clone https://github.com/ztxtech/dstz.git
cd dstz
pip install -e .
python -m example.space_example

直接运行 python example/space_example.py 会因为包路径不在 sys.path 上而报 ModuleNotFoundError,请始终用 python -m example.<脚本名>。

文档

完整的API文档和使用指南可在项目主页上找到。

发布

发行包从 GitHub 直接发布到 PyPI,本地与仓库都不保存 PyPI token,鉴权使用 PyPI 的 trusted publishing(OIDC 短期令牌):

  1. 一次性配置(在 PyPI 完成):在 dstz 项目的 Publishing settings 里添加 pending publisher, 指定仓库 ztxtech/dstz、工作流 publish.yml、environment pypi; TestPyPI 同理,环境名为 testpypi。GitHub 侧在仓库 Settings → Environments 创建同名 environment(可按需要加审批人)。

  2. 本地预检(可选):sh ./build.sh,只做清理、打包和 twine check --strict,不上传。

  3. 正式发布:把 pyproject.toml 里的 version 改成目标版本号并提交, 然后打标签推送:

    git tag v0.0.8
    git push origin v0.0.8

    CI 会先校验标签与 pyproject.toml 版本一致,再构建、校验并发布到 PyPI。

  4. 想先演练整条链路:在 Actions 里手动运行 publish 工作流,target 选 testpypi,产物投递到 TestPyPI。

每次推送标签都会同时构建 sdist 与 wheel;PR 与推送到 main 的提交由 ci 工作流跑测试并校验发行包。

支持与交流

有任何问题或建议,欢迎在GitHub Issues页面提交。

许可证

本项目遵循MIT License。

作者:Tianxiang Zhan 电子邮件:zhantianxianguestc@hotmail.com

致谢

感谢所有贡献者和社区成员的帮助和支持。

相关论文

本软件包的编程思想基于Zhan等人的论文,如果涉及相关内容,请引用相关文献。

@article{zhan2024generalized,
  title={Generalized information entropy and generalized information dimension},
  author={Zhan, Tianxiang and Zhou, Jiefeng and Li, Zhen and Deng, Yong},
  journal={Chaos, Solitons \& Fractals},
  volume={184},
  pages={114976},
  year={2024},
  publisher={Elsevier}
}
@article{zhan2024random,
  title={Random Graph Set and Evidence Pattern Reasoning Model},
  author={Zhan, Tianxiang and Li, Zhen and Deng, Yong},
  journal={arXiv preprint arXiv:2402.13058},
  year={2024}
}

Releases

Packages

Used by

Contributors

Languages