1 Star 0 Fork 0

Lance/SwanLab

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pyproject.toml 4.04 KB
一键复制 编辑 原始数据 按行查看 历史
Ze-Yi LIN 提交于 2024-08-21 16:48 +08:00 . bugfix/gpu-driver (#681)
# 在此处完成python项目的配置以及依赖安装
[build-system] # 指定构建系统与一些依赖
requires = [
"hatchling",
"hatch-requirements-txt",
"hatch-fancy-pypi-readme>=22.5.0",
]
build-backend = "hatchling.build"
[project]
name = "swanlab" # 项目名称
dynamic = ["version", "dependencies", "optional-dependencies", "readme"] # 动态配置版本,依赖,可选依赖,readme
description = "Python library for streamlined tracking and management of AI training processes." # 项目描述
license = "Apache-2.0" # 项目许可证
requires-python = ">=3.8" # python版本要求,我们只维护python3.8以上版本
authors = [# 项目作者
{ name = "Cunyue", email = "team@swanhub.co" },
{ name = "Feudalman", email = "team@swanhub.co" },
{ name = "ZeYi Lin", email = "team@swanhub.co" },
{ name = "KashiwaByte", email = "team@swanhub.co" },
]
keywords = [# 项目关键词
"machine learning",
"reproducibility",
"visualization"
]
classifiers = [# 项目分类
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Visualization',
]
[project.scripts] # 项目脚本
swanlab = "swanlab.cli:cli" # 项目命令行工具(可添加多个)
[project.urls] # 项目链接
"Homepage" = "https://swanlab.cn"
"Source" = "https://github.com/SwanHubX/SwanLab"
"Bug Reports" = "https://github.com/SwanHubX/SwanLab/issues"
"Documentation" = "https://docs.swanlab.cn/zh/guide_cloud/general/what-is-swanlab.html"
[tool.hatch.version] # 动态设置项目版本
path = "swanlab/package.json" # package.json文件,从中获取版本号
pattern = ".*\"version\":\\s*\"(?P<version>[^\"]+)\""
[tool.hatch.metadata.hooks.requirements_txt]
filename = "requirements.txt"
[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
media = ["requirements-media.txt"] # pip install "swanlab[meida]"
[tool.hatch.metadata.hooks.fancy-pypi-readme] # 动态设置readme
content-type = "text/markdown"
fragments = [{ path = "README.md" }]
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # 动态设置readme中的图片链接,渲染为html格式,gradio设置了,暂时不知道有什么用
pattern = "(readme_files)/"
replacement = 'https://raw.githubusercontent.com/SwanHubX/swanlab/main/\g<1>/'
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # 动态设置中文README跳转规则
pattern = "README_en.md"
replacement = 'https://github.com/SwanHubX/SwanLab/blob/main/README_en.md'
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # 动态设置README跳转规则
pattern = "README.md"
replacement = "https://github.com/SwanHubX/SwanLab/blob/main/README.md"
[tool.hatch.build]
artifacts = [
"*.json",
"*.pyi", # 类型提示文件
]
[tool.hatch.build.targets.sdist] # 在执行构建之前,将一些必要文件拷贝到虚拟环境中,以便构建,此时已经完成了vue的编译
include = [
"/swanlab",
"/test", # 包含一些测试脚本,确保测试成功
"/README.md", # 包含readme
"/requirements.txt", # 包含依赖
"/requirements-media.txt", # 包含可选依赖
]
[tool.hatch.build.targets.wheel]
packages = ["swanlab"] # 指定项目包名
[tool.pyright] # 静态类型检查,暂时没有配置
include = ["swanlab/**/*.py"] # 检查的文件
exclude = [] # 排除的文件
[tool.ruff] # 代码风格检查,暂时没有配置
target-version = "py37"
extend-select = ["B", "C", "I", "N", "SIM", "UP"]
ignore = []
# black配置,与构建无关
[tool.black]
line-length = 120
skip-string-normalization = true
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lance521/SwanLab.git
git@gitee.com:lance521/SwanLab.git
lance521
SwanLab
SwanLab
deepspeed-itg

搜索帮助