Skip to main content

Wedata Feature Engineering Library Development

Reason this release was yanked:

delete

Project description

Wedata Feature Engineering Library

Wedata 特征工程库,提供特征存储、特征管理等功能。

发布到 Test PyPI 完整流程

1. 注册 Test PyPI 账号并获取 Token

1.1 注册账号

  1. 访问 https://test.pypi.org/account/register/
  2. 填写用户名、邮箱、密码完成注册 colinshang Wedata@2022
  3. 验证邮箱 colinshang@tencent.com

1.2 创建 API Token

  1. 登录后访问 https://test.pypi.org/manage/account/
  2. 滚动到 API tokens 部分
  3. 点击 Add API token
  4. 填写 Token 名称(如 colin-api-token
  5. 选择 Scope(可选择整个账户或特定项目)
  6. 点击 Create token
  7. 立即复制并保存 Token(只显示一次,格式为 pypi-AgENdGVzdC5weXBpLm9yZwIkOTNmYmI3OTUtMmQ2YS00YWQxLWExOTQtYjM2N2FlNWM3MmRmAAIqWzMsIjBlZGUyZmY3LWJlMmYtNGRjNy1hOWZlLTQ5OTQ1OTdlZDJmMCJdAAAGIKkxZw9vxjNR5yy9w5ZelgvEP7fhHk_piJHFfjB3rIgc

1.3 配置本地凭证

创建或编辑 ~/.pypirc 文件:

[distutils]
index-servers =
    pypi
    testpypi

[pypi]
username = __token__
password = pypi-xxxxxxxxxxxxxxxx

[testpypi]
username = __token__
password = pypi-AgENdGVzdC5weXBpLm9yZwIkOTNmYmI3OTUtMmQ2YS00YWQxLWExOTQtYjM2N2FlNWM3MmRmAAIqWzMsIjBlZGUyZmY3LWJlMmYtNGRjNy1hOWZlLTQ5OTQ1OTdlZDJmMCJdAAAGIKkxZw9vxjNR5yy9w5ZelgvEP7fhHk_piJHFfjB3rIgc

注意:

  • username 固定为 __token__password 填写你的 API Token
  • 建议设置文件权限 chmod 600 ~/.pypirc

2. 项目配置

2.1 包名配置

setup.py 中配置包名:

#name="tencent_wedata_feature_engineering",      # 正式环境包名(已注释)
name="tencent_wedata_feature_engineering_dev",   # 测试环境包名(当前使用)

2.2 版本号配置

版本号在 wedata/__init__.py 中定义:

__version__ = "0.1.50"

3. 执行发布

3.1 发布到 Test PyPI(测试环境)

chmod +x build-test.sh
./build-test.sh

3.2 发布到 PyPI(正式环境)

chmod +x build.sh
./build.sh

3.3 脚本执行内容

发布脚本会执行以下操作:

  1. 清理旧的构建文件 (dist/, build/, *.egg-info/)
  2. 读取版本号(从 wedata/__init__.py
  3. 安装构建工具 (twine, build)
  4. 打包为 wheel 格式 (python3 setup.py sdist bdist_wheel)
  5. 上传到 PyPI/Test PyPI

4. 发布结果

发布成功后会显示:

View at:
https://test.pypi.org/project/tencent-wedata-feature-engineering-dev/0.1.50/

5. 安装使用

5.1 从 Test PyPI 安装

# 仅从 Test PyPI 安装
pip install -i https://test.pypi.org/simple/ tencent-wedata-feature-engineering-dev==0.1.50

# 如果有依赖在正式 PyPI 上,使用混合源安装
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ tencent-wedata-feature-engineering-dev==0.1.50

5.2 从正式 PyPI 安装

pip install tencent-wedata-feature-engineering

6. 相关文件说明

文件 用途
~/.pypirc PyPI 凭证配置
setup.py 包配置(名称、版本、依赖等)
wedata/__init__.py 版本号定义
build-test.sh 发布到 Test PyPI
build.sh 发布到正式 PyPI

7. 注意事项

  • Test PyPI 和正式 PyPI 是独立的仓库,需要分别注册账号和创建 Token
  • 同一版本号发布后无法覆盖,如需修改必须升级版本号
  • Test PyPI 仅用于测试,不应用于生产环境
  • ~/.pypirc 文件包含敏感信息,注意保护

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tencent_wedata_feature_engineering-0.5.51.tar.gz (150.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file tencent_wedata_feature_engineering-0.5.51.tar.gz.

File metadata

File hashes

Hashes for tencent_wedata_feature_engineering-0.5.51.tar.gz
Algorithm Hash digest
SHA256 65ba151e0132696f31b89ea2c4596490c3c63a7eb6cf19d70f97f620c6898fc4
MD5 c9a50eb921cfa4f9a383680ae8ed7f33
BLAKE2b-256 6e73f70480fdb177f3ff7104ec2b9621d72f7d04ca8b040bdb2e803d0e5cb97e

See more details on using hashes here.

File details

Details for the file tencent_wedata_feature_engineering-0.5.51-py3-none-any.whl.

File metadata

File hashes

Hashes for tencent_wedata_feature_engineering-0.5.51-py3-none-any.whl
Algorithm Hash digest
SHA256 dde0e650b4cfdb046789e94c85b89773a033376f78242fea4c871425234300a2
MD5 27587a22c9f9c6e6e33dad9b35311e91
BLAKE2b-256 3f04f94fa8606dc1de6c98e9a3208df9b35def90606acb894fc96a57ef89dcec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page