-
Notifications
You must be signed in to change notification settings - Fork 2
docs: document local packaging flow and wheel metadata #221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # DARE Framework | ||
|
|
||
| `deterministic-agent-runtime-engine` 是当前仓库的发行包名,安装后在 Python 代码里使用的导入名是 `dare_framework`。 | ||
|
|
||
| 除非特别说明,下面的命令都默认在仓库根目录、且已激活目标 Python 虚拟环境后执行。 | ||
|
|
||
| ## 本地安装 | ||
|
|
||
| ### 方式 1:可编辑安装(联调推荐) | ||
|
|
||
| ```bash | ||
| python -m pip install -e . | ||
| ``` | ||
|
|
||
| 如果你只想安装入口而暂时跳过依赖解析: | ||
|
|
||
| ```bash | ||
| python -m pip install -e . --no-deps | ||
| ``` | ||
|
|
||
| ### 方式 2:先打本地 wheel,再安装(冻结版本推荐) | ||
|
|
||
| ```bash | ||
| python -m pip wheel . -w dist --no-deps | ||
| python -m pip install dist/deterministic_agent_runtime_engine-0.1.0-py3-none-any.whl | ||
| ``` | ||
|
|
||
| ## 在另一个项目里引用当前仓库 | ||
|
|
||
| 如果下游项目和当前仓库在同一台机器上,不需要发布到公共镜像仓库。 | ||
|
|
||
| ### 直接从源码路径安装 | ||
|
|
||
| ```bash | ||
| python -m pip install -e /abs/path/to/Deterministic-Agent-Runtime-Engine | ||
| ``` | ||
|
|
||
| 如果两个项目是同级目录,也可以用相对路径: | ||
|
|
||
| ```bash | ||
| python -m pip install -e ../Deterministic-Agent-Runtime-Engine | ||
| ``` | ||
|
|
||
| ### 从本地 wheel 安装 | ||
|
|
||
| 先在当前仓库构建 wheel: | ||
|
|
||
| ```bash | ||
| python -m pip wheel . -w dist --no-deps | ||
| ``` | ||
|
|
||
| 再在下游项目环境里安装: | ||
|
|
||
| ```bash | ||
| python -m pip install /abs/path/to/Deterministic-Agent-Runtime-Engine/dist/deterministic_agent_runtime_engine-0.1.0-py3-none-any.whl | ||
| ``` | ||
|
|
||
| ## 导入方式 | ||
|
|
||
| 安装成功后,下游项目直接导入 `dare_framework`: | ||
|
|
||
| ```python | ||
| from dare_framework.agent import BaseAgent | ||
| from dare_framework.model import OpenAIModelAdapter | ||
| ``` | ||
|
|
||
| 如果下游项目可以接受修改 import,推荐直接迁到 `dare_framework.*`,不要额外做 `agentscope` 兼容包。 | ||
|
|
||
| ## 相关文档 | ||
|
|
||
| - `client/README.md`:CLI 使用方式与运行参数 | ||
| - `docs/README.md`:设计、治理和模块文档导航 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_metadata_textnow always loadsproject.readme, and this line unconditionally readsREADME.mdfrom disk, butbuild_sdiststill does not include the repository rootREADME.mdin the tarball. As a result,pip wheel <generated-sdist>(or any metadata hook run from the unpacked sdist) fails withFileNotFoundErrorduringprepare_metadata_for_build_wheel, so source-distribution installs are broken in that environment.Useful? React with 👍 / 👎.