Skip to content

Commit b980cb5

Browse files
committed
initial commit
0 parents  commit b980cb5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+6397
-0
lines changed

.clang-format

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file is used by clang-format to autoformat paddle source code
2+
#
3+
# The clang-format is part of llvm toolchain.
4+
# It need to install llvm and clang to format source code style.
5+
#
6+
# The basic usage is,
7+
# clang-format -i -style=file PATH/TO/SOURCE/CODE
8+
#
9+
# The -style=file implicit use ".clang-format" file located in one of
10+
# parent directory.
11+
# The -i means inplace change.
12+
#
13+
# The document of clang-format is
14+
# http://clang.llvm.org/docs/ClangFormat.html
15+
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
16+
---
17+
Language: Cpp
18+
BasedOnStyle: Google
19+
IndentWidth: 2
20+
TabWidth: 2
21+
ContinuationIndentWidth: 4
22+
MaxEmptyLinesToKeep: 2
23+
AccessModifierOffset: -2 # The private/protected/public has no indent in class
24+
Standard: Cpp11
25+
AllowAllParametersOfDeclarationOnNextLine: true
26+
BinPackParameters: false
27+
BinPackArguments: false
28+
...
29+

.gitignore

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
.hypothesis/
50+
.pytest_cache/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
db.sqlite3
60+
61+
# Flask stuff:
62+
instance/
63+
.webassets-cache
64+
65+
# Scrapy stuff:
66+
.scrapy
67+
68+
# Sphinx documentation
69+
docs/_build/
70+
71+
# PyBuilder
72+
target/
73+
74+
# Jupyter Notebook
75+
.ipynb_checkpoints
76+
77+
# IPython
78+
profile_default/
79+
ipython_config.py
80+
81+
# pyenv
82+
.python-version
83+
84+
# celery beat schedule file
85+
celerybeat-schedule
86+
87+
# SageMath parsed files
88+
*.sage.py
89+
90+
# Environments
91+
.env
92+
.venv
93+
env/
94+
venv/
95+
ENV/
96+
env.bak/
97+
venv.bak/
98+
99+
# Spyder project settings
100+
.spyderproject
101+
.spyproject
102+
103+
# Rope project settings
104+
.ropeproject
105+
106+
# mkdocs documentation
107+
/site
108+
109+
# mypy
110+
.mypy_cache/
111+
.dmypy.json
112+
dmypy.json
113+
114+
# Pyre type checker
115+
.pyre/
116+
117+
# pycharm
118+
.DS_Store
119+
.idea/
120+
FETCH_HEAD
121+
122+
# vscode
123+
.vscode
124+
125+
# numpy
126+
.npy
127+
128+
# vtk
129+
.vtk

.pre-commit-config.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
repos:
2+
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
3+
sha: v1.0.1
4+
hooks:
5+
- id: remove-crlf
6+
files: (?!.*third_party)^.*$ | (?!.*book)^.*$
7+
- repo: https://github.com/PaddlePaddle/mirrors-yapf.git
8+
sha: 0d79c0c469bab64f7229c9aca2b1186ef47f0e37
9+
hooks:
10+
- id: yapf
11+
files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
12+
- repo: https://github.com/pre-commit/pre-commit-hooks
13+
sha: 5bf6c09bfa1297d3692cadd621ef95f1284e33c0
14+
hooks:
15+
- id: check-added-large-files
16+
- id: check-merge-conflict
17+
- id: check-symlinks
18+
- id: detect-private-key
19+
files: (?!.*third_party)^.*$ | (?!.*book)^.*$
20+
- id: end-of-file-fixer
21+
- repo: local
22+
hooks:
23+
- id: clang-format-with-version-check
24+
name: clang-format
25+
description: Format files with ClangFormat.
26+
entry: bash ./tools/codestyle/clang_format.hook -i
27+
language: system
28+
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto)$
29+
- repo: local
30+
hooks:
31+
- id: cpplint-cpp-source
32+
name: cpplint
33+
description: Check C++ code style using cpplint.py.
34+
entry: bash ./tools/codestyle/cpplint_pre_commit.hook
35+
language: system
36+
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$
37+
- repo: local
38+
hooks:
39+
- id: pylint-doc-string
40+
name: pylint
41+
description: Check python docstring style using docstring_checker.
42+
entry: bash ./tools/codestyle/pylint_pre_commit.hook
43+
language: system
44+
files: \.(py)$
45+
- repo: local
46+
hooks:
47+
- id: copyright_checker
48+
name: copyright_checker
49+
entry: python ./tools/codestyle/copyright.hook
50+
language: system
51+
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|py|sh)$
52+
exclude: |
53+
(?x)^(
54+
paddle/utils/.*
55+
)$

.readthedocs.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
submodules:
9+
include: all
10+
recursive: true
11+
12+
# Build documentation in the docs/ directory with Sphinx
13+
sphinx:
14+
configuration: docs/conf.py
15+
16+
# Optionally build your docs in additional formats such as PDF
17+
#formats:
18+
# - pdf
19+
20+
# Optionally set the version of Python and requirements required to build your docs
21+
python:
22+
version: 3.7
23+
install:
24+
- requirements: docs/requirements.txt
25+
- requirements: requirements.txt
26+
- method: setuptools
27+
path: .
28+
system_packages: true

0 commit comments

Comments
 (0)