Skip to main content

1. 开发环境 Get Started

1.1 使用 Anaconda 安装 python 3.13

conda remove -n py313 --all
conda create -n py313 python=3.13
source activate py313

1.2 安装 VS Code 插件

详见文件 .vscode/extensions.json 中的 recommendations 配置

1.3 设置 VS Code

详见文件 .vscode/setting.json

1.4 依赖管理 poetry

python -m pip install poetry==2.4.1
poetry install

1.5 pre-commit

# Execute below command at root directory to install git hooks into your `.git/` directory.
pre-commit install --config ./.pre-commit-config.yaml

2. 代码风格

规则

  • 必须按照该文档的 开发环境 Get Started 准备好开发环境
  • VS Code 飘红提示必须解决,遇到 python 语言特性导致的飘红可以使用 # type: ignore 或 # pylint: disable=W0212 忽略
  • 函数的出入参必须要有类型声明
  • 写注释时,字母和汉字之间需要有一个空格

其他

poetry 的注意事项

其他可能会用到的命令

# 增加依赖
poetry add {依赖名}
 
# 安装依赖
poetry install

# 更新依赖
poetry update {依赖名}

# 删除依赖
poetry remove {依赖名}

# 环境信息
poetry env info

# 展示依赖版本
poetry show -t

如果 poetry.lock 文件冲突,应该删除 rm poetry.lock 并使用 poetry update 重新生成 poetry.lock 文件

sdk 开发和发版

# 开发 sdk 时为了解决 python 项目的路径问题,需要运行下面这个命令(**千万注意修改的代码是不是该项目中的代码**)
cd ..
pip install -e ./rbm_tools

# sdk 发版
cd ./rbm_tools
vi pyproject.toml # 修改 sdk pyproject.toml 的 version
./build.sh

# 修改项目中使用的 sdk 版本
vi pyproject.toml # 修改 pyproject.toml sdk 的 version
rm poetry.lock
poetry update

Metadata

Release files for rbm_tools 0.0.2

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

Source distribution (sdist)

Source distribution for rbm_tools 0.0.2
File Size Uploaded Provenance
rbm_tools-0.0.2.tar.gz 26.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 61.6 kB

Release files / rbm_tools-0.0.2.tar.gz

Download URL rbm_tools-0.0.2.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9dc147fef77b14f09ff5ee168a2b714e241877aab3db0fdcce05500f240b28d5
BLAKE2b-256 checksum
How to use checksums
c91476dcec28519cbb89b08a4448dafc7ce21ea74c3a0c26cc1c6b0d4a6cde5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.12.3 Linux/6.17.0-1022-azure

Release files / rbm_tools-0.0.2-py3-none-any.whl

Download URL rbm_tools-0.0.2-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1dc06343978426dc9cd0beed235a40080e5c5e1cfba9c9ca1ff32eafd48aaa8
BLAKE2b-256 checksum
How to use checksums
5133adbab2da09e5dc968f748791ea37ecbe0effd22933a1d813371460f6f488
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.12.3 Linux/6.17.0-1022-azure

Security for rbm_tools 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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