当前位置:网站首页>Become a Contributor in 30 minutes | How to participate in OpenHarmony's open source contributions in multiple ways?
Become a Contributor in 30 minutes | How to participate in OpenHarmony's open source contributions in multiple ways?
2022-08-01 18:52:00 【OpenHarmony Developer Community】
30minutes becomeContributor|如何多方位参与OpenHarmony开源贡献?
如何优雅地参与开源贡献,向顶级开源项目提交 PR(Pull Request).战“码”The eighth phase of Pioneer's live broadcast room revolves around“OpenAtom OpenHarmony(以下简称“OpenHarmony”)开源贡献”话题,邀请了深圳开鸿数字产业发展有限公司(以下简称“深开鸿”)资深OS框架开发工程师巴延兴为大家带来《如何多方位参与OpenHarmony开源贡献》主题分享.
本次分享主要介绍了巴延兴带领深开鸿开源共建团队在主导/共建16个SIG、贡献超过50万行代码的OpenHarmony “战码”经验,在根技术、垂直领域、生态扩展等多方位参与开源贡献的实践与思考,以及辅助工具SIG和内核SIGContribution of the two sectors、价值与用途,希望有更多开发者参与开源共建.
参与战“码”先锋,PR征集令!Interested developers canGitee的OpenHarmony代码仓提交PR参与活动,和全球开发者同台竞技,比拼技艺,为OpenHarmony生态建设贡献力量.
如何通过SIGMake open source contributions
什么是SIG?
SIG全称Special Interest Group,即特别兴趣小组,专注一个特定的技术领域,负责该领域技术竞争力分析和关键技术识别及决策,Leading the direction of technological evolution,也是共建单位及个人开发者Make open source contributions的基本单位.
通过SIG组参与开源共建的两种方式
一、participate in existingSIG的共建
参与者需要注册自己的官方账号,签订协议后,to pass the acceptanceSIG leader发布的需求来承接共建任务.领完需求后是标准的开发过程,包括需求分析、功能设计、代码开发、功能测试、Function to deliver step;After the task is developed,需要提交PR,将代码、Documents, etc. are submitted to the community,Complete the final open source contribution.
二、主导SIG组
1、成立SIG
选取共建技术领域并给出规划 → 向PMC例会提交议题并通过评审 → 通过架构SIG例会评估后建立新的代码仓.
2、孵化SIG
Startup Requirements Clarification、Feature sorting scheme design、代码开发、单元测试、Functional testing and other processes,完成SIG项目开发 → 对照Check List,complete legal、门禁、OATself-check.
3、毕业SIG
向架构SIG申请新SIG毕业 → 向QA SIGCan apply for a newSIG准出 → 仓库owner移仓.
辅助工具SIG实践经验分享
establishment aidsSIGThe purpose of the group is to“Reduce duplication of effort,提高工作效率,让专业的人做专业的事”.NAPIFramework Code Generation Tool、IDL转换工具和开机动画工具都是围绕着这个宗旨开发而成的.
一、NAPIFramework Code Generation Tool
NAPIon standard equipmentJS API实现方式,实现了JSlanguage to frameC++层的调用,在OpenHarmony系统中,APPCall is callJSLanguage interface functions,The final specific function is to useC++语言来实现.
NAPI存在三个开发痛点需要解决:
1、NAPIHigh repetition rate of framework code:面对不同的JS接口,开发者要实现相似度高的框架代码.
2、NAPIThe learning cost of the framework is high:The framework mechanism involved inJavaScript、C++语言,and compile script tools.
3、NAPI 需求量大:OpenHarmonySystem functions areNAPI接口体现,目前已经支持1万多个NAPI接口.
For the above three pain points,NAPIThe framework code generation tool willC++ 、JavaScript接口类型转换等代码抽取公共模块,And automatically generate compile scripts.开发者使用工具自动生成NAPI框架代码,只需实现业务代码调用即可,Avoid a lot of repetitive work.
二、IDL转换工具
OpenHarmony使用的是HDF驱动框架,Drive the corresponding hardware information requiredIDL文件来描述.
IDL存在两大开发痛点需要解决:
1 、HDI开发难度大:HDIDevelopers are more familiar withC语言,习惯在.h文件中定义HDI接口,而对于IDL文件结构、The syntax is not very familiar,Relatively long learning curve.
2、HDI工作量大:HDI接口是驱动对外提供服务的必要条件,Each subsystem involves,故HDI工作量较大.
针对以上痛点,Designed by Shenzhen KaihongIDLConversion tools will be familiar to developers.h文件自动转换为idl文件,开发者只需要在头文件中定义自己的接口即可,Tool automation.h头文件到IDL文件转换,开发者不需要关心IDL语法,大大降低工作量.
三、开机动画工具
开机动画工具是我们早期针对OpenHarmony2.0版本存在的问题做的一个辅助工具.
OpenHarmony2.0版本在开机动画方面有两个问题:
1、OpenHarmony2.0Version boot animation only supportsraw文件,不利于开发者在发行版和定制版进行直接展现.
2、Because of the different forms of products,对于不同的产品,其开机动画的需求也是不同.
通过开机动画辅助工具使以上两个问题得到了更好地解决:
1、开机动画工具支持图片集或者 mp4等多种文件生成开机动画,且支持设置开机动画的分辨率等操作,更加方便开机动画的制作.
2、做到一键生成开机动画文件,并且支持在 windowsView its effect on the platform,不需要每次都去烧录到开发板上,大大降低了演示的工作量.
四、辅助工具SIGCo-construction direction
目前深开鸿主导的辅助工具SIG组主要提供给开发者文档资料、Test cases and tool development3co-construction direction.
If you are good at documentation,那么可以参与到社区的文档贡献,撰写文档可以不需要有很强的开发能力.
如果你是测试人员,Good at automated testing,那么通过测试用例也可以参与到社区的建设.
另外也欢迎各位开发者参与到各种工具的建设中来.SIG组的工具可以是独立的工具,也可以通过插件的方式集成到IDE开发软件中.
五、Engagement aidsSIGspecific ways to contribute
1、提交问题单.either documentbug、测试用例的bug、still codebug,提交了问题单就是对社区做了贡献,then aidsSIGHow to submit a question sheet?
首先找到对应的仓库并登录,例如https://gitee.com/openharmony/napi_generator/issues.
提交过程中要注意格式要求,必须写清楚提单过程中问题出现的条件,The expected result and incorrect results,problem location information, etc.,有了这些信息后,领取这个问题单的开发也方便定位问题.
登录找到想要认领的问题单的页面,在评论中表达出想要承接这个需求的意愿,SIG的负责人会定期跟踪这些问题单并做出答复.
2、Development process after claiming requirements
领到一个需求后要进行正常的开发,The core is divided into the following6步:
①通常开发者已经配置好配置码云账号、Personal email and signatureDCO(签署DCOMainly to ensure that contributors are original),After these pre-work,我们可以操作代码仓库进行需求的开发.
②Forkcode to private warehouse.
③克隆fork出来的仓库到自己的主机上.
④在本地开发代码开发和功能验证.
⑤开发完毕后向官方原始仓提交Pull Request,提交代码后会触发门禁等常规检查.
⑥如果这个sigThe group is your own,那么作为Committer,Need to review code submitted by others,If only to participate in the co-construction,提交完代码通过门禁就完成任务.
内核SIGParticipate in the co-construction experience
About Shenzhen Kaihong KernelSIGCo-construction experience,下面将以文件系统的优化为实例向大家分享具体的贡献过程.
There are many directions for kernel co-construction,体系架构有各个硬件平台的移植,Power Management in Kernel Modules、时间管理、任务调度、中断管理、文件系统、Three-party library related kernelshellcommand porting,目前深开鸿主要在文件系统和第三方库方面做社区共建.深开鸿希望将来展开更多方向的优化工作,并向外提供具体场景下内核系统移植方案.
littlefsFile system co-construction process:
1、Understand community needs,社区目前对littlefs文件系统随机读写的速度不满意.
2、了解到社区文件系统对随机读写需求的前提下,对littlefs随机读写IOAnalyze performance bottlenecks,Find code points that can be optimized,采用了“以空间换时间”的思路.
3、Adopt a step-by-step optimization approach,明确方案后和社区负责人沟通,得到了社区负责人认可后,Expand specific code work.
由于文件系统优化是一个比较复杂的过程,下面分享了一套社区共建流程.
1、After claiming demand from the community,通过微信群的方式和社区负责人沟通并澄清需求.
2、从技术上分析需求并制定优化方案,Communicate with community leaders again,Discuss and get approval.
3、specific task development,Including task teardown、编码实现、测试,最后提交PR.
针对littlefs文件系统优化过程中修改涉及到的相关文件,包括littlefs文件代码,也就是点c和点h文件;There are also compilation related files,即.gn文件gni文件,之所以修改编译相关的文件是为了测试littlefs的优化后的代码,我们团队增加了相关的测试用例,这些测试用例会调用内核文件系统的API,涉及到这些编译相关的文件.
littlefs第三方库代码完成后提交到社区的过程
1、littlefs第三方库repository路径,并forkTo the user warehouse.
2、git cloneUser warehouse to local.
3、Submit changes to the user repository.
4、点击提交PR.
5、填写PR单,PR单页需要按照既定模板填写,Write clearly the original requirements,如何解决这个问题,怎么解决这个问题以及具体修改点.
6、在评论中添加“start build”点亮PR.There is a special point to note here,Need to be manually filled in the comments“start build”这2个英文单词,目的是触发后续的门禁检测.这是OpenHarmonyThe community is special,其它开源项目中所没有的.
欢迎感兴趣的开发者多方位参与OpenHarmony开源贡献,成为OpenHarmony Contributor,也欢迎各位提出宝贵的意见,为OpenHarmony贡献一份力量.
参与战“码”先锋,PR 征集令!在Gitee的OpenHarmony代码仓提交PR参与活动,和全球的开发者一起共建OpenHarmony的繁荣生态!
A summary of the links involved in the article:
NAPIFramework Code Generation Tool代码仓地址:
https://gitee.com/openharmony/napi_generator
IDLConversion tool code warehouse address:
https://gitee.com/openharmony/drivers_hdf_core/tree/master/framework/tools/idl-gen
开机动画工具代码仓地址:
https://gitee.com/openharmony/graphic_graphic_2d/tree/master/frameworks/bootanimation/data/bootanimation_tool
Forward the original text to the circle of friends,Private letter official assistant,Access to lecturer speechesPPT
原文链接:30minutes becomeContributor|如何多方位参与OpenHarmony开源贡献? (qq.com)
边栏推荐
猜你喜欢
MySQL Lock wait timeout exceeded; try restarting transaction 锁等待
Zabbix6.0 DingTalk robot alarm
MySQL数据库————流程控制
How many steps does it take to convert an ENS domain name into music?
Prometheus's Recording rules practice
How opencv implements image skew correction
深入浅出Flask PIN
在Map传值与对象传值中模糊查询
Stop using MySQL online DDL
JVM运行时数据区与JMM内存模型是什么
随机推荐
【木棉花】#夏日挑战赛# 鸿蒙小游戏项目——数独Sudoku(3)
C#/VB.NET 从PDF中提取表格
C#/VB.NET: extracted from the PDF document all form
MySQL关系型数据库事务的ACID特性与实现方法
WinRAR | 将多个安装程序生成一个安装程序
explain 各字段介绍
Leetcode72. Edit Distance
AntDB database appeared in the 24th high-speed exhibition, helping smart high-speed innovative applications
【LeetCode】Day109-the longest palindrome string
Summer vacation first week wrap-up blog
Industry Salon Phase II丨How to enable chemical companies to reduce costs and increase efficiency through supply chain digital business collaboration?
Screen: GFF, OGS, Oncell, Incell of full lamination process
如何记录分析你的炼丹流程—可视化神器Wandb使用笔记【1】
直播系统聊天技术(八):vivo直播系统中IM消息模块的架构实践
阿里云的域名和ip绑定
Summer vacation second week wrap-up blog
What is the JVM runtime data area and the JMM memory model
Hardware Bear Original Collection (Updated 2022/07)
123123123123
成都理工大学&电子科技大学|用于强化学习的域自适应状态表示对齐