-
Notifications
You must be signed in to change notification settings - Fork 12
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
基于 Itchat 为 Python Wechaty 实现社区首个 Python 语言的本地 Puppet #75
Comments
参与计划: |
This is my proposal for this project: Click here |
@jingdong00 @lyleshaw Welcome! Please notice that, in this project, we will need to use |
[基于 Itchat 为 Python Wechaty 实现社区首个 Python 语言的本地 Puppet] 进度报告日期:2021-07-04 本周完成的成果
本周遇到的困难和需要配合的地方
下周的开发计划和预计成果
其他需要说明和同步的事项暂无 |
[基于 Itchat 为 Python Wechaty 实现社区首个 Python 语言的本地 Puppet] 进度报告日期:2021-07-12 本周完成的成果
本周遇到的困难和需要配合的地方
下周的开发计划和预计成果
其他需要说明和同步的事项该周由于上课和准备来京,所以进度不多... |
[基于 Itchat 为 Python Wechaty 实现社区首个 Python 语言的本地 Puppet] 进度报告日期:2021-07-18 本周完成的成果
本周遇到的困难和需要配合的地方
payload = EventScanPayload(
status=ScanStatus.Waiting,
qrcode=uuid,
data=payload_data.get('data', None))
self._event_stream.emit('scan', payload) 不理解qrcode和data的具体含义 下周的开发计划和预计成果
其他需要说明和同步的事项该周由于实习第一周,熟悉工作,因而进度较慢。 |
Congratulation! Looking forward to using native Python Wechaty soon! |
项目中期报告项目信息项目名称基于 Itchat 为 Python Wechaty 实现社区首个 Python 语言的本地 Puppet 方案描述L0阶段: L1阶段: L2阶段: L3阶段: L4阶段: *L5阶段: 时间规划第一阶段(7月-8月)
第二阶段(8月-10月)
项目进度已完成工作
当前效果展示遇到的问题及解决方案困难1:对 CI/CD 中的各项工具不熟悉,推代码时遇到困难。 解决方案:根据导师推荐的资料,学习 GitHub Action 、 MakeFiles 、 pre-commit 等工具的用法,并配置 GPG key 等。 困难2:在 Wechaty Puppet 中无法正常使用 Itchat 的函数。 解决方案:根据导师的建议,深入了解了 Python 协程,将 Itchat 函数全部改为异步函数后得以解决。 后续工作安排0815 - 0820 : 解决当前关于 AsyncIOEventEmitter 与 Itchat 事件顺序混乱的问题; 0821 - 0831 : 完成 Itchat 中 create_chatroom 、 set_chatroom_name 等关于 User 和 Room 部分接口的封装; 0901 - 0915 : 完成单元测试和代码优化; 0916 - 0930 : 考虑实现 Wechaty 接口中存在,但 Itchat 中没有的几个接口; 1001 - 1025 : 时间精力充足的情况下,完成对 Itchat 的重构工作,并在重构代码上修改 python-wechaty-puppet-itchat 的代码 |
评审结果
|
[blibli] 中期汇报视频:https://www.bilibili.com/video/BV1Ef4y1G7hE/ |
I have a question: how did we dependence the ItChat from our code base? It is good practice if we are dependencies it from our requirements.txt. if we are copying the code to our repo, we should change it back to use the pip module dependence before we release this project. Which means that we should dependence the itchat pip module from our project, and send PRs to our upstream when there's anything we can contribute. |
python-wechaty is a async-based package, but ItChat is sync-based package which will occur some call problems: sync-program will call async-progrom. It can't call it directly, and should make some changes. There are two ways:
This is the final solution that we have researched. So, is there any suggestion about this problem & solution ? @huan |
From my understanding:
So it should be no problem for us to call the Sync program from Async? |
Yes, there is no problem for Buuuuuuuuut, It seems that we can add adapter in this event calling. This adapter will be the inner connector between itchat and python-wechaty. I have not found this method before. I think I will make test with it later. |
Awesome! I believe we should add an adapter in this event handling, and then we will be able to dependence Itchat based on that. |
结项报告模板项目信息
项目总结
后续安排
总结在本次开源之夏活动中,很荣幸中选 通过对 Puppet Itchat 的开发,我收获的不仅仅是技术与代码规范上的提升,更是体会到了开源的魅力所在。 而该项目的完成,首先需要感谢 京京 老师,没有他对我的帮助我可能无法在这么短的时间内解决所遇到的问题,同时他解决问题的思路也带给我很大的提升。同时也感谢 卓桓、佳芮 等老师,他们在我开发时提出了许多宝贵的建议且提供了很多帮助。 最终还是要感谢 Wechaty 社区与 开源之夏主办方,前者让我在这里认识到了许多可敬的老师与可爱的小伙伴,而倘若没有后者,我也不会有如此充实的假期。 |
[blibli] 结项汇报视频:https://www.bilibili.com/video/BV1z34y1U7MR/ |
开源软件供应链点亮计划
“开源软件供应链点亮计划-暑期2021”(以下简称 暑期2021)是由中科院软件所与 openEuler 社区共同举办的一项面向高校学生的暑期活动,旨在鼓励在校学生积极参与开源软件的开发维护,促进国内优秀开源软件社区的蓬勃发展。
根据项目的难易程度和完成情况,参与者还可获取“开源软件供应链点亮计划-暑期2021”活动奖金和奖杯。
官网:https://summer.iscas.ac.cn
Wechaty
Wechaty 是一个开源聊天机器人框架SDK,具有高度封装、高可用的特性,支持NodeJs, Python, Go 和Java 等多语言版本。在过去的5年中,服务了数万名开发者,收获了 Github 的 9600 Star。同时配置了完整的DevOps体系并持续按照Apache 的方式管理技术社区。
项目名称
基于 Itchat 为 Python Wechaty 实现社区首个 Python 语言的本地 Puppet
背景介绍
Wechaty 社区目前已经支持微信、Whatsapp、企业微信、飞书等常见流行即时通讯工具,并且能够通过多语言 SDK (比如 Python Wechaty) 进行调用。
Python Wechaty 目前通过 Puppet Service 模块,基于 gRPC 与 TypeScript 语言的服务器进行通讯,实现对 Python 语言的支持。
我们在本次 Summer 2021 的项目中,希望可以开发一个基于 Python 语言的 Wechaty Puppet Provider 实现(模块名:wechaty-puppet-itchat),通过封装 Itchat ,使其成为 Python Wechaty 可以使用的社区生态模块。
需求介绍
使用 https://github.com/wechaty/python-wechaty-puppet-service 项目作为模版,将核心代码文件 https://github.com/wechaty/python-wechaty-puppet-service/blob/master/src/wechaty_puppet_service/puppet.py 中的 gRPC 调用,全部替换(封装)为 Itchat 模块的调用。
在初期开发中,能够实现文本消息的接收和发送,即可完成原型验证 POC 。
除了 Python 代码之外,还可以参考以下两个链接:
项目难度
中(奖金:9000元)
导师联系方式
吴京京:Python Wechaty creator, Wechaty committer, Microsoft Research Asia Intern
项目产出目标
python-wechaty-puppet-itchat
examples/ding-dong-bot.py
,完成“接收到文字消息ding
时,自动回复消息dong
"的功能项目技术栈
Hello students!
We want Wechaty to be the universal instant messaging SDK on all IM platforms for chatbot makers to build their great conversational user interface, so while these are our ideas of what we think would make good projects for the summer, we're eager to hear your ideas and proposals as well.
Try us out and get to know the Wechaty code with examples!
What we want to do
Implement Itchat Puppet (ItChat) for Python Wechaty. The Puppet abstraction allows Wechaty to provide a consisting API on all IM platforms for build a chatbot. We have lots of puppet providers in TypeScript already, and we want to support our first Python Wechaty Puppet so that our Python developers can run their chatbots out-of-the-box with the Web protocol of WeChat.
Useful Links
The text was updated successfully, but these errors were encountered: