wintrace 0.1.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.
@@ -0,0 +1,25 @@
1
+ # Normalize text files to LF in the repository while allowing Git to detect
2
+ # the working-tree convention on each platform.
3
+ * text=auto
4
+
5
+ # Source and configuration files.
6
+ *.py text diff=python
7
+ *.pyi text diff=python
8
+ *.rs text diff=rust
9
+ *.toml text diff=toml
10
+ *.md text
11
+ *.ps1 text
12
+ *.yml text
13
+ *.yaml text
14
+ *.xml text
15
+ Cargo.lock text
16
+ uv.lock text
17
+
18
+ # Common generated or binary artifacts.
19
+ *.dll binary
20
+ *.pdb binary
21
+ *.whl binary
22
+ *.png binary
23
+ *.jpg binary
24
+ *.jpeg binary
25
+ *.gif binary
@@ -0,0 +1,44 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ day: "monday"
8
+ time: "06:00"
9
+ timezone: "America/Santiago"
10
+ groups:
11
+ github-actions:
12
+ patterns:
13
+ - "*"
14
+ open-pull-requests-limit: 5
15
+
16
+ - package-ecosystem: "cargo"
17
+ directory: "/"
18
+ schedule:
19
+ interval: "weekly"
20
+ day: "monday"
21
+ time: "06:00"
22
+ timezone: "America/Santiago"
23
+ groups:
24
+ rust-dependencies:
25
+ patterns:
26
+ - "*"
27
+ open-pull-requests-limit: 5
28
+ commit-message:
29
+ prefix: "deps"
30
+
31
+ - package-ecosystem: "pip"
32
+ directory: "/"
33
+ schedule:
34
+ interval: "weekly"
35
+ day: "monday"
36
+ time: "06:00"
37
+ timezone: "America/Santiago"
38
+ groups:
39
+ python-dependencies:
40
+ patterns:
41
+ - "*"
42
+ open-pull-requests-limit: 5
43
+ commit-message:
44
+ prefix: "deps"
@@ -0,0 +1,185 @@
1
+ # This file is autogenerated by maturin v1.15.0
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: ci
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ tags:
14
+ - '*'
15
+ pull_request:
16
+ workflow_dispatch:
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ linux:
23
+ runs-on: ${{ matrix.platform.runner }}
24
+ strategy:
25
+ matrix:
26
+ platform:
27
+ - runner: ubuntu-22.04
28
+ target: x86_64
29
+ - runner: ubuntu-22.04
30
+ target: aarch64
31
+ - runner: ubuntu-22.04
32
+ target: armv7
33
+ - runner: ubuntu-22.04
34
+ target: ppc64le
35
+ steps:
36
+ - uses: actions/checkout@v6
37
+ - uses: actions/setup-python@v6
38
+ with:
39
+ python-version: "3.x"
40
+ - name: Build wheels
41
+ uses: PyO3/maturin-action@v1
42
+ with:
43
+ target: ${{ matrix.platform.target }}
44
+ args: --release --out dist --find-interpreter
45
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
46
+ manylinux: auto
47
+ - name: Upload wheels
48
+ uses: actions/upload-artifact@v6
49
+ with:
50
+ name: wheels-linux-${{ matrix.platform.target }}
51
+ path: dist
52
+
53
+ musllinux:
54
+ runs-on: ${{ matrix.platform.runner }}
55
+ strategy:
56
+ matrix:
57
+ platform:
58
+ - runner: ubuntu-22.04
59
+ target: x86_64
60
+ - runner: ubuntu-22.04
61
+ target: aarch64
62
+ - runner: ubuntu-22.04
63
+ target: armv7
64
+ steps:
65
+ - uses: actions/checkout@v6
66
+ - uses: actions/setup-python@v6
67
+ with:
68
+ python-version: "3.x"
69
+ - name: Build wheels
70
+ uses: PyO3/maturin-action@v1
71
+ with:
72
+ target: ${{ matrix.platform.target }}
73
+ args: --release --out dist --find-interpreter
74
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
75
+ manylinux: musllinux_1_2
76
+ - name: Upload wheels
77
+ uses: actions/upload-artifact@v6
78
+ with:
79
+ name: wheels-musllinux-${{ matrix.platform.target }}
80
+ path: dist
81
+
82
+ windows:
83
+ runs-on: ${{ matrix.platform.runner }}
84
+ strategy:
85
+ matrix:
86
+ platform:
87
+ - runner: windows-latest
88
+ target: x64
89
+ python_arch: x64
90
+ - runner: windows-11-arm
91
+ target: aarch64
92
+ python_arch: arm64
93
+ steps:
94
+ - uses: actions/checkout@v6
95
+ - uses: actions/setup-python@v6
96
+ with:
97
+ python-version: "3.13"
98
+ architecture: ${{ matrix.platform.python_arch }}
99
+ - name: Build wheels
100
+ uses: PyO3/maturin-action@v1
101
+ with:
102
+ target: ${{ matrix.platform.target }}
103
+ args: --release --out dist --find-interpreter
104
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
105
+ - name: Upload wheels
106
+ uses: actions/upload-artifact@v6
107
+ with:
108
+ name: wheels-windows-${{ matrix.platform.target }}
109
+ path: dist
110
+
111
+ macos:
112
+ runs-on: ${{ matrix.platform.runner }}
113
+ strategy:
114
+ matrix:
115
+ platform:
116
+ - runner: macos-15-intel
117
+ target: x86_64
118
+ - runner: macos-latest
119
+ target: aarch64
120
+ steps:
121
+ - uses: actions/checkout@v6
122
+ - uses: actions/setup-python@v6
123
+ with:
124
+ python-version: "3.x"
125
+ - name: Build wheels
126
+ uses: PyO3/maturin-action@v1
127
+ with:
128
+ target: ${{ matrix.platform.target }}
129
+ args: --release --out dist --find-interpreter
130
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
131
+ - name: Upload wheels
132
+ uses: actions/upload-artifact@v6
133
+ with:
134
+ name: wheels-macos-${{ matrix.platform.target }}
135
+ path: dist
136
+
137
+ sdist:
138
+ runs-on: ubuntu-latest
139
+ steps:
140
+ - uses: actions/checkout@v6
141
+ - name: Build sdist
142
+ uses: PyO3/maturin-action@v1
143
+ with:
144
+ command: sdist
145
+ args: --out dist
146
+ - name: Upload sdist
147
+ uses: actions/upload-artifact@v6
148
+ with:
149
+ name: wheels-sdist
150
+ path: dist
151
+
152
+ tests:
153
+ runs-on: windows-latest
154
+ steps:
155
+ - uses: actions/checkout@v6
156
+ - uses: actions/setup-python@v6
157
+ with:
158
+ python-version: "3.13"
159
+ - uses: actions-rust-lang/setup-rust-toolchain@v1
160
+ - name: Set up virtual environment
161
+ run: |
162
+ $venv = Join-Path $env:GITHUB_WORKSPACE ".venv"
163
+ python -m venv $venv
164
+ "$venv\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
165
+ "VIRTUAL_ENV=$venv" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
166
+ - name: Install Maturin
167
+ run: python -m pip install maturin
168
+ - name: Build and install extension
169
+ run: maturin develop --locked
170
+ - name: Run Python API tests
171
+ run: python -m unittest discover -s tests -v
172
+ - name: Run Rust unit tests
173
+ run: cargo test --no-default-features
174
+
175
+ docs:
176
+ runs-on: ubuntu-latest
177
+ steps:
178
+ - uses: actions/checkout@v6
179
+ - uses: actions/setup-python@v6
180
+ with:
181
+ python-version: "3.13"
182
+ - name: Install documentation dependencies
183
+ run: python -m pip install -r docs/requirements.txt
184
+ - name: Build documentation
185
+ run: mkdocs build --strict
@@ -0,0 +1,245 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+ inputs:
9
+ tag:
10
+ description: "Release tag to build and publish, for example v0.1.0"
11
+ required: true
12
+ type: string
13
+ publish:
14
+ description: "Publish to PyPI after validation (disable for a rehearsal)"
15
+ required: true
16
+ type: boolean
17
+ default: true
18
+
19
+ concurrency:
20
+ group: release-${{ inputs.tag || github.ref_name }}
21
+ cancel-in-progress: false
22
+
23
+ permissions:
24
+ contents: read
25
+
26
+ jobs:
27
+ validate:
28
+ runs-on: windows-latest
29
+ outputs:
30
+ sha: ${{ steps.source.outputs.sha }}
31
+ steps:
32
+ - uses: actions/checkout@v6
33
+ with:
34
+ ref: ${{ inputs.tag || github.ref }}
35
+ - uses: actions/setup-python@v6
36
+ with:
37
+ python-version: "3.13"
38
+ - uses: actions-rust-lang/setup-rust-toolchain@v1
39
+ - name: Set up virtual environment
40
+ run: |
41
+ $venv = Join-Path $env:GITHUB_WORKSPACE ".venv"
42
+ python -m venv $venv
43
+ "$venv\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
44
+ "VIRTUAL_ENV=$venv" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
45
+ - name: Validate release tag and package version
46
+ env:
47
+ RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
48
+ shell: bash
49
+ run: |
50
+ python - <<'PY'
51
+ import os
52
+ import pathlib
53
+ import tomllib
54
+
55
+ tag = os.environ["RELEASE_TAG"]
56
+ if not tag.startswith("v"):
57
+ raise SystemExit(f"Release tag must start with 'v': {tag}")
58
+
59
+ cargo = tomllib.loads(pathlib.Path("Cargo.toml").read_text(encoding="utf-8"))
60
+ version = cargo["package"]["version"]
61
+ if tag[1:] != version:
62
+ raise SystemExit(
63
+ f"Release tag {tag} does not match Cargo.toml version {version}"
64
+ )
65
+ PY
66
+ - name: Install Maturin
67
+ run: python -m pip install maturin
68
+ - name: Build and install extension
69
+ run: maturin develop --locked
70
+ - name: Run Python API tests
71
+ run: python -m unittest discover -s tests -v
72
+ - name: Run Rust unit tests
73
+ run: cargo test --locked --no-default-features
74
+ - name: Build documentation
75
+ run: |
76
+ python -m pip install -r docs/requirements.txt
77
+ mkdocs build --strict
78
+ - name: Resolve immutable build commit
79
+ id: source
80
+ shell: bash
81
+ run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
82
+
83
+ linux:
84
+ needs: validate
85
+ runs-on: ${{ matrix.platform.runner }}
86
+ strategy:
87
+ matrix:
88
+ platform:
89
+ - runner: ubuntu-22.04
90
+ target: x86_64
91
+ - runner: ubuntu-22.04
92
+ target: aarch64
93
+ - runner: ubuntu-22.04
94
+ target: armv7
95
+ - runner: ubuntu-22.04
96
+ target: ppc64le
97
+ steps:
98
+ - uses: actions/checkout@v6
99
+ with:
100
+ ref: ${{ needs.validate.outputs.sha }}
101
+ - uses: actions/setup-python@v6
102
+ with:
103
+ python-version: "3.13"
104
+ - uses: PyO3/maturin-action@v1
105
+ with:
106
+ target: ${{ matrix.platform.target }}
107
+ args: --release --locked --out dist --find-interpreter
108
+ manylinux: auto
109
+ - uses: actions/upload-artifact@v6
110
+ with:
111
+ name: wheels-linux-${{ matrix.platform.target }}
112
+ path: dist
113
+
114
+ musllinux:
115
+ needs: validate
116
+ runs-on: ${{ matrix.platform.runner }}
117
+ strategy:
118
+ matrix:
119
+ platform:
120
+ - runner: ubuntu-22.04
121
+ target: x86_64
122
+ - runner: ubuntu-22.04
123
+ target: aarch64
124
+ - runner: ubuntu-22.04
125
+ target: armv7
126
+ steps:
127
+ - uses: actions/checkout@v6
128
+ with:
129
+ ref: ${{ needs.validate.outputs.sha }}
130
+ - uses: actions/setup-python@v6
131
+ with:
132
+ python-version: "3.13"
133
+ - uses: PyO3/maturin-action@v1
134
+ with:
135
+ target: ${{ matrix.platform.target }}
136
+ args: --release --locked --out dist --find-interpreter
137
+ manylinux: musllinux_1_2
138
+ - uses: actions/upload-artifact@v6
139
+ with:
140
+ name: wheels-musllinux-${{ matrix.platform.target }}
141
+ path: dist
142
+
143
+ windows:
144
+ needs: validate
145
+ runs-on: ${{ matrix.platform.runner }}
146
+ strategy:
147
+ matrix:
148
+ platform:
149
+ - runner: windows-latest
150
+ target: x64
151
+ python_arch: x64
152
+ - runner: windows-11-arm
153
+ target: aarch64
154
+ python_arch: arm64
155
+ steps:
156
+ - uses: actions/checkout@v6
157
+ with:
158
+ ref: ${{ needs.validate.outputs.sha }}
159
+ - uses: actions/setup-python@v6
160
+ with:
161
+ python-version: "3.13"
162
+ architecture: ${{ matrix.platform.python_arch }}
163
+ - uses: PyO3/maturin-action@v1
164
+ with:
165
+ target: ${{ matrix.platform.target }}
166
+ args: --release --locked --out dist --find-interpreter
167
+ - name: Test built Windows wheel
168
+ run: |
169
+ python -m pip install --force-reinstall --no-deps --no-index --find-links dist wintrace
170
+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
171
+ python -m unittest discover -s tests -v
172
+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
173
+ - uses: actions/upload-artifact@v6
174
+ with:
175
+ name: wheels-windows-${{ matrix.platform.target }}
176
+ path: dist
177
+
178
+ macos:
179
+ needs: validate
180
+ runs-on: ${{ matrix.platform.runner }}
181
+ strategy:
182
+ matrix:
183
+ platform:
184
+ - runner: macos-15-intel
185
+ target: x86_64
186
+ - runner: macos-latest
187
+ target: aarch64
188
+ steps:
189
+ - uses: actions/checkout@v6
190
+ with:
191
+ ref: ${{ needs.validate.outputs.sha }}
192
+ - uses: actions/setup-python@v6
193
+ with:
194
+ python-version: "3.13"
195
+ - uses: PyO3/maturin-action@v1
196
+ with:
197
+ target: ${{ matrix.platform.target }}
198
+ args: --release --locked --out dist --find-interpreter
199
+ - uses: actions/upload-artifact@v6
200
+ with:
201
+ name: wheels-macos-${{ matrix.platform.target }}
202
+ path: dist
203
+
204
+ sdist:
205
+ needs: validate
206
+ runs-on: ubuntu-latest
207
+ steps:
208
+ - uses: actions/checkout@v6
209
+ with:
210
+ ref: ${{ needs.validate.outputs.sha }}
211
+ - uses: actions/setup-python@v6
212
+ with:
213
+ python-version: "3.13"
214
+ - name: Install Maturin and Twine
215
+ run: python -m pip install "maturin>=1.15,<2.0" "twine>=6.1,<7.0"
216
+ - name: Build source distribution
217
+ run: maturin sdist --out dist
218
+ - name: Validate source distribution metadata
219
+ run: python -m twine check --strict dist/*
220
+ - uses: actions/upload-artifact@v6
221
+ with:
222
+ name: wheels-sdist
223
+ path: dist
224
+
225
+ publish:
226
+ if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && inputs.publish)
227
+ runs-on: ubuntu-latest
228
+ needs: [linux, musllinux, windows, macos, sdist]
229
+ environment:
230
+ name: pypi
231
+ url: https://pypi.org/p/wintrace
232
+ permissions:
233
+ id-token: write
234
+ contents: write
235
+ steps:
236
+ - uses: actions/download-artifact@v6
237
+ - uses: astral-sh/setup-uv@v7
238
+ - name: Publish distributions to PyPI
239
+ run: uv publish --trusted-publishing always --check-url https://pypi.org/simple/ "wheels-*/*"
240
+ - name: Create or update GitHub Release
241
+ uses: softprops/action-gh-release@v3
242
+ if: startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && inputs.tag != '')
243
+ with:
244
+ tag_name: ${{ inputs.tag || github.ref_name }}
245
+ prerelease: ${{ contains(inputs.tag || github.ref_name, '-') }}
@@ -0,0 +1,76 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+ *.pdb
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ .venv/
15
+ env/
16
+ bin/
17
+ build/
18
+ develop-eggs/
19
+ dist/
20
+ eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ include/
27
+ man/
28
+ venv/
29
+ *.egg-info/
30
+ .installed.cfg
31
+ *.egg
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+ pip-selfcheck.json
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .cache
43
+ nosetests.xml
44
+ coverage.xml
45
+
46
+ # Translations
47
+ *.mo
48
+
49
+ # Mr Developer
50
+ .mr.developer.cfg
51
+ .project
52
+ .pydevproject
53
+
54
+ # Rope
55
+ .ropeproject
56
+
57
+ # Django stuff:
58
+ *.log
59
+ *.pot
60
+
61
+ .DS_Store
62
+
63
+ # Sphinx documentation
64
+ docs/_build/
65
+
66
+ # PyCharm
67
+ .idea/
68
+
69
+ # VSCode
70
+ .vscode/
71
+
72
+ # Pyenv
73
+ .python-version
74
+
75
+ # Temp files
76
+ temp/
@@ -0,0 +1,13 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-24.04
5
+ tools:
6
+ python: "3.13"
7
+
8
+ mkdocs:
9
+ configuration: mkdocs.yml
10
+
11
+ python:
12
+ install:
13
+ - requirements: docs/requirements.txt
@@ -0,0 +1,36 @@
1
+ # Project Guidelines
2
+
3
+ ## Architecture
4
+
5
+ - Rust/PyO3 implements the extension in `src/`; the Python package facade is
6
+ under `python/wintrace/`.
7
+ - Keep the public Python wrappers and `_wintrace.pyi` stub aligned with the
8
+ extension API.
9
+ - Live Windows Event Log queries are platform-specific; EVTX and XML parsing
10
+ should remain portable.
11
+ - The minimum supported Python version is 3.10. See
12
+ [docs/architecture.md](docs/architecture.md) for component details.
13
+
14
+ ## Build and Test
15
+
16
+ Use the commands and setup in [CONTRIBUTING.md](CONTRIBUTING.md). At minimum,
17
+ run formatting, Rust tests, and the Python unittest suite for relevant changes.
18
+ Live-query integration tests require Windows.
19
+
20
+ ## Changes
21
+
22
+ - Add or update tests for behavior changes.
23
+ - Update API documentation and `CHANGELOG.md` when user-visible behavior
24
+ changes.
25
+ - Do not commit generated binaries, private event logs, or credentials.
26
+
27
+ ## Release Tag
28
+
29
+ - The local annotated `v0.1.0` tag should identify the final release commit.
30
+ - Before publishing, compare it with `origin` using
31
+ `git show --no-patch --format="%H" v0.1.0` and
32
+ `git ls-remote --tags origin "refs/tags/v0.1.0*"`. Local and remote tags may
33
+ differ.
34
+ - Updating the remote tag triggers the Publish workflow. Do not force-update or
35
+ push a release tag without explicit user approval; verify the PyPI version
36
+ state first.
@@ -0,0 +1,21 @@
1
+ # Changelog
2
+
3
+ Notable changes to `wintrace` are documented here.
4
+
5
+ ## [Unreleased]
6
+
7
+ ### Planned
8
+
9
+ - Compatible fixes and maintenance updates.
10
+
11
+ ## [0.1.0]
12
+
13
+ ### Added
14
+
15
+ - Live Windows Event Log channel queries with XPath filtering and forward or
16
+ reverse record order.
17
+ - Offline EVTX file parsing with iterator and context-manager APIs.
18
+ - Record, dictionary, XML, and JSON result formats.
19
+ - Event metadata accessors and XML-to-dictionary/JSON helpers.
20
+ - Typed Python package surface, API documentation, and tests.
21
+ - Python 3.10 or newer is required.
@@ -0,0 +1,8 @@
1
+ # Claude Code Guidance
2
+
3
+ Follow the repository-wide guidance in [AGENTS.md](AGENTS.md) and contribution
4
+ requirements in [CONTRIBUTING.md](CONTRIBUTING.md).
5
+
6
+ Keep Rust/PyO3 behavior, Python wrappers, type stubs, tests, and documentation
7
+ consistent when changing the public API. Run the relevant validation commands
8
+ before reporting a change as complete.
@@ -0,0 +1,19 @@
1
+ # Code of Conduct
2
+
3
+ We want participation in the `wintrace` project to be respectful, constructive,
4
+ and welcoming to people with different backgrounds and experience levels.
5
+
6
+ Examples of expected behavior:
7
+
8
+ - Be considerate and respectful in discussions and reviews.
9
+ - Give actionable, technically focused feedback.
10
+ - Accept that people may disagree; discuss ideas without personal attacks.
11
+ - Respect privacy and do not publish another person's private information.
12
+
13
+ Harassment, discrimination, intimidation, personal attacks, and disruptive
14
+ behavior are not acceptable. Maintainers may edit or remove contributions and
15
+ may restrict participation when necessary to protect the community.
16
+
17
+ To report a conduct concern, contact the maintainers privately through the
18
+ [project maintainer profile](https://github.com/ezer-mackenzie). Do not post
19
+ sensitive details in a public issue.