Skip to content

Conversation

@dzhwinter
Copy link
Contributor

fix #8220

@shanyi15 shanyi15 requested a review from luotao1 March 6, 2018 13:10
@@ -1,5 +1,16 @@
开发标准
========
PaddlePaddle遵守如下三个部分的开发标准。
Copy link
Contributor

Choose a reason for hiding this comment

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

image
github上的显示格式不对,全文请重新调整。也可参考http://www.paddlepaddle.org/docs/develop/documentation/zh/howto/cluster/multi_cluster/index_cn.html 的格式。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.


此外,Paddle项目推荐使用docker作为开发环境。对于GPU环境,使用nvidia-docker,统一开发和集成环境。

.. toctree::
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

========
PaddlePaddle遵守如下三个部分的开发标准。
- 代码风格
Paddle中包含了Cuda, C++, Python, Shell等多种编程语言。Cuda, C++的开发标准遵守Google C++ Style, 并加入了一些定制规则,https://github.com/PaddlePaddle/cpp-primer-digest。Python的开发标准遵守PEP-8标准, Shell遵守Google Shell Style。以上风格在提交代码时候, 代码库会通过pre-commit, clang-format自动化工具做风格检查。不满足风格要求的代码会编译失败。pre-commit也会自动format, 协助修改代码格式。
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Paddle-》PaddlePaddle,全文请改。
  2. 这里讲的太过详细,”如何贡献代码“中都没有写各种标准。可以将这里的标准挪进”如何贡献代码“中,这里一句话概括即可。
Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Paddle面向国内外用户,包含了中文和英文两部分的文档。设计文档和issue问题描述都推荐使用英文。对于设计文档,重在问题描述,背景阐述,然后才是解决方案。API文档由Sphinx生成,因此代码注释需要符合Sphinx文档标准。同样的,Paddle的集成测试工具会检测文档格式。推荐本地使用docker编译生成文档,本地修复文档。

- 框架定制
Paddle V2使用新增Layer方式定义新的操作。定制Layer前请参阅已有的Layer, 如有通用性, 欢迎提交Layer实现。如何定制一个新的Layer见如下表。
Copy link
Contributor

@luotao1 luotao1 Mar 6, 2018

Choose a reason for hiding this comment

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

请重新组织下语句

  • 参阅已有的Layer,是指参阅已有api进行组合么?
  • 如有通用性:是指新增的layer具有通用性?
  • 见下表:下面没有表。
Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@dzhwinter dzhwinter changed the title "add some lines" "add develop standard" Mar 8, 2018
@wangkuiyi
Copy link
Collaborator

@dzhwinter Thanks for this PR. Just a reminder -- let us keep the English version and Chinese version consistent with each other.

@luotao1
Copy link
Contributor

luotao1 commented Mar 8, 2018

@wangkuiyi For this PR, we will modify the Chinese documents first, and organize a group of translation from Chinese to English later since there are a lot of English documents missing. (related #8801 (comment))

开发标准
========
PaddlePaddle遵守如下三个部分的开发标准。
PaddlePaddle遵守如下三个部分的代码和文档规范
Copy link
Contributor

Choose a reason for hiding this comment

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

第3行缺句号。


- 代码风格
Paddle中包含了Cuda, C++, Python, Shell等多种编程语言。Cuda, C++的开发标准遵守Google C++ Style, 并加入了一些定制规则,https://github.com/PaddlePaddle/cpp-primer-digest。Python的开发标准遵守PEP-8标准, Shell遵守Google Shell Style。以上风格在提交代码时候, 代码库会通过pre-commit, clang-format自动化工具做风格检查。不满足风格要求的代码会编译失败。pre-commit也会自动format, 协助修改代码格式。
PaddlePaddle中包含了Cuda, C++, Python, Shell等多种编程语言。语言规范遵守Google C++ Style, Pep-8, 代码库中包含自动化检查工具做风格检查。不满足风格要求的代码会编译失败。pre-commit也会自动format, 协助修改代码格式。
Copy link
Contributor

Choose a reason for hiding this comment

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

如何贡献代码这篇文档中,不只是讲代码风格,还讲了github的一些操作。

  • 这段概述并不全,请再加一点。
  • 去掉“代码风格”这个标题,下同。去掉”文档格式和框架开发”“。其中“文档格式“也不足以概括如何贡献文档这篇。
  • 请加上“请参阅如下文档,我们提供了如下指南”类似这样的话,最后“框架定制”那儿有写。

此外,Paddle项目推荐使用docker作为开发环境。对于GPU环境,使用nvidia-docker,统一开发和集成环境。
- 文档格式
PaddlePaddle面向国内外用户,包含了中文和英文两部分的文档。设计文档和issue问题描述都推荐使用英文。对于设计文档,重在问题描述,背景阐述,然后才是解决方案。API文档由Sphinx生成,因此代码注释需要符合Sphinx文档标准。同样的,PaddlePaddle的集成测试工具会检测文档格式。推荐本地使用docker编译生成文档,本地修复文档。
Copy link
Contributor

Choose a reason for hiding this comment

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

  • PaddlePaddle的集成测试工具会检测文档格式: 这个在对应文档中并没有说明,只是一个预览工具。
  • 不仅是API文档由sphinx生成,其他文档也是由sphinx生成的。
  • 推荐本地使用paddlepaddle.org工具编译生成和预览文档。
write_docs_cn.rst

- 框架定制
PaddlePaddle V2使用新增Layer方式定义新的操作。组合基础api可以实现多种复杂Layer, 满足绝大多数应用。如需要定制Layer,请参阅如下文档,欢迎提交patch.
Copy link
Contributor

Choose a reason for hiding this comment

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

  • api需要大写。
  • 欢迎提交pull request。最后一个英文句号要改成中文句号。

new_layer_cn.rst

此外,PaddlePaddle项目推荐使用docker作为开发环境。对于GPU环境,使用nvidia-docker,统一开发和集成环境。
Copy link
Contributor

Choose a reason for hiding this comment

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

去掉项目两字。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks very much!

@luotao1 luotao1 merged commit f8b8f6c into PaddlePaddle:develop Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants