feat(PyAPI): 🚧 complete the structure of PyAPI, finish communication module - #88
Merged
Conversation
Timothy-Liuxf
requested changes
Jan 24, 2023
Member
There was a problem hiding this comment.
- 给 Python 加个 Gitignore 吧。可以把 这个 Gitignore 给 Copy 过来,放到 Python 的目录里
- Python 生成的文件最好不要放到仓库里,毕竟 Python 的 gRPC 比较好装(不如说像 C++ 那样不好装的才不正常,C++ 全放到仓库属于是没办法的办法 x)。可以直接在 Python 项目的根目录里放一个
requirements.txt,里面写上:然后选手在本地直接grpcio==x.yy.z(换成版本号) grpcio_tools==x.yy.z
python3 -m pip install -r requirements.txt就行了(很多代码扫描工具包括一些 serverless 服务也是根据requirements.txt扫描依赖的)。反正选手要跑 gRPC 的 Python 程序都肯定是要装的。然后给选手一个脚本init.sh(UNIX)和init.cmd(Windows)去运行,让选手在本地创建 proto 文件夹并生成.py和.pyi文件就可以。并且记得在 Gitignore 里把 proto 文件夹给 ignore 掉。
Member
|
哦对,顺便歪个楼并提一句,根据 我的调查, |
Timothy-Liuxf
requested changes
Jan 25, 2023
Timothy-Liuxf
approved these changes
Jan 25, 2023
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…ommunication module
Descriptions of this pull request:
No additional discription.