libxrk 0.7.0__cp312-cp312-win_amd64.whl

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,236 @@
1
+ Metadata-Version: 2.4
2
+ Name: libxrk
3
+ Version: 0.7.0
4
+ Summary: Library for reading AIM XRK files from AIM automotive data loggers
5
+ License-File: LICENSE
6
+ Author: Christopher Dewan
7
+ Author-email: chris.dewan@m3rlin.net
8
+ Requires-Python: >=3.10
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Programming Language :: Cython
19
+ Classifier: Topic :: Scientific/Engineering
20
+ Provides-Extra: dev
21
+ Provides-Extra: test
22
+ Requires-Dist: cython (>=3.0.0)
23
+ Requires-Dist: numpy (>=1.26.0) ; python_version < "3.13"
24
+ Requires-Dist: numpy (>=2.1.0) ; python_version == "3.13"
25
+ Requires-Dist: numpy (>=2.4.0) ; python_version >= "3.14"
26
+ Requires-Dist: parameterized (>=0.9.0) ; extra == "dev"
27
+ Requires-Dist: parameterized (>=0.9.0) ; extra == "test"
28
+ Requires-Dist: pyarrow (>=18.1.0) ; python_version < "3.14"
29
+ Requires-Dist: pyarrow (>=22.0.0) ; python_version >= "3.14"
30
+ Requires-Dist: pytest (>=7.0.0) ; extra == "dev"
31
+ Requires-Dist: pytest (>=7.0.0) ; extra == "test"
32
+ Requires-Dist: setuptools (>=68.0.0) ; extra == "dev"
33
+ Project-URL: Homepage, https://github.com/m3rlin45/libxrk
34
+ Project-URL: Issues, https://github.com/m3rlin45/libxrk/issues
35
+ Project-URL: Repository, https://github.com/m3rlin45/libxrk
36
+ Description-Content-Type: text/markdown
37
+
38
+ # libxrk
39
+
40
+ A Python library for reading AIM XRK and XRZ files from AIM automotive data loggers.
41
+
42
+ ## Features
43
+
44
+ - Read AIM XRK files (raw data logs)
45
+ - Read AIM XRZ files (zlib-compressed XRK files)
46
+ - Parse track data and telemetry channels
47
+ - GPS coordinate conversion and lap detection
48
+ - High-performance Cython implementation
49
+ - Supports Python 3.10 - 3.14
50
+
51
+ ## Installation
52
+
53
+ ### Install from PyPI
54
+
55
+ ```bash
56
+ pip install libxrk
57
+ ```
58
+
59
+ ### Install from Source
60
+
61
+ #### Prerequisites
62
+
63
+ On Ubuntu/Debian:
64
+ ```bash
65
+ sudo apt install build-essential python3-dev
66
+ ```
67
+
68
+ #### Install with Poetry
69
+
70
+ ```bash
71
+ poetry install
72
+ ```
73
+
74
+ The Cython extension will be automatically compiled during installation.
75
+
76
+ ## Usage
77
+
78
+ ```python
79
+ from libxrk import aim_xrk
80
+
81
+ # Read an XRK file
82
+ log = aim_xrk('path/to/file.xrk')
83
+
84
+ # Read an XRZ file (automatically decompressed)
85
+ log = aim_xrk('path/to/file.xrz')
86
+
87
+ # Access channels (each channel is a PyArrow table with 'timecodes' and value columns)
88
+ for channel_name, channel_table in log.channels.items():
89
+ print(f"{channel_name}: {channel_table.num_rows} samples")
90
+
91
+ # Get all channels merged into a single PyArrow table
92
+ # (handles different sample rates with interpolation/forward-fill)
93
+ merged_table = log.get_channels_as_table()
94
+ print(merged_table.column_names)
95
+
96
+ # Convert to pandas DataFrame
97
+ df = merged_table.to_pandas()
98
+
99
+ # Access laps (PyArrow table with 'num', 'start_time', 'end_time' columns)
100
+ print(f"Laps: {log.laps.num_rows}")
101
+ for i in range(log.laps.num_rows):
102
+ lap_num = log.laps.column("num")[i].as_py()
103
+ start = log.laps.column("start_time")[i].as_py()
104
+ end = log.laps.column("end_time")[i].as_py()
105
+ print(f"Lap {lap_num}: {start} - {end}")
106
+
107
+ # Access metadata
108
+ print(log.metadata)
109
+ # Includes: Driver, Vehicle, Venue, Log Date/Time, Logger ID, Logger Model, Device Name, etc.
110
+ ```
111
+
112
+ ### Filtering and Resampling
113
+
114
+ ```python
115
+ from libxrk import aim_xrk
116
+
117
+ log = aim_xrk('session.xrk')
118
+
119
+ # Select specific channels
120
+ gps_log = log.select_channels(['GPS Latitude', 'GPS Longitude', 'GPS Speed'])
121
+
122
+ # Filter to a time range (milliseconds, inclusive start, exclusive end)
123
+ segment = log.filter_by_time_range(60000, 120000)
124
+
125
+ # Filter to a specific lap
126
+ lap5 = log.filter_by_lap(5)
127
+
128
+ # Combine filtering and channel selection
129
+ lap5_gps = log.filter_by_lap(5, channel_names=['GPS Latitude', 'GPS Longitude'])
130
+
131
+ # Resample all channels to match a reference channel's timebase
132
+ aligned = log.resample_to_channel('GPS Speed')
133
+
134
+ # Resample to a custom timebase
135
+ import pyarrow as pa
136
+ target = pa.array(range(0, 100000, 100), type=pa.int64()) # 10 Hz
137
+ resampled = log.resample_to_timecodes(target)
138
+
139
+ # Chain operations for analysis workflows
140
+ df = (log
141
+ .filter_by_lap(5)
142
+ .select_channels(['Engine RPM', 'GPS Speed'])
143
+ .resample_to_channel('GPS Speed')
144
+ .get_channels_as_table()
145
+ .to_pandas())
146
+ ```
147
+
148
+ All filtering and resampling methods return new `LogFile` instances (immutable pattern), enabling method chaining for complex analysis workflows.
149
+
150
+ ## Development
151
+
152
+ ### Quick Check
153
+ ```bash
154
+ # Run all quality checks (format check, type check, tests)
155
+ poetry run poe check
156
+ ```
157
+
158
+ ### Code Formatting
159
+
160
+ This project uses [Black](https://black.readthedocs.io/) for code formatting.
161
+
162
+ ```bash
163
+ # Format all Python files
164
+ poetry run black .
165
+ ```
166
+
167
+ ### Type Checking
168
+
169
+ This project uses [mypy](https://mypy.readthedocs.io/) for static type checking.
170
+
171
+ ```bash
172
+ # Run type checker on all Python files
173
+ poetry run mypy .
174
+ ```
175
+
176
+ ### Running Tests
177
+
178
+ This project uses [pytest](https://pytest.org/) for testing.
179
+
180
+ ```bash
181
+ # Run all tests
182
+ poetry run pytest
183
+
184
+ # Run tests with verbose output
185
+ poetry run pytest -v
186
+
187
+ # Run specific test file
188
+ poetry run pytest tests/test_xrk_loading.py
189
+
190
+ # Run tests with coverage
191
+ poetry run pytest --cov=libxrk
192
+ ```
193
+
194
+ ### Testing with Pyodide (WebAssembly)
195
+
196
+ You can test the library in a WebAssembly environment using Pyodide.
197
+ This requires Node.js to be installed.
198
+
199
+ ```bash
200
+ # Build and run tests in Pyodide (installs Emscripten SDK to build/emsdk if needed)
201
+ poetry run poe pyodide-test
202
+ ```
203
+
204
+ Note: Pyodide tests run automatically in CI via GitHub Actions.
205
+
206
+ ### Building
207
+
208
+ ```bash
209
+ # Build CPython wheel and sdist
210
+ poetry build
211
+
212
+ # Build all wheels (CPython, Pyodide/WebAssembly, and sdist)
213
+ poetry run poe build-all
214
+ ```
215
+
216
+ ### Clean Build
217
+
218
+ ```bash
219
+ # Clean all build artifacts and rebuild
220
+ rm -rf build/ dist/ src/libxrk/*.so && poetry install
221
+ ```
222
+
223
+ ## Testing
224
+
225
+ The project includes end-to-end tests that validate XRK and XRZ file loading and parsing.
226
+
227
+ Test files are located in `tests/test_data/` and include real XRK and XRZ files for validation.
228
+
229
+ ## Credits
230
+
231
+ This project incorporates code from [TrackDataAnalysis](https://github.com/racer-coder/TrackDataAnalysis) by Scott Smith, used under the MIT License.
232
+
233
+ ## License
234
+
235
+ MIT License - See LICENSE file for details.
236
+
@@ -0,0 +1,12 @@
1
+ libxrk/__init__.py,sha256=WQFJHgC84JOzPQggxb3ZnEIaHHqydN0NABBTbaZs4bo,877
2
+ libxrk/aim_xrk.cp312-win_amd64.pyd,sha256=1rmNqugcuL8FlErE3mkwmnG5QVqJG7qcpwd4gY4kZCA,392192
3
+ libxrk/aim_xrk.pyi,sha256=vSo9tEZ58n5_PBfQwKtsAlsErsL34Q42-ZelYIVCUa8,1197
4
+ libxrk/aim_xrk.pyx,sha256=uZslq0fCrUx1YuuRmy7UfQp1zygxX80acqgJyLzqbJI,42990
5
+ libxrk/base.py,sha256=GXlysZzOJUrcLQFdskU5xfj111ryazUlJXn4Mh8h3T8,13042
6
+ libxrk/CLAUDE.md,sha256=ffQoJfmdq7_z_9t_NRdJ3HrvIwLwxn28QHLOI8RuDlM,3607
7
+ libxrk/gps.py,sha256=D_opONz_zI8BQJ7DyP0vWeZhmOL8mnjSrkCX9-jeQjg,22880
8
+ libxrk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ libxrk-0.7.0.dist-info/licenses/LICENSE,sha256=2raWmO-YvfSbuanWCUMU4b5Fe06QhxuKxbEDyKjfzqg,1179
10
+ libxrk-0.7.0.dist-info/METADATA,sha256=NGRt5GuPscEapaZTW-5UUDjsHbsBNvKogjiYpV8g8qA,6379
11
+ libxrk-0.7.0.dist-info/WHEEL,sha256=CTZ070-uhrCLET1GWGW19zH-v_oiwMNp30GZc6s-CpU,98
12
+ libxrk-0.7.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.3.0
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-win_amd64
@@ -0,0 +1,25 @@
1
+ MIT License
2
+
3
+ (For components copied from TrackDataAnalysis)
4
+ Copyright (c) 2024 Scott Smith
5
+
6
+ Copyright (c) 2025 Christopher Dewan
7
+
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.