Skip to content

Commit bba42b2

Browse files
committed
Split datalog from wpiutil
1 parent c9964dc commit bba42b2

File tree

18 files changed

+175
-47
lines changed

18 files changed

+175
-47
lines changed

rdev.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ hatch-robotpy = "~=0.2"
4444
py_version = "native"
4545
robot = true
4646

47+
[subprojects."robotpy-native-datalog"]
48+
py_version = "native"
49+
robot = true
50+
4751
[subprojects."robotpy-native-wpinet"]
4852
py_version = "native"
4953
robot = true
@@ -80,6 +84,10 @@ robot = false
8084
py_version = "wrapper"
8185
robot = true
8286

87+
[subprojects."robotpy-wpilog"]
88+
py_version = "wrapper"
89+
robot = true
90+
8391
[subprojects."robotpy-wpinet"]
8492
py_version = "wrapper"
8593
robot = true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist
2+
/src
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[build-system]
2+
build-backend = "hatchling.build"
3+
requires = [
4+
"hatchling",
5+
"hatch-nativelib~=0.2.0",
6+
"hatch-robotpy~=0.2",
7+
"robotpy-native-wpiutil==2027.0.0a1",
8+
]
9+
10+
[project]
11+
name = "robotpy-native-datalog"
12+
version = "2027.0.0a1"
13+
description = "WPILib Utility Library"
14+
license = "BSD-3-Clause"
15+
16+
dependencies = [
17+
"robotpy-native-wpiutil==2027.0.0a1",
18+
]
19+
20+
[tool.hatch.build.targets.wheel]
21+
packages = ["src/native"]
22+
23+
24+
[[tool.hatch.build.hooks.robotpy.maven_lib_download]]
25+
artifact_id = "datalog-cpp"
26+
group_id = "edu.wpi.first.datalog"
27+
repo_url = "https://frcmaven.wpi.edu/artifactory/release-2027"
28+
version = "2027.0.0-alpha-1"
29+
30+
extract_to = "src/native/datalog"
31+
libs = ["datalog"]
32+
33+
[[tool.hatch.build.hooks.nativelib.pcfile]]
34+
pcfile = "src/native/datalog/robotpy-native-datalog.pc"
35+
name = "datalog"
36+
37+
includedir = "src/native/datalog/include"
38+
libdir = "src/native/datalog/lib"
39+
shared_libraries = ["datalog"]
40+
requires = ["robotpy-native-wpiutil"]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/build
2+
/dist
3+
*.pc
4+
*.so
5+
*.dll
6+
*.dylib
7+
8+
/wpilog/_init__wpilog.py
9+
/wpilog/version.py
10+
/wpilog/trampolines
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
project('robotpy-wpilog', ['cpp'],
2+
default_options: ['warning_level=1', 'cpp_std=c++20',
3+
'b_colorout=auto', 'optimization=2', 'b_pie=true'])
4+
5+
subdir('semiwrap')
6+
7+
wpilog_sources += files(
8+
'src/main.cpp',
9+
)
10+
11+
subdir('semiwrap/modules')
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[build-system]
2+
build-backend = "hatchling.build"
3+
requires = [
4+
"semiwrap~=0.1.2",
5+
"hatch-meson~=0.1.0b2",
6+
"hatchling",
7+
"robotpy-native-datalog==2027.0.0a1",
8+
"robotpy-wpiutil==2027.0.0a1"
9+
]
10+
11+
[project]
12+
name = "robotpy-wpilog"
13+
version = "2027.0.0a1"
14+
description = "Binary wrapper for FRC wpilog library"
15+
authors = [
16+
{name = "RobotPy Development Team", email = "[email protected]"},
17+
]
18+
license = "BSD-3-Clause"
19+
dependencies = [
20+
"robotpy-native-datalog==2027.0.0a1",
21+
"robotpy-wpiutil==2027.0.0a1"
22+
]
23+
24+
[project.urls]
25+
"Source code" = "https://github.com/robotpy/mostrobotpy"
26+
27+
28+
[tool.hatch.build.hooks.robotpy]
29+
version_file = "wpilog/version.py"
30+
31+
[tool.hatch.build.hooks.semiwrap]
32+
33+
[tool.hatch.build.hooks.meson]
34+
35+
[tool.hatch.build.targets.wheel]
36+
packages = ["wpilog"]
37+
38+
39+
[tool.semiwrap]
40+
update_init = [
41+
"wpilog"
42+
]
43+
scan_headers_ignore = [
44+
# wpi/datalog
45+
"wpi/datalog/DataLog_c.h",
46+
"wpi/datalog/DataLogReaderThread.h",
47+
"wpi/datalog/FileLogger.h",
48+
]
49+
50+
[tool.semiwrap.extension_modules."wpilog._wpilog"]
51+
name = "wpilog"
52+
wraps = ["robotpy-native-datalog"]
53+
depends = ["wpiutil"]
54+
55+
[tool.semiwrap.extension_modules."wpilog._wpilog".headers]
56+
# wpi/datalog
57+
DataLog = "wpi/datalog/DataLog.h"
58+
DataLogBackgroundWriter = "wpi/datalog/DataLogBackgroundWriter.h"
59+
DataLogReader = "wpi/datalog/DataLogReader.h"
60+
# DataLogReaderThread = "wpi/datalog/DataLogReaderThread.h"
61+
DataLogWriter = "wpi/datalog/DataLogWriter.h"
62+
# DataLog_c = "wpi/datalog/DataLog_c.h"
63+
# FileLogger = "wpi/datalog/FileLogger.h"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/meson.build
2+
/modules/meson.build
3+
/trampolines/meson.build

subprojects/robotpy-wpiutil/semiwrap/DataLog.yml renamed to subprojects/robotpy-wpilog/semiwrap/DataLog.yml

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
2-
defaults:
3-
ignore: true
4-
report_ignored_missing: false
2+
# defaults:
3+
# ignore: true
4+
# report_ignored_missing: false
55
enums:
66
ControlRecordType:
77
classes:
88
wpi::log::DataLog:
9-
subpackage: log
109
attributes:
1110
kBlockSize:
1211
s_defaultMessageLog:
@@ -72,7 +71,6 @@ classes:
7271
BufferHalfFull:
7372
BufferFull:
7473
wpi::log::DataLogEntry:
75-
subpackage: log
7674
force_no_trampoline: true
7775
methods:
7876
SetMetadata:
@@ -100,7 +98,6 @@ classes:
10098
ignore: true
10199
DataLog&, std::string_view, std::string_view, std::string_view, int64_t:
102100
wpi::log::RawLogEntry:
103-
subpackage: log
104101
force_no_trampoline: true
105102
attributes:
106103
kDataType:
@@ -115,7 +112,6 @@ classes:
115112
Append:
116113
Update:
117114
wpi::log::BooleanLogEntry:
118-
subpackage: log
119115
force_no_trampoline: true
120116
attributes:
121117
kDataType:
@@ -129,7 +125,6 @@ classes:
129125
Append:
130126
Update:
131127
wpi::log::IntegerLogEntry:
132-
subpackage: log
133128
force_no_trampoline: true
134129
attributes:
135130
kDataType:
@@ -143,7 +138,6 @@ classes:
143138
Append:
144139
Update:
145140
wpi::log::FloatLogEntry:
146-
subpackage: log
147141
force_no_trampoline: true
148142
attributes:
149143
kDataType:
@@ -157,7 +151,6 @@ classes:
157151
Append:
158152
Update:
159153
wpi::log::DoubleLogEntry:
160-
subpackage: log
161154
force_no_trampoline: true
162155
attributes:
163156
kDataType:
@@ -171,7 +164,6 @@ classes:
171164
Append:
172165
Update:
173166
wpi::log::StringLogEntry:
174-
subpackage: log
175167
force_no_trampoline: true
176168
attributes:
177169
kDataType:
@@ -186,7 +178,6 @@ classes:
186178
Append:
187179
Update:
188180
wpi::log::BooleanArrayLogEntry:
189-
subpackage: log
190181
force_no_trampoline: true
191182
attributes:
192183
kDataType:
@@ -219,7 +210,6 @@ classes:
219210
std::span<const uint8_t>, int64_t:
220211
ignore: true
221212
wpi::log::IntegerArrayLogEntry:
222-
subpackage: log
223213
force_no_trampoline: true
224214
attributes:
225215
kDataType:
@@ -241,7 +231,6 @@ classes:
241231
std::initializer_list<int64_t>, int64_t:
242232
ignore: true
243233
wpi::log::FloatArrayLogEntry:
244-
subpackage: log
245234
force_no_trampoline: true
246235
attributes:
247236
kDataType:
@@ -263,7 +252,6 @@ classes:
263252
std::initializer_list<float>, int64_t:
264253
ignore: true
265254
wpi::log::DoubleArrayLogEntry:
266-
subpackage: log
267255
force_no_trampoline: true
268256
attributes:
269257
kDataType:
@@ -285,7 +273,6 @@ classes:
285273
std::initializer_list<double>, int64_t:
286274
ignore: true
287275
wpi::log::StringArrayLogEntry:
288-
subpackage: log
289276
force_no_trampoline: true
290277
attributes:
291278
kDataType:
@@ -373,7 +360,6 @@ classes:
373360
ignore: true
374361
std::span<const T>, int64_t:
375362
wpi::log::ProtobufLogEntry:
376-
subpackage: log
377363
force_no_trampoline: true
378364
ignore: true
379365
methods:
@@ -387,69 +373,56 @@ classes:
387373
templates:
388374
StructLogEntry:
389375
qualname: wpi::log::StructLogEntry
390-
subpackage: log
391376
params:
392377
- WPyStruct
393378
- WPyStructInfo
394379
StructArrayLogEntry:
395380
qualname: wpi::log::StructArrayLogEntry
396-
subpackage: log
397381
params:
398382
- WPyStruct
399383
- WPyStructInfo
400384

401385
_RawLogEntryImpl:
402386
qualname: wpi::log::DataLogValueEntryImpl
403-
subpackage: log
404387
params:
405388
- std::vector<uint8_t>
406389
_BooleanLogEntryImpl:
407390
qualname: wpi::log::DataLogValueEntryImpl
408-
subpackage: log
409391
params:
410392
- bool
411393
_IntegerLogEntryImpl:
412394
qualname: wpi::log::DataLogValueEntryImpl
413-
subpackage: log
414395
params:
415396
- int64_t
416397
_FloatLogEntryImpl:
417398
qualname: wpi::log::DataLogValueEntryImpl
418-
subpackage: log
419399
params:
420400
- float
421401
_DoubleLogEntryImpl:
422402
qualname: wpi::log::DataLogValueEntryImpl
423-
subpackage: log
424403
params:
425404
- double
426405
_StringLogEntryImpl:
427406
qualname: wpi::log::DataLogValueEntryImpl
428-
subpackage: log
429407
params:
430408
- std::string
431409
_BooleanArrayLogEntryImpl:
432410
qualname: wpi::log::DataLogValueEntryImpl
433-
subpackage: log
434411
params:
435412
- std::vector<int>
436413
_IntegerArrayLogEntryImpl:
437414
qualname: wpi::log::DataLogValueEntryImpl
438-
subpackage: log
439415
params:
440416
- std::vector<int64_t>
441417
_FloatArrayLogEntryImpl:
442418
qualname: wpi::log::DataLogValueEntryImpl
443-
subpackage: log
444419
params:
445420
- std::vector<float>
446421
_DoubleArrayLogEntryImpl:
447422
qualname: wpi::log::DataLogValueEntryImpl
448-
subpackage: log
449423
params:
450424
- std::vector<double>
451425
_StringArrayLogEntryImpl:
452426
qualname: wpi::log::DataLogValueEntryImpl
453-
subpackage: log
454427
params:
455428
- std::vector<std::string>

subprojects/robotpy-wpiutil/semiwrap/DataLogReader.yml renamed to subprojects/robotpy-wpilog/semiwrap/DataLogReader.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
classes:
44
wpi::log::StartRecordData:
5-
subpackage: log
65
attributes:
76
entry:
87
access: readonly
@@ -13,14 +12,12 @@ classes:
1312
metadata:
1413
access: readonly
1514
wpi::log::MetadataRecordData:
16-
subpackage: log
1715
attributes:
1816
entry:
1917
access: readonly
2018
metadata:
2119
access: readonly
2220
wpi::log::DataLogRecord:
23-
subpackage: log
2421
methods:
2522
DataLogRecord:
2623
overloads:
@@ -267,7 +264,6 @@ classes:
267264
wpi::log::DataLogIterator:
268265
ignore: true
269266
wpi::log::DataLogReader:
270-
subpackage: log
271267
typealias:
272268
- wpi::MemoryBuffer
273269
methods:

0 commit comments

Comments
 (0)