Skip to content

feat(PyAPI): 🚧 complete the structure of PyAPI, finish communication module - #88

Merged
DragonAura merged 5 commits into
eesast:devfrom
DragonAura:dev
Jan 25, 2023
Merged

feat(PyAPI): 🚧 complete the structure of PyAPI, finish communication module#88
DragonAura merged 5 commits into
eesast:devfrom
DragonAura:dev

Conversation

@DragonAura

Copy link
Copy Markdown
Collaborator

…ommunication module

Descriptions of this pull request:

No additional discription.

@Timothy-Liuxf Timothy-Liuxf changed the title feat(PyAPI): 🚧 complete the structure of PyAPI, finish c… feat(PyAPI): 🚧 complete the structure of PyAPI, finish communication module Jan 24, 2023

@Timothy-Liuxf Timothy-Liuxf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 给 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 掉。

Comment thread PyAPI/.gitattributes Outdated
Comment thread dependency/proto/py_output.sh Outdated
@Timothy-Liuxf

Timothy-Liuxf commented Jan 24, 2023

Copy link
Copy Markdown
Member

哦对,顺便歪个楼并提一句,根据 我的调查CAPI 最开始貌似其实是 Communication API 的缩写,而非 C++ API 的缩写)
不过给变个含义也不是不可以(bushi

Comment thread .gitignore Outdated
@DragonAura
DragonAura merged commit a89adba into eesast:dev Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants