概述
开源规则
1.不完整总比没有好 (1. Something incomplete is better than nothing at all)
If you have a piece of code and you think it is useful. Share it to the community, if this is a code snippet you can share in the form of a gist on github.
如果您有一段代码,并且您认为它很有用。 共享给社区,如果这是一个代码片段,您可以在github上以要点的形式共享。
Even if this is an incomplete peace of software put it on github. Maybe missing documentation, tests and code cleanup but share it anyway!
即使这是软件的不完全和平,也可以将其放在github上 。 也许会丢失文档,测试和代码清除,但还是要共享!
If this is only an idea, put it in aREADME file or post in to a blog.
如果仅是个主意,请将其放入自述文件或发布到博客中。
2.显式胜于隐式(老实) (2. Explicit is better than implicit (be honest))
Always include advices and notes in your project README or in code comments. If the code is incomplete and you are not sure if this is safe, please make it explicit to the community.
始终在项目自述文件或代码注释中包含建议和注释。 如果代码不完整,并且您不确定这样做是否安全,请向社区公开。
You can simply put CAUTION note:
您可以简单地提请注意:
“Use at your own risk” or “Untested alpha version do not use in prodution” notes on the project page.
项目页面上的“使用后果 自负”或“ 未经测试的Alpha版本请勿用于生产”注释。
3.小心释放 (3. Release it carefully)
Following the same principle as the item #2. If you think your software is good and has a good value to others. Or if you are wondering some kind of profit from it, do careful releases. what it means?
遵循与项目#2相同的原则。 如果您认为自己的软件不错,并且对他人有很好的价值。 或者,如果您想从中获利,请谨慎发布。 这是什么意思?
- Use versioning, tags, semantic versioning
- Only upload to the Package Distribution Central if you are sure the code is ready for production!
- 使用版本控制,标签, 语义版本控制
- 仅在确定代码已准备好投入生产时,才上传到Package Distribution Central!
In Python world everyone uses pip install to get packages from PyPI. When something is installed throught pip you consider it is ready for production, there is no sense on using a not ready software installed from package distribution, beta testers will use source code and sometimes people who installs software from pip will trust on it without reading the docs (please read the docs).
在Python世界中,每个人都使用pip install从PyPI获取软件包。 如果通过pip安装了某些东西,您认为它已经可以生产了,那么就没有使用从软件包分发中安装的尚未准备就绪的软件的感觉,beta测试人员将使用源代码,有时从pip安装软件的人会信任它而无需阅读文档(请阅读文档)。
The main problem is that broken packages on pip will be bad for Python itself!
主要问题是pip上损坏的软件包对Python本身不利!
Specially beginners will think that this is part of official Python platform. be careful!
特别是初学者会认为这是官方Python平台的一部分。 小心!
4.遵循模式 (4. Follow the patterns)
Even if you do not like your community patterns. Remember you are not alone and since your project is open sourced it belongs to the community!
即使您不喜欢自己的社区模式。 记住,您并不孤单,而且由于您的项目是开源的,因此它属于社区!
In python there is a set of good practices and PEP-8 rules. You can break some special cases (as you can read in The Zen of Python) but you need to be clear on the justification. It will be better to help and broader adoption if you follow the patterns.
在python中,有一组良好的做法和PEP-8规则。 您可以打破一些特殊情况(如您可以在《 The Zen of Python》中阅读),但是您需要清楚说明理由。 如果您遵循这些模式,最好提供帮助并广泛采用。
5.编写测试 (5. Write tests)
Maybe you do not like to follow TDD. No problem! you can write tests after development, maybe you do not care of having 100% of coverage, no problem! But please!!
也许您不喜欢遵循TDD。 没问题! 您可以在开发后编写测试,也许您不必关心100%的覆盖率,没问题! 但是,求求您!!
Write some tests.
编写一些测试。
Only you know which tests are the most important ones. Your project community will not know what to test if you do not give some hints.
只有您知道哪些测试是最重要的。 如果您没有给出任何提示,您的项目社区将不知道要测试什么。
Testing is the better way to begin contributing to a software. So write at least one test or your project doesn’t get confidence.
测试是开始开发软件的更好方法。 因此,至少要编写一个测试,否则您的项目就不会充满信心。
6.不要一直等待社区帮助,您的项目仅取决于您! (6. Do not keep waiting for community help, your project depends only on you!)
Sometimes you start a great software. Release it to github. Advertise it on blog posts and social networks. Talk about it on events. And even doing all that stuff your project doesn’t get attraction and you demotivate.
有时,您启动了出色的软件。 将其发布到github。 在博客文章和社交网络上刊登广告。 谈论事件。 甚至做所有这些事情,您的项目也不会吸引人,并且会使您失去动力。
If you think your project is good keep on rocking it!
如果您认为自己的项目很好,请继续努力!
Do not expect community help. The project depends only on you, and help and adoption will come naturally as it grows and shows its value. It can take some long time to get it.
不要期望社区的帮助。 该项目仅取决于您,随着它的成长并显示其价值,帮助和采用将自然而然。 要花费一些时间。
7.编写F **文档! (7. Write the F** Docs!)
You do not have to use some difficult documentation platform. Neither write in specific weird markup language (a.k.a RST). You can use any writing platform you want (but please don’t use a ms-word document).
您不必使用一些困难的文档平台。 都不用特定的怪异标记语言(也称为RST)编写。 您可以使用任何所需的书写平台(但请不要使用ms-word文档)。
Even more the community is adopting markdown as default and prefered for documentation. Markdown is easy and there is a lot of nice tools as MkDocs and good editors.
社区越来越多地将markdown用作默认值,并且倾向于使用它们作为文档。 Markdown很容易,并且有很多不错的工具,例如MkDocs和出色的编辑器。
You can just create a docs folder and fill it with a bunch of .md files, or you can use the built-in github wiki! Even if incomplete, write some docs, not everyone likes to use source code as reference.
您可以只创建一个docs文件夹,并用一堆.md文件填充它,也可以使用内置的github Wiki! 即使不完整,也可以编写一些文档,但并不是每个人都喜欢使用源代码作为参考。
8.写一个很棒的文档! (8. Write an awesome documentation!)
I know it is repeated, but this is important! Maybe more important than the software itself. Because without good docs your software will not be used and you will not get help!
我知道这是重复的,但这很重要! 也许比软件本身更重要。 因为没有好的文档,您的软件将无法使用,您将无法获得帮助!
Follow good examples. Even if your documentation is only a single README file you can do an fucking awesome README file!
遵循好的例子。 即使您的文档只是一个自述文件,您也可以创建一个很棒的自述文件!
9.教程,视频,博客文章 (9. Tutorials, videos, blog posts)
Well. Documentation rises again. But now in form of content drops.
好。 文档再次增加。 但是现在以内容形式下降。
You have to show users and developers how your software works and what is the value on it. You can give tips on twitter. Record screen-casts, blog posts, a nice tutorial and advertise show cases.
您必须向用户和开发人员展示您的软件如何工作以及其价值是什么。 您可以在Twitter上提供提示。 记录屏幕广播,博客文章,不错的教程并宣传展示案例。
Just do it!
去做就对了!
10.社区事项 (10. Community matters)
Build a community! It can be done with simple and small actions.
建立社区! 可以通过简单而小的操作来完成。
- Invite your friends to code in a sprint.
- Give talks on events.
- Create a nice logo and maybe a cute and funny mascot to print in stickers and stamps and give it to your friends.
- Help other projects. You can help to fix some bug in a library you are using. And then advertise that you are using that library in your own project.
- 邀请您的朋友在Sprint中进行编码。
- 就事件进行演讲。
- 创建一个漂亮的徽标,也许还创建一个可爱有趣的吉祥物,以便在贴纸和邮票上进行打印并将其发送给您的朋友。
- 帮助其他项目。 您可以帮助修复正在使用的库中的一些错误。 然后公告您正在自己的项目中使用该库。
So you will start building connections (it can grows to a whole ecosystem).
因此,您将开始建立连接(它可以扩展到整个生态系统)。
Let anyone helps!
让任何人帮助!
翻译自: https://www.pybloggers.com/2015/07/10-rules-of-open-source-projects/
开源规则
最后
以上就是秀丽黑裤为你收集整理的开源规则_开源项目的10条规则的全部内容,希望文章能够帮你解决开源规则_开源项目的10条规则所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复