Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Commit 79558d8

Browse files
author
Evert
committed
Copied bare bones
0 parents  commit 79558d8

File tree

470 files changed

+68644
-0
lines changed

Some content is hidden

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

470 files changed

+68644
-0
lines changed

.clang-format

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
BasedOnStyle: LLVM
3+
SortIncludes: false
4+
TabWidth: 4
5+
IndentWidth: 4
6+
ColumnLimit: 120
7+
AllowShortFunctionsOnASingleLine: false
8+
---
9+
UseTab: ForIndentation
10+
DerivePointerAlignment: false
11+
PointerAlignment: Right
12+
AlignConsecutiveMacros: true
13+
AlignTrailingComments: true
14+
AllowAllArgumentsOnNextLine: true
15+
AllowAllConstructorInitializersOnNextLine: true
16+
AllowAllParametersOfDeclarationOnNextLine: true
17+
AlignAfterOpenBracket: Align
18+
SpaceBeforeCpp11BracedList: true
19+
SpaceBeforeCtorInitializerColon: true
20+
SpaceBeforeInheritanceColon: true
21+
SpacesInAngles: false
22+
SpacesInCStyleCastParentheses: false
23+
SpacesInConditionalStatement: false
24+
AllowShortLambdasOnASingleLine: Inline
25+
AllowShortLoopsOnASingleLine: false
26+
AlwaysBreakTemplateDeclarations: Yes
27+
IncludeBlocks: Regroup
28+
Language: Cpp
29+
AccessModifierOffset: -4
30+
---
31+
Language: Java
32+
SpaceAfterCStyleCast: true
33+
---

.clang-tidy

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Checks: '-*,clang-diagnostic-*,bugprone-*,performance-*,google-explicit-constructor,google-build-using-namespace,google-runtime-int,misc-definitions-in-headers,modernize-use-nullptr,modernize-use-override,-bugprone-macro-parentheses,readability-braces-around-statements,-bugprone-branch-clone,readability-identifier-naming,hicpp-exception-baseclass,misc-throw-by-value-catch-by-reference,-bugprone-signed-char-misuse,-bugprone-misplaced-widening-cast,-bugprone-sizeof-expression,-bugprone-easily-swappable-parameters,google-global-names-in-headers,llvm-header-guard,misc-definitions-in-headers,modernize-use-emplace,modernize-use-bool-literals,-performance-inefficient-string-concatenation,-performance-no-int-to-ptr,readability-container-size-empty,cppcoreguidelines-pro-type-cstyle-cast,-llvm-header-guard,-performance-enum-size,cppcoreguidelines-pro-type-const-cast,cppcoreguidelines-avoid-non-const-global-variables,cppcoreguidelines-interfaces-global-init,cppcoreguidelines-slicing,cppcoreguidelines-rvalue-reference-param-not-moved,cppcoreguidelines-virtual-class-destructor,-readability-identifier-naming,-bugprone-exception-escape,-bugprone-unused-local-non-trivial-variable,-bugprone-empty-catch'
2+
WarningsAsErrors: '*'
3+
HeaderFilterRegex: 'src/include/duckdb/.*'
4+
FormatStyle: none
5+
CheckOptions:
6+
- key: readability-identifier-naming.ClassCase
7+
value: CamelCase
8+
- key: readability-identifier-naming.EnumCase
9+
value: CamelCase
10+
- key: readability-identifier-naming.TypedefCase
11+
value: lower_case
12+
- key: readability-identifier-naming.TypedefSuffix
13+
value: _t
14+
- key: readability-identifier-naming.FunctionCase
15+
value: CamelCase
16+
- key: readability-identifier-naming.MemberCase
17+
value: lower_case
18+
- key: readability-identifier-naming.ParameterCase
19+
value: lower_case
20+
- key: readability-identifier-naming.ConstantCase
21+
value: aNy_CasE
22+
- key: readability-identifier-naming.ConstantParameterCase
23+
value: lower_case
24+
- key: readability-identifier-naming.NamespaceCase
25+
value: lower_case
26+
- key: readability-identifier-naming.MacroDefinitionCase
27+
value: UPPER_CASE
28+
- key: readability-identifier-naming.StaticConstantCase
29+
value: UPPER_CASE
30+
- key: readability-identifier-naming.ConstantMemberCase
31+
value: aNy_CasE
32+
- key: readability-identifier-naming.StaticVariableCase
33+
value: UPPER_CASE
34+
- key: readability-identifier-naming.ClassConstantCase
35+
value: UPPER_CASE
36+
- key: readability-identifier-naming.EnumConstantCase
37+
value: UPPER_CASE
38+
- key: readability-identifier-naming.ConstexprVariableCase
39+
value: aNy_CasE
40+
- key: readability-identifier-naming.StaticConstantCase
41+
value: UPPER_CASE
42+
- key: readability-identifier-naming.TemplateTemplateParameterCase
43+
value: UPPER_CASE
44+
- key: readability-identifier-naming.TypeTemplateParameterCase
45+
value: UPPER_CASE
46+
- key: readability-identifier-naming.VariableCase
47+
value: lower_case
48+
- key: modernize-use-emplace.SmartPointers
49+
value: '::duckdb::shared_ptr;::duckdb::unique_ptr;::std::auto_ptr;::duckdb::weak_ptr'
50+
- key: cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams
51+
value: true
52+

.clangd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CompileFlags:
2+
CompilationDatabase: build/clangd
3+
Add: -Wno-unqualified-std-cast-call

.codecov.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
comment: false
2+
coverage:
3+
precision: 2
4+
round: down
5+
range: "0...100"
6+
status:
7+
project:
8+
default:
9+
# advanced settings
10+
if_not_found: success
11+
if_ci_failed: failure
12+
informational: true
13+
only_pulls: false
14+
patch:
15+
default:
16+
branches:
17+
- main
18+
if_not_found: success
19+
if_ci_failed: error
20+
informational: true
21+
only_pulls: true
22+
paths:
23+
- "src"

.editorconfig

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Unix-style newlines with a newline ending every file
2+
[*.{c,cpp,h,hpp}]
3+
end_of_line = lf
4+
insert_final_newline = true
5+
indent_style = tab
6+
tab_width = 4
7+
indent_size = tab
8+
trim_trailing_whitespace = true
9+
charset = utf-8
10+
max_line_length = 120
11+
x-soft-wrap-text = true
12+
x-soft-wrap-mode = CharacterWidth
13+
x-soft-wrap-limit = 120
14+
x-show-invisibles = false
15+
x-show-spaces = false
16+
17+
[*.{java}]
18+
end_of_line = lf
19+
insert_final_newline = true
20+
indent_style = tab
21+
tab_width = 4
22+
indent_size = tab
23+
trim_trailing_whitespace = false
24+
charset = utf-8
25+
max_line_length = 120
26+
x-soft-wrap-text = true
27+
x-soft-wrap-mode = CharacterWidth
28+
x-soft-wrap-limit = 120
29+
x-show-invisibles = false
30+
x-show-spaces = false
31+
32+
[*.{test,test_slow,test_coverage,benchmark}]
33+
end_of_line = lf
34+
insert_final_newline = true
35+
indent_style = tab
36+
tab_width = 4
37+
indent_size = tab
38+
trim_trailing_whitespace = false
39+
charset = utf-8
40+
x-soft-wrap-text = false
41+
42+
[Makefile]
43+
end_of_line = lf
44+
insert_final_newline = true
45+
indent_style = tab
46+
tab_width = 4
47+
indent_size = tab
48+
trim_trailing_whitespace = true
49+
charset = utf-8
50+
x-soft-wrap-text = false
51+
52+
[*keywords.list]
53+
insert_final_newline = false

.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#==============================================================================#
2+
# This file specifies intentionally untracked files that git should ignore.
3+
#==============================================================================#
4+
5+
#==============================================================================#
6+
# General
7+
#==============================================================================#
8+
# Temp files created by most text editors.
9+
*~
10+
# Merge files created by git.
11+
*.orig
12+
# vim swap files
13+
.*.sw?
14+
.sw?
15+
#OS X specific files.
16+
.DS_store
17+
18+
#==============================================================================#
19+
# Build artifacts
20+
#==============================================================================#
21+
*.o
22+
*.lo
23+
*.la
24+
*.lai
25+
*.lib
26+
*.slo
27+
*.cuo
28+
*.pdf
29+
*.swp
30+
a.out
31+
*.so
32+
*.dylib
33+
*.dll
34+
35+
build
36+
.build_debug/*
37+
.build_release/*
38+
distribute/*
39+
*.testbin
40+
*.bin
41+
cmake_build
42+
.cmake_build
43+
cmake-build-debug
44+
cmake-build-release
45+
cmake-build-relwithdebinfo
46+
47+
#==============================================================================#
48+
# Python
49+
#==============================================================================#
50+
51+
*.pyc
52+
.venv
53+
dist
54+
duckdb.egg-info
55+
.eggs
56+
.pytest_cache
57+
duckdb_build
58+
59+
# python parquet files used in tests
60+
tests/unsigned.parquet
61+
tests/userdata1.parquet

CMakeLists.txt

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# ────────────────────────────────────────────
2+
# IMPORTANT: Cmake is NOT used to build this library. This is here only for
3+
# Intellisense and clang-tidy.
4+
#
5+
# See README.md for more information on how to use this file and how to build
6+
# the library.
7+
# ────────────────────────────────────────────
8+
9+
cmake_minimum_required(VERSION 3.18...3.29)
10+
11+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
12+
13+
# ────────────────────────────────────────────
14+
# Policy hygiene
15+
# ────────────────────────────────────────────
16+
if(POLICY CMP0148) # Disallow FindPythonLibs
17+
cmake_policy(SET CMP0148 NEW)
18+
endif()
19+
20+
if(POLICY CMP0003) # No implicit link directories
21+
cmake_policy(SET CMP0003 NEW)
22+
endif()
23+
24+
# ────────────────────────────────────────────
25+
# Dependencies
26+
# ────────────────────────────────────────────
27+
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
28+
message(STATUS "CPython executable: ${Python3_EXECUTABLE}")
29+
message(STATUS "CPython include dirs: ${Python3_INCLUDE_DIRS}")
30+
message(STATUS "CPython libraries: ${Python3_LIBRARIES}")
31+
32+
find_package(pybind11 CONFIG QUIET)
33+
# Header-only shim: good enough for clang-tidy / IntelliSense
34+
if(NOT TARGET pybind11::pybind11)
35+
add_library(pybind11::pybind11 INTERFACE IMPORTED)
36+
target_include_directories(
37+
pybind11::pybind11
38+
INTERFACE $<BUILD_INTERFACE:${Python3_SITEARCH}/pybind11/include>)
39+
endif()
40+
41+
# ────────────────────────────────────────────
42+
# INTERFACE library that **only** carries usage requirements
43+
# ────────────────────────────────────────────
44+
add_library(pytooling INTERFACE)
45+
46+
# 1. Include paths that clang‑tidy / IntelliSense must see
47+
target_include_directories(
48+
pytooling INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/include>
49+
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>)
50+
51+
# 1. All the imported dependency targets: they bring their own include dirs +
52+
# compile definitions automatically.
53+
target_link_libraries(
54+
pytooling INTERFACE Python3::Python # defined by FindPython3
55+
pybind11::pybind11 # defined by pybind11Config.cmake
56+
)
57+
58+
# ────────────────────────────────────────────
59+
# Descend into the real DuckDB‑Python sources
60+
# ────────────────────────────────────────────
61+
add_subdirectory(src EXCLUDE_FROM_ALL)
62+
63+
# ────────────────────────────────────────────
64+
# Fake aggregation library for analysis tools
65+
# ────────────────────────────────────────────
66+
add_library(duckdb_python_analysis STATIC duckdb_python.cpp)
67+
target_link_libraries(
68+
duckdb_python_analysis
69+
PRIVATE pytooling # brings Python + pybind11 + local includes
70+
python_src # keep in sync with sub-directory object libs
71+
python_arrow
72+
python_common
73+
python_functional
74+
python_jupyter
75+
python_native
76+
python_numpy
77+
python_pandas
78+
python_pybind11
79+
python_connection
80+
python_expression
81+
python_relation
82+
python_type
83+
duckdb_static # <- DuckDB static library from the main project
84+
)

0 commit comments

Comments
 (0)