kernelforge 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. kernelforge-0.0.0/.clang-format +84 -0
  2. kernelforge-0.0.0/.clang-tidy +60 -0
  3. kernelforge-0.0.0/.github/workflows/ci.yml +60 -0
  4. kernelforge-0.0.0/.github/workflows/code-quality.yml +41 -0
  5. kernelforge-0.0.0/.github/workflows/release.yaml +107 -0
  6. kernelforge-0.0.0/.gitignore +212 -0
  7. kernelforge-0.0.0/.pre-commit-config.yaml +46 -0
  8. kernelforge-0.0.0/CMakeLists.txt +185 -0
  9. kernelforge-0.0.0/LICENSE +21 -0
  10. kernelforge-0.0.0/Makefile +31 -0
  11. kernelforge-0.0.0/PKG-INFO +194 -0
  12. kernelforge-0.0.0/README.md +171 -0
  13. kernelforge-0.0.0/environments/environment-dev-macos.yaml +33 -0
  14. kernelforge-0.0.0/environments/environment-dev.yaml +30 -0
  15. kernelforge-0.0.0/examples/desc_hess-gauss.ipynb +984 -0
  16. kernelforge-0.0.0/examples/desc_hess.ipynb +808 -0
  17. kernelforge-0.0.0/examples/ethanol.sdf +22 -0
  18. kernelforge-0.0.0/examples/fchl_example.ipynb +655 -0
  19. kernelforge-0.0.0/examples/fchl_hess.ipynb +419 -0
  20. kernelforge-0.0.0/examples/qm7_example.ipynb +1058 -0
  21. kernelforge-0.0.0/examples/regression_ethanol-Copy1.ipynb +359 -0
  22. kernelforge-0.0.0/examples/regression_forces.ipynb +602 -0
  23. kernelforge-0.0.0/examples/sgdml.ipynb +1004 -0
  24. kernelforge-0.0.0/pyproject.toml +127 -0
  25. kernelforge-0.0.0/pytest.ini +2 -0
  26. kernelforge-0.0.0/python/kernelforge/__init__.py +8 -0
  27. kernelforge-0.0.0/python/kernelforge/cli.py +415 -0
  28. kernelforge-0.0.0/src/aligned_alloc64.hpp +34 -0
  29. kernelforge-0.0.0/src/bindings.cpp +99 -0
  30. kernelforge-0.0.0/src/bindings_cholesky.cpp +177 -0
  31. kernelforge-0.0.0/src/bindings_fchl19.cpp +861 -0
  32. kernelforge-0.0.0/src/bindings_kernels.cpp +286 -0
  33. kernelforge-0.0.0/src/cholesky.cpp +182 -0
  34. kernelforge-0.0.0/src/cholesky.hpp +17 -0
  35. kernelforge-0.0.0/src/constants.hpp +22 -0
  36. kernelforge-0.0.0/src/fchl19_representation.cpp +2149 -0
  37. kernelforge-0.0.0/src/fchl19_representation.hpp +114 -0
  38. kernelforge-0.0.0/src/invdist.cpp +92 -0
  39. kernelforge-0.0.0/src/invdist.hpp +29 -0
  40. kernelforge-0.0.0/src/invdist_bindings.cpp +88 -0
  41. kernelforge-0.0.0/src/kernels.cpp +495 -0
  42. kernelforge-0.0.0/src/kernels.hpp +27 -0
  43. kernelforge-0.0.0/tests/test_cholesky.py +52 -0
  44. kernelforge-0.0.0/tests/test_fchl19.py +288 -0
  45. kernelforge-0.0.0/tests/test_fchl19_gradient.py +160 -0
  46. kernelforge-0.0.0/tests/test_hessian.py +125 -0
  47. kernelforge-0.0.0/tests/test_invdist.py +84 -0
  48. kernelforge-0.0.0/tests/test_jacobian.py +154 -0
  49. kernelforge-0.0.0/tests/test_kernels.py +122 -0
  50. kernelforge-0.0.0/tests/test_rfp.py +98 -0
  51. kernelforge-0.0.0/wheelhouse/kernelforge-0.0.0-cp311-cp311-macosx_15_0_arm64.whl +0 -0
  52. kernelforge-0.0.0/wheelhouse/kernelforge-0.0.0-cp312-cp312-macosx_15_0_arm64.whl +0 -0
  53. kernelforge-0.0.0/wheelhouse/kernelforge-0.0.0-cp313-cp313-macosx_15_0_arm64.whl +0 -0
@@ -0,0 +1,84 @@
1
+ ---
2
+ # KernelForge C++ Code Style Configuration
3
+ # Based on Google style with customizations
4
+
5
+ BasedOnStyle: Google
6
+
7
+ # Core formatting preferences
8
+ IndentWidth: 4
9
+ ColumnLimit: 100
10
+ DerivePointerAlignment: false
11
+ PointerAlignment: Right # int *ptr style
12
+ UseTab: Never
13
+
14
+ # Indentation
15
+ AccessModifierOffset: -4
16
+ IndentCaseLabels: true
17
+ NamespaceIndentation: None
18
+ IndentPPDirectives: BeforeHash
19
+
20
+ # Alignment
21
+ AlignAfterOpenBracket: Align
22
+ AlignConsecutiveAssignments: None
23
+ AlignConsecutiveDeclarations: None
24
+ AlignOperands: Align
25
+ AlignTrailingComments: true
26
+
27
+ # Line breaks
28
+ AllowShortFunctionsOnASingleLine: Inline
29
+ AllowShortIfStatementsOnASingleLine: Never
30
+ AllowShortLoopsOnASingleLine: false
31
+ AllowShortBlocksOnASingleLine: Never
32
+ AllowShortCaseLabelsOnASingleLine: false
33
+ AlwaysBreakAfterReturnType: None
34
+ AlwaysBreakBeforeMultilineStrings: false
35
+
36
+ # Braces (K&R style)
37
+ BreakBeforeBraces: Attach
38
+ BraceWrapping:
39
+ AfterClass: false
40
+ AfterControlStatement: Never
41
+ AfterEnum: false
42
+ AfterFunction: false
43
+ AfterNamespace: false
44
+ AfterStruct: false
45
+ AfterUnion: false
46
+ BeforeCatch: false
47
+ BeforeElse: false
48
+
49
+ # Spaces
50
+ SpaceAfterCStyleCast: false
51
+ SpaceBeforeAssignmentOperators: true
52
+ SpaceBeforeParens: ControlStatements
53
+ SpacesInParentheses: false
54
+ SpacesInAngles: Never
55
+ SpacesInSquareBrackets: false
56
+
57
+ # Includes
58
+ SortIncludes: true
59
+ IncludeBlocks: Regroup
60
+ IncludeCategories:
61
+ # Own headers first
62
+ - Regex: '^".*\.h(pp)?"$'
63
+ Priority: 1
64
+ # C system headers
65
+ - Regex: '^<[a-z_]+\.h>$'
66
+ Priority: 2
67
+ # C++ standard library
68
+ - Regex: '^<[a-z_]+>$'
69
+ Priority: 3
70
+ # Third-party libraries (BLAS, OpenMP, pybind11)
71
+ - Regex: '^<(cblas|omp|pybind11|Accelerate).*>$'
72
+ Priority: 4
73
+ # Everything else
74
+ - Regex: '.*'
75
+ Priority: 5
76
+
77
+ # Language
78
+ Language: Cpp
79
+ Standard: c++17
80
+
81
+ # Other
82
+ MaxEmptyLinesToKeep: 1
83
+ KeepEmptyLinesAtTheStartOfBlocks: false
84
+ ReflowComments: true
@@ -0,0 +1,60 @@
1
+ ---
2
+ # KernelForge C++ Static Analysis Configuration
3
+ # Moderate checks for code quality without being overly restrictive
4
+
5
+ Checks: >
6
+ bugprone-*,
7
+ clang-analyzer-*,
8
+ cppcoreguidelines-*,
9
+ modernize-*,
10
+ performance-*,
11
+ readability-*,
12
+ -bugprone-easily-swappable-parameters,
13
+ -bugprone-implicit-widening-of-multiplication-result,
14
+ -modernize-use-trailing-return-type,
15
+ -modernize-avoid-c-arrays,
16
+ -readability-identifier-length,
17
+ -readability-function-cognitive-complexity,
18
+ -readability-magic-numbers,
19
+ -cppcoreguidelines-avoid-magic-numbers,
20
+ -cppcoreguidelines-pro-bounds-pointer-arithmetic,
21
+ -cppcoreguidelines-pro-type-reinterpret-cast,
22
+ -cppcoreguidelines-pro-type-const-cast,
23
+ -cppcoreguidelines-pro-bounds-array-to-pointer-decay,
24
+ -cppcoreguidelines-avoid-const-or-ref-data-members,
25
+ -cppcoreguidelines-owning-memory,
26
+ -cppcoreguidelines-no-malloc,
27
+ -performance-no-int-to-ptr
28
+
29
+ CheckOptions:
30
+ # Naming conventions - snake_case for most things
31
+ - key: readability-identifier-naming.NamespaceCase
32
+ value: lower_case
33
+ - key: readability-identifier-naming.ClassCase
34
+ value: CamelCase
35
+ - key: readability-identifier-naming.StructCase
36
+ value: CamelCase
37
+ - key: readability-identifier-naming.FunctionCase
38
+ value: snake_case
39
+ - key: readability-identifier-naming.VariableCase
40
+ value: snake_case
41
+ - key: readability-identifier-naming.ParameterCase
42
+ value: snake_case
43
+ - key: readability-identifier-naming.ConstantCase
44
+ value: UPPER_CASE
45
+ - key: readability-identifier-naming.EnumConstantCase
46
+ value: UPPER_CASE
47
+ - key: readability-identifier-naming.GlobalConstantCase
48
+ value: UPPER_CASE
49
+
50
+ # Make some checks less aggressive
51
+ - key: readability-function-size.LineThreshold
52
+ value: '200'
53
+ - key: readability-function-size.StatementThreshold
54
+ value: '150'
55
+ - key: cppcoreguidelines-avoid-do-while.MaxStatements
56
+ value: '10'
57
+
58
+ WarningsAsErrors: ''
59
+ HeaderFilterRegex: 'src/.*\.(h|hpp)$'
60
+ FormatStyle: file # Use .clang-format
@@ -0,0 +1,60 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ name: pytest (${{ matrix.os }} / py${{ matrix.python-version }})
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ os: [ubuntu-24.04, macos-15]
16
+ python-version: ["3.14"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Install OpenMP (macOS only)
22
+ if: runner.os == 'macOS'
23
+ run: brew install libomp llvm
24
+
25
+ - name: Install OpenBLAS (Linux only)
26
+ if: runner.os == 'Linux'
27
+ run: sudo apt-get install -y libopenblas-dev
28
+
29
+ - name: Set up uv
30
+ uses: astral-sh/setup-uv@v7
31
+
32
+ - name: Build & install (macOS only)
33
+ if: runner.os == 'macOS'
34
+ env:
35
+ OMP_NUM_THREADS: "1"
36
+ OPENBLAS_NUM_THREADS: "1"
37
+ CMAKE_PREFIX_PATH: /opt/homebrew/opt/libomp
38
+ run: |
39
+ uv sync --dev --all-extras
40
+ uv pip install scikit-build-core pybind11
41
+ CMAKE_ARGS="-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang \
42
+ -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++" \
43
+ uv pip install -e .[test] --no-build-isolation
44
+
45
+ - name: Build & install (Linux only)
46
+ if: runner.os == 'linux'
47
+ env:
48
+ OMP_NUM_THREADS: "1"
49
+ OPENBLAS_NUM_THREADS: "1"
50
+ run: |
51
+ uv sync --dev --all-extras
52
+ uv pip install scikit-build-core pybind11
53
+ uv pip install -e .[test] --no-build-isolation
54
+
55
+
56
+ - name: Run pytest
57
+ env:
58
+ OMP_NUM_THREADS: "1"
59
+ OPENBLAS_NUM_THREADS: "1"
60
+ run: uv run pytest -q -ra -k "not slow" -x
@@ -0,0 +1,41 @@
1
+ name: Code Quality
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ code-quality:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install black isort ruff mypy
28
+ pip install numpy pytest
29
+
30
+ - name: Check formatting with Black
31
+ run: black --check python/ tests/
32
+
33
+ - name: Check import sorting with isort
34
+ run: isort --check-only python/ tests/
35
+
36
+ - name: Lint with Ruff
37
+ run: ruff check python/ tests/
38
+
39
+ - name: Type check with mypy
40
+ run: mypy python/ tests/
41
+ continue-on-error: true # Don't fail CI on mypy errors initially
@@ -0,0 +1,107 @@
1
+ # .github/workflows/release.yml
2
+ name: "Build & Publish"
3
+
4
+ on:
5
+ release:
6
+ types: [published]
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build-wheels:
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ os: [ubuntu-22.04, macos-latest]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - uses: actions/setup-python@v5
21
+ with:
22
+ python-version: "3.12" # host Python, cibuildwheel makes all others
23
+
24
+ - name: Clean wheelhouse and build artifacts
25
+ run: |
26
+ rm -rf dist/ build/ *.egg-info wheelhouse/
27
+
28
+ - name: Install GCC and OpenMP (macOS)
29
+ if: runner.os == 'macOS'
30
+ run: brew install gcc libomp
31
+
32
+ - name: Install cibuildwheel
33
+ run: python -m pip install cibuildwheel==2.*
34
+
35
+ - name: Build wheels
36
+ env:
37
+ CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
38
+ CIBW_SKIP: "pp* *-musllinux_* cp*-manylinux_i686"
39
+ CIBW_TEST_COMMAND: "pytest -q {project}/tests -k 'not slow' -x"
40
+ CIBW_TEST_EXTRAS: "test"
41
+ CIBW_ENVIRONMENT: >
42
+ OMP_NUM_THREADS=1
43
+ OPENBLAS_NUM_THREADS=1
44
+ CIBW_BEFORE_BUILD_LINUX: |
45
+ yum -y install openblas-devel
46
+ find /usr/include -name cblas.h -print
47
+ CIBW_ENVIRONMENT_LINUX: >
48
+ CPPFLAGS="-I/usr/include/openblas"
49
+ CFLAGS="-I/usr/include/openblas"
50
+ LD_LIBRARY_PATH="/usr/lib64:$LD_LIBRARY_PATH"
51
+ CMAKE_ARGS="-DBLAS_LIBRARIES=/usr/lib64/libopenblas.so -DBLAS_INCLUDE_DIR=/usr/include/openblas -DCMAKE_CXX_FLAGS=-I/usr/include/openblas -DCMAKE_C_FLAGS=-I/usr/include/openblas"
52
+ OPENBLAS_NUM_THREADS=1
53
+ OMP_NUM_THREADS=1
54
+ CIBW_ENVIRONMENT_PASS_LINUX: >
55
+ CPPFLAGS
56
+ CFLAGS
57
+ LD_LIBRARY_PATH
58
+ CMAKE_ARGS
59
+ OPENBLAS_NUM_THREADS
60
+ OMP_NUM_THREADS
61
+ CIBW_ENVIRONMENT_MACOS: >
62
+ MACOSX_DEPLOYMENT_TARGET=15.0
63
+ CMAKE_ARGS="-DBLAS_VENDOR=Apple
64
+ -DCMAKE_CXX_FLAGS=-I/opt/homebrew/opt/libomp/include
65
+ -DCMAKE_C_FLAGS=-I/opt/homebrew/opt/libomp/include
66
+ -DCMAKE_SHARED_LINKER_FLAGS=-L/opt/homebrew/opt/libomp/lib
67
+ -DCMAKE_EXE_LINKER_FLAGS=-L/opt/homebrew/opt/libomp/lib"
68
+ CIBW_ENVIRONMENT_PASS_MACOS: >
69
+ MACOSX_DEPLOYMENT_TARGET
70
+ CMAKE_ARGS
71
+ CIBW_ARCHS_MACOS: arm64
72
+ run: python -m cibuildwheel --output-dir wheelhouse
73
+
74
+ - name: Build sdist
75
+ run: python -m pip install build && python -m build --sdist -o wheelhouse
76
+
77
+ - name: Upload artifacts
78
+ uses: actions/upload-artifact@v4
79
+ with:
80
+ name: wheels-${{ runner.os }}
81
+ path: wheelhouse/*
82
+ publish:
83
+ needs: build-wheels
84
+ runs-on: ubuntu-22.04
85
+ if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
86
+ permissions:
87
+ id-token: write
88
+ steps:
89
+ - uses: actions/download-artifact@v4
90
+ with:
91
+ name: wheels-Linux
92
+ path: dist
93
+
94
+ - uses: actions/download-artifact@v4
95
+ with:
96
+ name: wheels-macOS
97
+ path: dist
98
+
99
+ - name: Flatten artifacts
100
+ run: |
101
+ mkdir -p dist/flat
102
+ find dist -name '*.whl' -exec cp {} dist/flat/ \;
103
+ find dist -name '*.tar.gz' -exec cp {} dist/flat/ \;
104
+
105
+ - uses: pypa/gh-action-pypi-publish@v1.11.0
106
+ with:
107
+ packages-dir: dist/flat
@@ -0,0 +1,212 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
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
+ CMakeFiles/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ CMakeCache.txt
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py.cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+ cover/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ #Pipfile.lock
99
+
100
+ # UV
101
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ #uv.lock
105
+
106
+ # poetry
107
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
108
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
109
+ # commonly ignored for libraries.
110
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
111
+ #poetry.lock
112
+ #poetry.toml
113
+
114
+ # pdm
115
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
116
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
117
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
118
+ #pdm.lock
119
+ #pdm.toml
120
+ .pdm-python
121
+ .pdm-build/
122
+
123
+ # pixi
124
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
125
+ #pixi.lock
126
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
127
+ # in the .venv directory. It is recommended not to include this directory in version control.
128
+ .pixi
129
+
130
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
131
+ __pypackages__/
132
+
133
+ # Celery stuff
134
+ celerybeat-schedule
135
+ celerybeat.pid
136
+
137
+ # SageMath parsed files
138
+ *.sage.py
139
+
140
+ # Environments
141
+ .env
142
+ .envrc
143
+ .venv
144
+ env/
145
+ venv/
146
+ ENV/
147
+ env.bak/
148
+ venv.bak/
149
+
150
+ # Spyder project settings
151
+ .spyderproject
152
+ .spyproject
153
+
154
+ # Rope project settings
155
+ .ropeproject
156
+
157
+ # mkdocs documentation
158
+ /site
159
+
160
+ # mypy
161
+ .mypy_cache/
162
+ .dmypy.json
163
+ dmypy.json
164
+
165
+ # Pyre type checker
166
+ .pyre/
167
+
168
+ # pytype static type analyzer
169
+ .pytype/
170
+
171
+ # Cython debug symbols
172
+ cython_debug/
173
+
174
+ # PyCharm
175
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
176
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
177
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
178
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
179
+ #.idea/
180
+
181
+ # Abstra
182
+ # Abstra is an AI-powered process automation framework.
183
+ # Ignore directories containing user credentials, local state, and settings.
184
+ # Learn more at https://abstra.io/docs
185
+ .abstra/
186
+
187
+ # Visual Studio Code
188
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
189
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
190
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
191
+ # you could uncomment the following to ignore the entire vscode folder
192
+ # .vscode/
193
+
194
+ # Ruff stuff:
195
+ .ruff_cache/
196
+
197
+ # PyPI configuration file
198
+ .pypirc
199
+
200
+ # Cursor
201
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
202
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
203
+ # refer to https://docs.cursor.com/context/ignore-files
204
+ .cursorignore
205
+ .cursorindexingignore
206
+
207
+ # Marimo
208
+ marimo/_static/
209
+ marimo/_lsp/
210
+ __marimo__/
211
+
212
+ uv.lock
@@ -0,0 +1,46 @@
1
+ # Pre-commit hooks for code quality
2
+ # See https://pre-commit.com for more information
3
+
4
+ repos:
5
+ - repo: https://github.com/pre-commit/pre-commit-hooks
6
+ rev: v4.5.0
7
+ hooks:
8
+ - id: trailing-whitespace
9
+ - id: end-of-file-fixer
10
+ - id: check-yaml
11
+ - id: check-added-large-files
12
+ - id: check-merge-conflict
13
+ - id: mixed-line-ending
14
+
15
+ - repo: https://github.com/psf/black
16
+ rev: 24.2.0
17
+ hooks:
18
+ - id: black
19
+
20
+ - repo: https://github.com/pycqa/isort
21
+ rev: 5.13.2
22
+ hooks:
23
+ - id: isort
24
+ args: ["--profile", "black"]
25
+
26
+ - repo: https://github.com/astral-sh/ruff-pre-commit
27
+ rev: v0.3.0
28
+ hooks:
29
+ - id: ruff
30
+ args: [--fix, --exit-non-zero-on-fix]
31
+
32
+ - repo: https://github.com/pre-commit/mirrors-clang-format
33
+ rev: v19.1.6
34
+ hooks:
35
+ - id: clang-format
36
+ types_or: [c++, c]
37
+ files: ^src/.*\.(cpp|hpp|h|cc|cxx)$
38
+
39
+ # Mypy disabled in pre-commit (run manually with: pre-commit run mypy --all-files --hook-stage manual)
40
+ # - repo: https://github.com/pre-commit/mirrors-mypy
41
+ # rev: v1.9.0
42
+ # hooks:
43
+ # - id: mypy
44
+ # additional_dependencies: [numpy>=2.0, types-psutil]
45
+ # args: [--ignore-missing-imports]
46
+ # files: ^(python|tests|benchmark)/.*\.py$