kafkars 0.0.2__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.
@@ -0,0 +1,13 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: cargo
4
+ directory: "/"
5
+ schedule:
6
+ interval: weekly
7
+ time: "10:00"
8
+ open-pull-requests-limit: 10
9
+
10
+ - package-ecosystem: github-actions
11
+ directory: /
12
+ schedule:
13
+ interval: weekly
@@ -0,0 +1,143 @@
1
+ # This file is autogenerated by maturin v1.10.2
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github --output=.github/workflows/ci.yaml --platform=manylinux --platform=macos
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ tags:
13
+ - 'v*'
14
+ pull_request:
15
+ workflow_dispatch:
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ linux:
22
+ runs-on: ${{ matrix.platform.runner }}
23
+ strategy:
24
+ matrix:
25
+ platform:
26
+ - runner: ubuntu-22.04
27
+ target: x86_64
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+
31
+ - name: Set version from tag
32
+ shell: bash
33
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
34
+ run: |
35
+ VERSION=${GITHUB_REF#refs/tags/v}
36
+ sed -i "s/^version = \".*\"/version = \"$VERSION\"/" Cargo.toml
37
+
38
+ - uses: actions/setup-python@v5
39
+ with:
40
+ python-version: 3.x
41
+ - name: Build wheels
42
+ uses: PyO3/maturin-action@v1
43
+ with:
44
+ target: ${{ matrix.platform.target }}
45
+ args: --release --out dist
46
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
47
+ manylinux: auto
48
+ - name: Build free-threaded wheels
49
+ uses: PyO3/maturin-action@v1
50
+ with:
51
+ target: ${{ matrix.platform.target }}
52
+ args: --release --out dist -i python3.13t
53
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
54
+ manylinux: auto
55
+ - name: Upload wheels
56
+ uses: actions/upload-artifact@v4
57
+ with:
58
+ name: wheels-linux-${{ matrix.platform.target }}
59
+ path: dist
60
+
61
+ macos:
62
+ runs-on: ${{ matrix.platform.runner }}
63
+ strategy:
64
+ matrix:
65
+ platform:
66
+ - runner: macos-15
67
+ target: x86_64
68
+ - runner: macos-14
69
+ target: aarch64
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+ - name: Set version from tag
73
+ shell: bash
74
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
75
+ run: |
76
+ VERSION=${GITHUB_REF#refs/tags/v}
77
+ sed -i '' "s/^version = \".*\"/version = \"$VERSION\"/" Cargo.toml
78
+ - uses: actions/setup-python@v5
79
+ with:
80
+ python-version: 3.x
81
+ - name: Build wheels
82
+ uses: PyO3/maturin-action@v1
83
+ with:
84
+ target: ${{ matrix.platform.target }}
85
+ args: --release --out dist
86
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
87
+ - name: Build free-threaded wheels
88
+ uses: PyO3/maturin-action@v1
89
+ with:
90
+ target: ${{ matrix.platform.target }}
91
+ args: --release --out dist -i python3.13t
92
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
93
+ - name: Upload wheels
94
+ uses: actions/upload-artifact@v4
95
+ with:
96
+ name: wheels-macos-${{ matrix.platform.target }}
97
+ path: dist
98
+
99
+ sdist:
100
+ runs-on: ubuntu-latest
101
+ steps:
102
+ - uses: actions/checkout@v4
103
+ - name: Set version from tag
104
+ shell: bash
105
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
106
+ run: |
107
+ VERSION=${GITHUB_REF#refs/tags/v}
108
+ sed -i "s/^version = \".*\"/version = \"$VERSION\"/" Cargo.toml
109
+ - name: Build sdist
110
+ uses: PyO3/maturin-action@v1
111
+ with:
112
+ command: sdist
113
+ args: --out dist
114
+ - name: Upload sdist
115
+ uses: actions/upload-artifact@v4
116
+ with:
117
+ name: wheels-sdist
118
+ path: dist
119
+
120
+ release:
121
+ name: Release
122
+ runs-on: ubuntu-latest
123
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
124
+ needs: [linux, macos, sdist]
125
+ permissions:
126
+ id-token: write
127
+ contents: write
128
+ attestations: write
129
+ steps:
130
+ - uses: actions/download-artifact@v4
131
+ - name: Generate artifact attestation
132
+ uses: actions/attest-build-provenance@v2
133
+ with:
134
+ subject-path: 'wheels-*/*'
135
+ - name: Merge wheel directories
136
+ run: |
137
+ mkdir dist
138
+ cp wheels-*/* dist/
139
+ - name: Publish to PyPI
140
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
141
+ uses: pypa/gh-action-pypi-publish@release/v1
142
+ with:
143
+ packages-dir: dist/
@@ -0,0 +1,76 @@
1
+ name: "test"
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+
11
+ lint:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v6
15
+ - name: Format
16
+ run: cargo fmt && git diff --exit-code
17
+ - name: Lint
18
+ run: |
19
+ rustup update
20
+ rustup component add clippy
21
+ cargo clippy -- -D warnings
22
+
23
+
24
+ test:
25
+ strategy:
26
+ matrix:
27
+ python:
28
+ - "3.10"
29
+ - "3.11"
30
+ - "3.12"
31
+ - "3.13"
32
+ - "3.14"
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - uses: actions/checkout@v6
36
+
37
+ - uses: actions/setup-python@v5
38
+ with:
39
+ python-version: ${{ matrix.python }}
40
+
41
+ - uses: astral-sh/setup-uv@v7
42
+ with:
43
+ version: "0.7.19"
44
+
45
+
46
+ - name: Install grcov
47
+ run: cargo install grcov
48
+
49
+ - name: Build
50
+ run: |
51
+ make develop
52
+
53
+ - name: Run coverage
54
+ run: make coverage
55
+
56
+ - name: Upload coverage to Codecov
57
+ uses: codecov/codecov-action@v4
58
+ with:
59
+ token: ${{ secrets.CODECOV_TOKEN }}
60
+ files: ./lcov.info,./coverage.xml
61
+ fail_ci_if_error: true
62
+
63
+ all-tests-pass:
64
+ if: always()
65
+
66
+ needs:
67
+ - lint
68
+ - test
69
+
70
+ runs-on: ubuntu-latest
71
+
72
+ steps:
73
+ - name: check test jobs
74
+ uses: re-actors/alls-green@v1.2.2
75
+ with:
76
+ jobs: ${{ toJSON(needs) }}
@@ -0,0 +1,213 @@
1
+ # Rust
2
+ /target/
3
+ Cargo.lock
4
+
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[codz]
8
+ *$py.class
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ *.profraw
32
+ lcov.info
33
+ MANIFEST
34
+
35
+ # PyInstaller
36
+ # Usually these files are written by a python script from a template
37
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
38
+ *.manifest
39
+ *.spec
40
+
41
+ # Installer logs
42
+ pip-log.txt
43
+ pip-delete-this-directory.txt
44
+
45
+ # Unit test / coverage reports
46
+ htmlcov/
47
+ .tox/
48
+ .nox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ *.py.cover
56
+ .hypothesis/
57
+ .pytest_cache/
58
+ cover/
59
+
60
+ # Translations
61
+ *.mo
62
+ *.pot
63
+
64
+ # Django stuff:
65
+ *.log
66
+ local_settings.py
67
+ db.sqlite3
68
+ db.sqlite3-journal
69
+
70
+ # Flask stuff:
71
+ instance/
72
+ .webassets-cache
73
+
74
+ # Scrapy stuff:
75
+ .scrapy
76
+
77
+ # Sphinx documentation
78
+ docs/_build/
79
+
80
+ # PyBuilder
81
+ .pybuilder/
82
+ target/
83
+
84
+ # Jupyter Notebook
85
+ .ipynb_checkpoints
86
+
87
+ # IPython
88
+ profile_default/
89
+ ipython_config.py
90
+
91
+ # pyenv
92
+ # For a library or package, you might want to ignore these files since the code is
93
+ # intended to run in multiple environments; otherwise, check them in:
94
+ # .python-version
95
+
96
+ # pipenv
97
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
98
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
99
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
100
+ # install all needed dependencies.
101
+ #Pipfile.lock
102
+
103
+ # UV
104
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ #uv.lock
108
+
109
+ # poetry
110
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
111
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
112
+ # commonly ignored for libraries.
113
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
114
+ #poetry.lock
115
+ #poetry.toml
116
+
117
+ # pdm
118
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
119
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
120
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
121
+ #pdm.lock
122
+ #pdm.toml
123
+ .pdm-python
124
+ .pdm-build/
125
+
126
+ # pixi
127
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
128
+ #pixi.lock
129
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
130
+ # in the .venv directory. It is recommended not to include this directory in version control.
131
+ .pixi
132
+
133
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
134
+ __pypackages__/
135
+
136
+ # Celery stuff
137
+ celerybeat-schedule
138
+ celerybeat.pid
139
+
140
+ # SageMath parsed files
141
+ *.sage.py
142
+
143
+ # Environments
144
+ .env
145
+ .envrc
146
+ .venv
147
+ env/
148
+ venv/
149
+ ENV/
150
+ env.bak/
151
+ venv.bak/
152
+
153
+ # Spyder project settings
154
+ .spyderproject
155
+ .spyproject
156
+
157
+ # Rope project settings
158
+ .ropeproject
159
+
160
+ # mkdocs documentation
161
+ /site
162
+
163
+ # mypy
164
+ .mypy_cache/
165
+ .dmypy.json
166
+ dmypy.json
167
+
168
+ # Pyre type checker
169
+ .pyre/
170
+
171
+ # pytype static type analyzer
172
+ .pytype/
173
+
174
+ # Cython debug symbols
175
+ cython_debug/
176
+
177
+ # PyCharm
178
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
179
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
180
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
181
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
182
+ .idea/
183
+
184
+ # Abstra
185
+ # Abstra is an AI-powered process automation framework.
186
+ # Ignore directories containing user credentials, local state, and settings.
187
+ # Learn more at https://abstra.io/docs
188
+ .abstra/
189
+
190
+ # Visual Studio Code
191
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
192
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
193
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
194
+ # you could uncomment the following to ignore the entire vscode folder
195
+ # .vscode/
196
+
197
+ # Ruff stuff:
198
+ .ruff_cache/
199
+
200
+ # PyPI configuration file
201
+ .pypirc
202
+
203
+ # Cursor
204
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
205
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
206
+ # refer to https://docs.cursor.com/context/ignore-files
207
+ .cursorignore
208
+ .cursorindexingignore
209
+
210
+ # Marimo
211
+ marimo/_static/
212
+ marimo/_lsp/
213
+ __marimo__/
@@ -0,0 +1,69 @@
1
+ default_language_version:
2
+ python: python3.12
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v6.0.0
6
+ hooks:
7
+ - id: check-toml
8
+ - id: check-yaml
9
+ - id: end-of-file-fixer
10
+ - id: mixed-line-ending
11
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
12
+ rev: v0.14.10
13
+ hooks:
14
+ - id: ruff-check
15
+ args: [--fix, --exit-non-zero-on-fix]
16
+ - id: ruff-format
17
+ - repo: https://github.com/PyCQA/bandit
18
+ rev: 1.9.2
19
+ hooks:
20
+ - id: bandit
21
+ files: "^python/kafkars/.*.py$"
22
+ additional_dependencies:
23
+ - ".[toml]"
24
+ args: ["--config=pyproject.toml"]
25
+ - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
26
+ rev: v2.15.0
27
+ hooks:
28
+ - id: pretty-format-rust
29
+ args: [--autofix]
30
+ - repo: https://github.com/igorshubovych/markdownlint-cli
31
+ rev: v0.47.0
32
+ hooks:
33
+ - id: markdownlint
34
+ args:
35
+ - "--fix"
36
+ - repo: https://github.com/astral-sh/uv-pre-commit
37
+ rev: 0.9.21
38
+ hooks:
39
+ - id: uv-lock
40
+ - repo: https://github.com/kynan/nbstripout
41
+ rev: 0.8.2
42
+ hooks:
43
+ - id: nbstripout
44
+ args:
45
+ - "--drop-empty-cells"
46
+ - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
47
+ rev: v2.15.0
48
+ hooks:
49
+ - id: pretty-format-toml
50
+ files: "^.*.toml"
51
+ exclude: "^pyproject.toml$"
52
+ args:
53
+ - "--autofix"
54
+
55
+ - repo: local
56
+ hooks:
57
+ - id: ty
58
+ name: ty-check
59
+ entry: uv run --with=ty ty check
60
+ language: python
61
+ types: [python]
62
+ files: ^python/kafkars/.*
63
+ pass_filenames: true
64
+
65
+
66
+ - repo: https://github.com/tox-dev/pyproject-fmt
67
+ rev: v2.11.1
68
+ hooks:
69
+ - id: pyproject-fmt