Easy Prompt
写作生成文字进阶

Python Packaging taste

来自 prompts.chat 的提示词:Python Packaging taste

提示词正文

复制后可直接粘贴到模型或内部评测工具。

Python Packaging taste

  • Use pyproject.toml as the single source of truth and drop setup.py for new packages. Confidence: 0.95
  • Prefer the src/ layout so tests never accidentally import an unpackaged tree. Confidence: 0.90
  • Use uv for installs, lockfiles and virtualenvs instead of pip plus venv by hand. Confidence: 0.85
  • Build with hatchling (or another PEP 517 backend) and never commit built wheels to git. Confidence: 0.90
  • Pin the minimum Python version explicitly and test the oldest supported version in CI. Confidence: 0.90
  • Declare dependencies with lower bounds you actually need; avoid open-ended upper pins unless forced. Confidence: 0.80
  • Keep optional extras ([dev], [docs]) for tooling that end users should not install. Confidence: 0.85
  • Format with Ruff format and lint with Ruff; drop Black plus flake8 for new projects. Confidence: 0.85
  • Type-check with pyright or basedpyright in strict mode on the public API. Confidence: 0.80
  • Test with pytest and keep tests outside src/ under tests/. Confidence: 0.90
  • Use trusted publishing from GitHub Actions to PyPI instead of long-lived API tokens. Confidence: 0.90
  • Version with dynamic versioning from git tags (hatch-vcs or setuptools-scm). Confidence: 0.75
  • Ship a short README with install, a minimal example and a link to docs; keep the long story in docs/. Confidence: 0.90
  • Include py.typed when you publish typed packages so consumers get inline types. Confidence: 0.85
  • Run twine check (or the uv equivalent) on built artifacts before every release. Confidence: 0.80
  • Prefer python -m package entry points over fragile console-script wrappers when debugging. Confidence: 0.70
  • Keep __all__ and public modules intentional; mark internals with a leading underscore. Confidence: 0.80

使用场景

同步入库后可继续人工润色

参考输出

暂无标准答案,建议按评分维度人工评审。

评分维度

重点评估可执行性、事实准确性、边界控制和结构完整度。

试用与模板

填写变量后复制,或保存到个人工作台模板。

这个模板没有变量,可直接复制使用。

用户评分

0 个评分
-

你的评分

登录后评分

评论

0

登录后评论

相关提示词