项目: d-project
描述
项目命令管理工具
特点
- 通过配置文件管理项目命令
- 支持
.env自动加载 - 支持变量和环境变量插值
- 支持工作流编排和跳过未变更步骤
- 导出readme文件
安装
uv sync
使用
- 本地开发运行 CLI
uv run project --help
- 首先初始化project.yml文件
# 默认生成当前目录
uv run project init
# 若要修改目录
uv run project init ./configs/project.yml
- 运行自定义的命令或者流程
uv run project run some_command
uv run project run some_workflow
project run执行时会自动加载项目根目录下的.env
UV_PUBLISH_TOKEN=pypi-xxxx
-
可以参照下面的
project.yml示例来定义命令和流程 -
project.yml字段说明
title
项目标题,主要用于帮助信息和文档生成。
description
项目描述,显示在帮助信息和生成文档中。
vars
项目内变量,可在配置中通过 ${vars.xxx} 引用。
env
环境变量映射,可在配置中通过 ${env.xxx} 引用;会读取系统环境变量和项目根目录 .env。
check_requirements
是否在运行前检查 requirements.txt 里的依赖是否安装。
directories
加载配置时自动创建的目录列表。
workflows
工作流定义,值是命令名列表,按顺序执行。
commands
命令列表。每个命令支持 name、help、script、deps、outputs、outputs_no_cache、no_skip。
- 示例
project.yml
title: demo
description: describe project details
vars:
name: demo
dist_dir: dist
env:
publish_token: UV_PUBLISH_TOKEN
check_requirements: false
directories:
- dist
workflows:
all:
- build
- publish
commands:
- name: build
help: build package artifacts
script:
- uv build
deps:
- pyproject.toml
outputs:
- ${vars.dist_dir}
- name: publish
help: publish current version to pypi
script:
- uv publish
deps:
- ${vars.dist_dir}
outputs: []
no_skip: true
- 生成READMD.md文件
uv run project document --output ./README.md
Metadata
Release files for d-project 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| d_project-0.1.3.tar.gz | 69.1 kB | Without provenance | Details for d_project-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| d_project-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for d_project-0.1.3-py3-none-any.whl |
Total release size: 85.4 kB
Release files / d_project-0.1.3.tar.gz
| Download URL | d_project-0.1.3.tar.gz |
|---|---|
| Size | 69.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a51988658a137356050f17ac82dba01e88c4bf1fa61a6582915d76952e79df5b
|
|
BLAKE2b-256 checksum How to use checksums |
ebdb19891d4e86477d5da318563003e0384e03dabff211985e26afce91b39776
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / d_project-0.1.3-py3-none-any.whl
| Download URL | d_project-0.1.3-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
737a40517fe128a5d5a61f53bb49cde67391d283e694c11e9379a139322b4463
|
|
BLAKE2b-256 checksum How to use checksums |
a922e985d798ffa118622dbe0e435212c2ea83667b2707b7461234d9fad9a319
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for d-project 0.1.3
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.