Skip to content

Commit 0f1a405

Browse files
committed
chore: add hidden files
1 parent 9fb4516 commit 0f1a405

File tree

8 files changed

+387
-0
lines changed

8 files changed

+387
-0
lines changed

.clang-format

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2024-present Alibaba Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
Language: Cpp
17+
BasedOnStyle: Google
18+
ColumnLimit: 100
19+
IndentWidth: 4
20+
AccessModifierOffset: -3
21+
AllowShortFunctionsOnASingleLine: Empty

.clang-tidy

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright 2024-present Alibaba Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
Checks: |
17+
bugprone-argument-comment,
18+
bugprone-assert-side-effect,
19+
bugprone-bool-pointer-implicit-conversion,
20+
bugprone-dangling-handle,
21+
bugprone-dynamic-static-initializers,
22+
bugprone-forward-declaration-namespace,
23+
bugprone-inaccurate-erase,
24+
bugprone-redundant-branch-condition,
25+
bugprone-string-constructor,
26+
bugprone-string-integer-assignment,
27+
bugprone-suspicious-memset-usage,
28+
bugprone-suspicious-realloc-usage,
29+
bugprone-terminating-continue,
30+
bugprone-throwing-static-initialization,
31+
bugprone-unique-ptr-array-mismatch,
32+
bugprone-unused-raii,
33+
bugprone-use-after-move,
34+
bugprone-virtual-near-miss,
35+
misc-misleading-identifier,
36+
misc-homoglyph,
37+
clang-diagnostic-*,
38+
-clang-diagnostic-global-constructors,
39+
-clang-diagnostic-sign-compare,
40+
clang-analyzer-*,
41+
-clang-analyzer-alpha*,
42+
-clang-analyzer-cplusplus.NewDeleteLeaks,
43+
google-*,
44+
-google-default-arguments,
45+
modernize-*,
46+
-modernize-return-braced-init-list,
47+
-modernize-avoid-c-arrays,
48+
-modernize-use-trailing-return-type,
49+
-modernize-use-nodiscard,
50+
-modernize-pass-by-value,
51+
# produce HeaderFilterRegex from cpp/build-support/lint_exclusions.txt with:
52+
# echo -n '^('; sed -e 's/*/\.*/g' cpp/build-support/lint_exclusions.txt | tr '\n' '|'; echo ')$'
53+
HeaderFilterRegex: '^(?!.*third_party/).*'
54+
CheckOptions:
55+
- key: google-readability-braces-around-statements.ShortStatementLines
56+
value: '1'
57+
- key: google-readability-function-size.StatementThreshold
58+
value: '800'
59+
- key: google-readability-namespace-comments.ShortNamespaceLines
60+
value: '10'
61+
- key: google-readability-namespace-comments.SpacesBeforeComments
62+
value: '2'
63+
- key: modernize-use-emplace.IgnoreImplicitConstructors
64+
value: 1

.cmake-format.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#
2+
# Copyright 2024-present Alibaba Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# How wide to allow formatted cmake files
18+
line_width = 90
19+
20+
# How many spaces to tab for indent
21+
tab_size = 4
22+
23+
# If a positional argument group contains more than this many arguments,
24+
# then force it to a vertical layout.
25+
max_pargs_hwrap = 4
26+
27+
# If the statement spelling length (including space and parenthesis) is
28+
# smaller than this amount, then force reject nested layouts.
29+
# This value only comes into play when considering whether or not to nest
30+
# arguments below their parent. If the number of characters in the parent
31+
# is less than this value, we will not nest.
32+
min_prefix_chars = 32
33+
34+
# If true, separate flow control names from their parentheses with a space
35+
separate_ctrl_name_with_space = False
36+
37+
# If true, separate function names from parentheses with a space
38+
separate_fn_name_with_space = False
39+
40+
# If a statement is wrapped to more than one line, than dangle the closing
41+
# parenthesis on it's own line
42+
dangle_parens = False
43+
44+
# What style line endings to use in the output.
45+
line_ending = "unix"
46+
47+
# Format command names consistently as 'lower' or 'upper' case
48+
command_case = "lower"
49+
50+
# Format keywords consistently as 'lower' or 'upper' case
51+
keyword_case = "unchanged"
52+
# enable comment markup parsing and reflow
53+
enable_markup = False
54+
55+
# If comment markup is enabled, don't reflow the first comment block in
56+
# eachlistfile. Use this to preserve formatting of your
57+
# copyright/licensestatements.
58+
first_comment_is_literal = True
59+
60+
# If comment markup is enabled, don't reflow any comment block which
61+
# matches this (regex) pattern. Default is `None` (disabled).
62+
literal_comment_pattern = None

.codespell_ignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
nin
2+
testin
3+
mor
4+
writen
5+
noo
6+
CHECKIN
7+
thirdparty
8+
VisitIn
9+
NotIn
10+
Collet
11+
convertor

.devcontainer/Dockerfile.template

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Adapted from Apache Iceberg C++
19+
# https://github.com/apache/iceberg-cpp/blob/main/.devcontainer/Dockerfile.template
20+
21+
# This Dockerfile is used to build a development container for Paimon C++.
22+
# It is based on the Ubuntu image and installs necessary dependencies.
23+
24+
FROM ubuntu:24.04
25+
26+
# Install necessary packages
27+
RUN apt update && \
28+
apt install -y \
29+
bash-completion \
30+
build-essential \
31+
ccache \
32+
cmake \
33+
curl \
34+
gcc \
35+
g++ \
36+
git \
37+
htop \
38+
libboost-all-dev \
39+
libcurl4-openssl-dev \
40+
libssl-dev \
41+
libxml2-dev \
42+
lsb-release \
43+
meson \
44+
ninja-build \
45+
pkg-config \
46+
python3 \
47+
python3-pip \
48+
vim \
49+
wget \
50+
sudo \
51+
&& rm -rf /var/lib/apt/lists/*
52+
53+
# Add a user for development
54+
RUN useradd -ms /bin/bash paimon && \
55+
usermod -aG sudo paimon && \
56+
echo "paimon ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/paimon && \
57+
chmod 0440 /etc/sudoers.d/paimon
58+
59+
# Switch to the paimon user
60+
USER paimon
61+
WORKDIR /home/paimon
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
// Adapted from Apache Iceberg C++
21+
// https://github.com/apache/iceberg-cpp/blob/main/.devcontainer/devcontainer.json.template
22+
23+
{
24+
"name": "Paimon CPP Dev Container",
25+
"build": {
26+
"dockerfile": "Dockerfile"
27+
},
28+
"runArgs": [
29+
"--ulimit=core=-1",
30+
"--cap-add=SYS_ADMIN",
31+
"--cap-add=SYS_PTRACE",
32+
"--cap-add=PERFMON",
33+
"--security-opt",
34+
"seccomp=unconfined",
35+
"--privileged"
36+
],
37+
"mounts": [
38+
"source=${localEnv:HOME}/.ssh,target=/home/paimon/.ssh,type=bind,readonly"
39+
],
40+
"customizations": {
41+
"vscode": {
42+
"extensions": [
43+
"eamodio.gitlens"
44+
],
45+
"settings": {
46+
"editor.formatOnSave": true
47+
}
48+
}
49+
}
50+
}

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2024-present Alibaba Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Build directories
16+
build
17+
build-release
18+
build-debug
19+
20+
# IDE settings
21+
.idea
22+
.vscode
23+
.cache
24+
25+
# Devcontainer configuration
26+
.devcontainer/*
27+
!.devcontainer/*.template
28+
29+
# Temporary and backup files
30+
*~
31+
*.folded
32+
*.pyc
33+
__pycache__
34+
35+
# Performance analysis and profiling files
36+
*.perf*
37+
perf.*
38+
*lcov.info
39+
profile.json
40+
FlameGraph
41+
42+
# Shared objects and binary files
43+
*.so
44+
45+
# Images
46+
*.svg
47+
48+
# Third party dependencies archives
49+
third_party/*.tar.gz

.pre-commit-config.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Adapted from Apache Iceberg C++
19+
# https://github.com/apache/iceberg-cpp/blob/main/.pre-commit-config.yaml
20+
21+
# To use this, install the python package `pre-commit` and
22+
# run once `pre-commit install`. This will setup a git pre-commit-hook
23+
# that is executed on each commit and will report the linting problems.
24+
# To run all hooks on all files use `pre-commit run -a`
25+
26+
repos:
27+
- repo: https://github.com/pre-commit/pre-commit-hooks
28+
rev: v5.0.0
29+
hooks:
30+
- id: trailing-whitespace
31+
exclude: (^test/test_data/.*|^third_party/.*)
32+
- id: end-of-file-fixer
33+
exclude: (^test/test_data/.*|^third_party/.*)
34+
- id: check-yaml
35+
- id: check-added-large-files
36+
37+
- repo: https://github.com/pre-commit/mirrors-clang-format
38+
rev: v20.1.8
39+
hooks:
40+
- id: clang-format
41+
exclude_types: [json]
42+
files: \.(c|cpp|h|hpp|cc|cxx)$
43+
exclude: (^test/test_data/.*|^third_party/.*)
44+
45+
- repo: https://github.com/cheshirekow/cmake-format-precommit
46+
rev: v0.6.10
47+
hooks:
48+
- id: cmake-format
49+
exclude: (^test/test_data/.*|^third_party/.*)
50+
51+
- repo: https://github.com/codespell-project/codespell
52+
rev: v2.4.1
53+
hooks:
54+
- id: codespell
55+
exclude: (^test/test_data/.*|^third_party/.*|fix_includes.py)
56+
args: ["--ignore-words", ".codespell_ignore"]
57+
- repo: https://github.com/sphinx-contrib/sphinx-lint
58+
rev: v0.9.1
59+
hooks:
60+
- id: sphinx-lint
61+
alias: docs
62+
files: ^docs/source
63+
exclude: ^docs/source/python/generated
64+
args: [
65+
'--enable',
66+
'all',
67+
'--disable',
68+
'dangling-hyphen,line-too-long',
69+
]

0 commit comments

Comments
 (0)