cpy6107 2027.0.0a8.post3__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.
Potentially problematic release.
This version of cpy6107 might be problematic. Click here for more details.
- cpy6107-2027.0.0a8.post3/CHANGELOG.md +25 -0
- cpy6107-2027.0.0a8.post3/CMakeLists.txt +275 -0
- cpy6107-2027.0.0a8.post3/CODE_OF_CONDUCT.md +19 -0
- cpy6107-2027.0.0a8.post3/CONTRIBUTING.md +64 -0
- cpy6107-2027.0.0a8.post3/LICENSE +28 -0
- cpy6107-2027.0.0a8.post3/PKG-INFO +109 -0
- cpy6107-2027.0.0a8.post3/README.md +79 -0
- cpy6107-2027.0.0a8.post3/SECURITY.md +21 -0
- cpy6107-2027.0.0a8.post3/bindings/module.cpp +294 -0
- cpy6107-2027.0.0a8.post3/cmake/DevTools.cmake +102 -0
- cpy6107-2027.0.0a8.post3/cmake/FindRobotpyNative.cmake +133 -0
- cpy6107-2027.0.0a8.post3/cmake/toolchains/systemcore-arm64.cmake +18 -0
- cpy6107-2027.0.0a8.post3/examples/command_robot/robot.py +68 -0
- cpy6107-2027.0.0a8.post3/include/cpy6107/core/version.hpp +36 -0
- cpy6107-2027.0.0a8.post3/include/cpy6107/framework/timed_command_robot.hpp +165 -0
- cpy6107-2027.0.0a8.post3/include/cpy6107/framework/wpilib_compat.hpp +58 -0
- cpy6107-2027.0.0a8.post3/pyproject.toml +86 -0
- cpy6107-2027.0.0a8.post3/python/cpy6107/__init__.py +41 -0
- cpy6107-2027.0.0a8.post3/python/cpy6107/_cpy6107.pyi +240 -0
- cpy6107-2027.0.0a8.post3/python/cpy6107/py.typed +0 -0
- cpy6107-2027.0.0a8.post3/src/core/version.cpp +30 -0
- cpy6107-2027.0.0a8.post3/src/framework/timed_command_robot.cpp +311 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The version is
|
|
4
|
+
`<WPILib version>.postN`: `2027.0.0a8.post1` is built against, and requires, `wpilib==2027.0.0a8`.
|
|
5
|
+
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
|
+
|
|
7
|
+
## [2027.0.0a8.post3] - Unreleased
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Python method names are snake_case (`robot_periodic`, `set_watchdog_timeout`, `before_user_loop`, ...) to match robotpy 2027; the camelCase names are gone.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Hook error policy (`HookErrorPolicy`, default `LOG_AND_CONTINUE`) for `before_user_loop`,
|
|
14
|
+
`after_user_loop` and the overrun callback; `get_hook_error_count()`.
|
|
15
|
+
- Overrun callback (`set_overrun_callback`, `OverrunInfo`) in C++ and Python.
|
|
16
|
+
- `linux-asan` / `linux-tsan` presets (`CPY6107_SANITIZE`) and a `bench` jitter target.
|
|
17
|
+
- `TimedCommandRobot`: C++23 timed robot for robotpy with a settable loop watchdog, a separate
|
|
18
|
+
scheduler slot at a configurable offset, `BeforeUserLoop`/`AfterUserLoop` hooks and extra
|
|
19
|
+
periodic callbacks.
|
|
20
|
+
- nanobind Python module `cpy6107` with generated type stubs.
|
|
21
|
+
- Support for WPILib 2027 alpha-8 (primary) and alpha-6 (development only).
|
|
22
|
+
- `RobotBase` state queries (`is_disabled()`, `is_simulation()`, ...) on `TimedCommandRobot`.
|
|
23
|
+
- `examples/command_robot`, `docs/LIB_6107_INTEGRATION.md`, `docker/test-lib6107.sh`.
|
|
24
|
+
- `docs/GETTING-STARTED.md`, `CONTRIBUTING.md`, `SECURITY.md`, `CODE_OF_CONDUCT.md`, issue forms and a PR template.
|
|
25
|
+
- CMake dev targets (`dev`, `format`, `lint`, `check`), workflow presets, Docker build image.
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.28)
|
|
2
|
+
|
|
3
|
+
project(cpy6107
|
|
4
|
+
VERSION 0.1.0
|
|
5
|
+
DESCRIPTION "FRC 2027 SystemCore Runtime and Multi-OS Simulation C++23 Library"
|
|
6
|
+
LANGUAGES CXX
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
set(CMAKE_CXX_STANDARD 23)
|
|
10
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
11
|
+
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
12
|
+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
13
|
+
|
|
14
|
+
# Clang with CMake 3.28 needs clang-scan-deps for module scanning, which we do not use.
|
|
15
|
+
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
|
|
16
|
+
|
|
17
|
+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
18
|
+
|
|
19
|
+
# Presets work without activating the venv: prefer the repository's .venv interpreter.
|
|
20
|
+
# CPY6107_PYTHON (environment) overrides it, e.g. the interpreter inside the Docker image.
|
|
21
|
+
if(NOT SKBUILD AND NOT Python_EXECUTABLE AND DEFINED ENV{CPY6107_PYTHON})
|
|
22
|
+
set(Python_EXECUTABLE "$ENV{CPY6107_PYTHON}" CACHE FILEPATH "Python interpreter (CPY6107_PYTHON)")
|
|
23
|
+
endif()
|
|
24
|
+
if(NOT SKBUILD AND NOT Python_EXECUTABLE)
|
|
25
|
+
foreach(_venv_python IN ITEMS .venv/bin/python .venv/Scripts/python.exe)
|
|
26
|
+
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_venv_python}")
|
|
27
|
+
set(Python_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}/${_venv_python}" CACHE FILEPATH
|
|
28
|
+
"Python interpreter (repository .venv)")
|
|
29
|
+
break()
|
|
30
|
+
endif()
|
|
31
|
+
endforeach()
|
|
32
|
+
endif()
|
|
33
|
+
|
|
34
|
+
option(CPY6107_BUILD_TESTS "Build host unit tests" ON)
|
|
35
|
+
option(CPY6107_BUILD_FRAMEWORK "Build the WPILib-based framework library (needs robotpy-native)" ON)
|
|
36
|
+
option(CPY6107_BUILD_PYTHON "Build the nanobind Python extension" OFF)
|
|
37
|
+
option(CPY6107_ENABLE_SIM "Enable desktop simulation support" ON)
|
|
38
|
+
option(CPY6107_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF)
|
|
39
|
+
option(CPY6107_ENABLE_COVERAGE "Instrument C++ code with gcov and add a 'coverage' target (GCC)" OFF)
|
|
40
|
+
set(CPY6107_COVERAGE_MIN_LINES 70 CACHE STRING "Minimum line coverage (%) enforced by the coverage target")
|
|
41
|
+
|
|
42
|
+
if(CPY6107_ENABLE_COVERAGE)
|
|
43
|
+
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
44
|
+
message(FATAL_ERROR "CPY6107_ENABLE_COVERAGE requires GCC (gcov-compatible gcovr output)")
|
|
45
|
+
endif()
|
|
46
|
+
add_compile_options(--coverage -O0 -fno-inline)
|
|
47
|
+
add_link_options(--coverage)
|
|
48
|
+
endif()
|
|
49
|
+
|
|
50
|
+
set(CPY6107_SANITIZE "" CACHE STRING "Sanitizers to enable: 'address;undefined' or 'thread' (GCC/Clang, Linux)")
|
|
51
|
+
if(CPY6107_SANITIZE)
|
|
52
|
+
if(MSVC)
|
|
53
|
+
message(FATAL_ERROR "CPY6107_SANITIZE is not supported with MSVC")
|
|
54
|
+
endif()
|
|
55
|
+
string(REPLACE ";" "," _sanitize_list "${CPY6107_SANITIZE}")
|
|
56
|
+
add_compile_options(-fsanitize=${_sanitize_list} -fno-omit-frame-pointer -fno-sanitize-recover=all -g)
|
|
57
|
+
add_link_options(-fsanitize=${_sanitize_list})
|
|
58
|
+
add_compile_definitions(CPY6107_SANITIZED=1)
|
|
59
|
+
endif()
|
|
60
|
+
|
|
61
|
+
# Older TSan runtimes abort when the kernel's mmap ASLR entropy is high; run tests without ASLR.
|
|
62
|
+
set(CPY6107_TEST_LAUNCHER "")
|
|
63
|
+
if("thread" IN_LIST CPY6107_SANITIZE AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
64
|
+
find_program(SETARCH_EXECUTABLE setarch)
|
|
65
|
+
if(SETARCH_EXECUTABLE)
|
|
66
|
+
set(CPY6107_TEST_LAUNCHER "${SETARCH_EXECUTABLE}" "${CMAKE_SYSTEM_PROCESSOR}" -R)
|
|
67
|
+
endif()
|
|
68
|
+
endif()
|
|
69
|
+
|
|
70
|
+
function(cpy6107_set_warnings target)
|
|
71
|
+
if(MSVC)
|
|
72
|
+
target_compile_options(${target} PRIVATE /W4 /permissive-)
|
|
73
|
+
if(CPY6107_WARNINGS_AS_ERRORS)
|
|
74
|
+
target_compile_options(${target} PRIVATE /WX)
|
|
75
|
+
endif()
|
|
76
|
+
else()
|
|
77
|
+
target_compile_options(${target} PRIVATE -Wall -Wextra -Wpedantic)
|
|
78
|
+
if(CPY6107_WARNINGS_AS_ERRORS)
|
|
79
|
+
target_compile_options(${target} PRIVATE -Werror)
|
|
80
|
+
endif()
|
|
81
|
+
endif()
|
|
82
|
+
endfunction()
|
|
83
|
+
|
|
84
|
+
# ---- core: pure algorithms, no WPILib ---------------------------------------------------------
|
|
85
|
+
|
|
86
|
+
add_library(cpy6107
|
|
87
|
+
src/core/version.cpp
|
|
88
|
+
)
|
|
89
|
+
add_library(cpy6107::core ALIAS cpy6107)
|
|
90
|
+
|
|
91
|
+
target_include_directories(cpy6107
|
|
92
|
+
PUBLIC
|
|
93
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
94
|
+
$<INSTALL_INTERFACE:include>
|
|
95
|
+
)
|
|
96
|
+
cpy6107_set_warnings(cpy6107)
|
|
97
|
+
|
|
98
|
+
if(CPY6107_ENABLE_SIM)
|
|
99
|
+
target_compile_definitions(cpy6107 PUBLIC CPY6107_SIMULATION=1)
|
|
100
|
+
endif()
|
|
101
|
+
|
|
102
|
+
# ---- framework: TimedCommandRobot on top of WPILib (robotpy-native) ---------------------------
|
|
103
|
+
|
|
104
|
+
if(CPY6107_BUILD_FRAMEWORK OR CPY6107_BUILD_PYTHON)
|
|
105
|
+
if(CPY6107_BUILD_PYTHON)
|
|
106
|
+
find_package(Python 3.14 REQUIRED COMPONENTS Interpreter Development.Module)
|
|
107
|
+
else()
|
|
108
|
+
find_package(Python COMPONENTS Interpreter)
|
|
109
|
+
endif()
|
|
110
|
+
find_package(RobotpyNative REQUIRED)
|
|
111
|
+
|
|
112
|
+
add_library(cpy6107_framework STATIC
|
|
113
|
+
src/framework/timed_command_robot.cpp
|
|
114
|
+
)
|
|
115
|
+
add_library(cpy6107::framework ALIAS cpy6107_framework)
|
|
116
|
+
target_include_directories(cpy6107_framework
|
|
117
|
+
PUBLIC
|
|
118
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
119
|
+
$<INSTALL_INTERFACE:include>
|
|
120
|
+
)
|
|
121
|
+
target_link_libraries(cpy6107_framework PUBLIC wpilib::all)
|
|
122
|
+
set_target_properties(cpy6107_framework PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
123
|
+
cpy6107_set_warnings(cpy6107_framework)
|
|
124
|
+
endif()
|
|
125
|
+
|
|
126
|
+
# ---- Python extension --------------------------------------------------------------------------
|
|
127
|
+
|
|
128
|
+
if(CPY6107_BUILD_PYTHON)
|
|
129
|
+
execute_process(
|
|
130
|
+
COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
|
|
131
|
+
OUTPUT_VARIABLE nanobind_ROOT
|
|
132
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
133
|
+
COMMAND_ERROR_IS_FATAL ANY
|
|
134
|
+
)
|
|
135
|
+
find_package(nanobind CONFIG REQUIRED)
|
|
136
|
+
|
|
137
|
+
nanobind_add_module(_cpy6107 STABLE_ABI NB_STATIC
|
|
138
|
+
bindings/module.cpp
|
|
139
|
+
)
|
|
140
|
+
target_link_libraries(_cpy6107 PRIVATE cpy6107::framework)
|
|
141
|
+
cpy6107_set_warnings(_cpy6107)
|
|
142
|
+
|
|
143
|
+
# The robotpy-native wheels live next to this package in site-packages (…/native/<pkg>/lib).
|
|
144
|
+
if(UNIX AND NOT APPLE)
|
|
145
|
+
set(_rpath)
|
|
146
|
+
foreach(_pkg IN LISTS ROBOTPY_NATIVE_PACKAGES)
|
|
147
|
+
list(APPEND _rpath "$ORIGIN/../native/${_pkg}/lib")
|
|
148
|
+
endforeach()
|
|
149
|
+
set_target_properties(_cpy6107 PROPERTIES
|
|
150
|
+
INSTALL_RPATH "${_rpath}"
|
|
151
|
+
BUILD_RPATH "${ROBOTPY_NATIVE_LIB_DIRS}"
|
|
152
|
+
)
|
|
153
|
+
endif()
|
|
154
|
+
|
|
155
|
+
nanobind_add_stub(_cpy6107_stub
|
|
156
|
+
MODULE _cpy6107
|
|
157
|
+
OUTPUT _cpy6107.pyi
|
|
158
|
+
PYTHON_PATH $<TARGET_FILE_DIR:_cpy6107>
|
|
159
|
+
DEPENDS _cpy6107
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
install(TARGETS _cpy6107 LIBRARY DESTINATION cpy6107)
|
|
163
|
+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_cpy6107.pyi DESTINATION cpy6107)
|
|
164
|
+
|
|
165
|
+
# Importable copy of the package built from the current sources: <build>/python/cpy6107.
|
|
166
|
+
# Tests put <build>/python on PYTHONPATH so they never depend on an installed copy.
|
|
167
|
+
if(NOT SKBUILD)
|
|
168
|
+
set(CPY6107_PYTHON_STAGE_DIR "${CMAKE_BINARY_DIR}/python")
|
|
169
|
+
add_custom_target(cpy6107_python_stage ALL
|
|
170
|
+
COMMAND ${CMAKE_COMMAND} -E make_directory "${CPY6107_PYTHON_STAGE_DIR}/cpy6107"
|
|
171
|
+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
172
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/python/cpy6107/__init__.py"
|
|
173
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/python/cpy6107/py.typed"
|
|
174
|
+
$<TARGET_FILE:_cpy6107>
|
|
175
|
+
"${CPY6107_PYTHON_STAGE_DIR}/cpy6107"
|
|
176
|
+
COMMENT "Staging the Python package in ${CPY6107_PYTHON_STAGE_DIR}"
|
|
177
|
+
VERBATIM)
|
|
178
|
+
add_dependencies(cpy6107_python_stage _cpy6107)
|
|
179
|
+
endif()
|
|
180
|
+
endif()
|
|
181
|
+
|
|
182
|
+
# ---- tests -------------------------------------------------------------------------------------
|
|
183
|
+
|
|
184
|
+
if(CPY6107_BUILD_TESTS AND NOT CMAKE_CROSSCOMPILING)
|
|
185
|
+
enable_testing()
|
|
186
|
+
|
|
187
|
+
add_executable(cpy6107_tests
|
|
188
|
+
tests/cpp/smoke_test.cpp
|
|
189
|
+
)
|
|
190
|
+
target_link_libraries(cpy6107_tests PRIVATE cpy6107)
|
|
191
|
+
cpy6107_set_warnings(cpy6107_tests)
|
|
192
|
+
add_test(NAME smoke_test COMMAND ${CPY6107_TEST_LAUNCHER} $<TARGET_FILE:cpy6107_tests>)
|
|
193
|
+
|
|
194
|
+
if(TARGET cpy6107_python_stage AND Python_EXECUTABLE)
|
|
195
|
+
execute_process(
|
|
196
|
+
COMMAND "${Python_EXECUTABLE}" -c "import pytest, pytest_cov"
|
|
197
|
+
RESULT_VARIABLE _pytest_rc OUTPUT_QUIET ERROR_QUIET)
|
|
198
|
+
if(_pytest_rc EQUAL 0)
|
|
199
|
+
add_test(NAME python_tests
|
|
200
|
+
COMMAND "${Python_EXECUTABLE}" -m pytest "${CMAKE_CURRENT_SOURCE_DIR}/tests/python"
|
|
201
|
+
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
|
|
202
|
+
set(_python_test_env "CPY6107_STAGE_DIR=${CPY6107_PYTHON_STAGE_DIR};COVERAGE_FILE=${CMAKE_BINARY_DIR}/.coverage")
|
|
203
|
+
if("address" IN_LIST CPY6107_SANITIZE)
|
|
204
|
+
# The interpreter is not instrumented, so the ASan runtime must be preloaded.
|
|
205
|
+
# libstdc++ must come too, or ASan cannot intercept C++ exceptions thrown from it.
|
|
206
|
+
execute_process(COMMAND "${CMAKE_CXX_COMPILER}" -print-file-name=libasan.so
|
|
207
|
+
OUTPUT_VARIABLE _libasan OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
208
|
+
execute_process(COMMAND "${CMAKE_CXX_COMPILER}" -print-file-name=libstdc++.so
|
|
209
|
+
OUTPUT_VARIABLE _libstdcxx OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
210
|
+
list(APPEND _python_test_env "LD_PRELOAD=${_libasan} ${_libstdcxx}"
|
|
211
|
+
"ASAN_OPTIONS=detect_leaks=0:abort_on_error=1")
|
|
212
|
+
endif()
|
|
213
|
+
set_tests_properties(python_tests PROPERTIES
|
|
214
|
+
ENVIRONMENT "${_python_test_env}"
|
|
215
|
+
TIMEOUT 300)
|
|
216
|
+
else()
|
|
217
|
+
message(WARNING "pytest/pytest-cov missing in ${Python_EXECUTABLE}: 'python_tests' not registered")
|
|
218
|
+
endif()
|
|
219
|
+
endif()
|
|
220
|
+
|
|
221
|
+
if(TARGET cpy6107_framework)
|
|
222
|
+
add_executable(cpy6107_framework_tests
|
|
223
|
+
tests/cpp/test_main.cpp
|
|
224
|
+
tests/cpp/test_core.cpp
|
|
225
|
+
tests/cpp/test_timed_command_robot.cpp
|
|
226
|
+
)
|
|
227
|
+
target_link_libraries(cpy6107_framework_tests PRIVATE cpy6107::core cpy6107::framework)
|
|
228
|
+
cpy6107_set_warnings(cpy6107_framework_tests)
|
|
229
|
+
add_test(NAME framework_tests COMMAND ${CPY6107_TEST_LAUNCHER} $<TARGET_FILE:cpy6107_framework_tests>)
|
|
230
|
+
set_tests_properties(framework_tests PROPERTIES TIMEOUT 120)
|
|
231
|
+
|
|
232
|
+
add_executable(cpy6107_jitter_bench EXCLUDE_FROM_ALL tests/bench/jitter_bench.cpp)
|
|
233
|
+
target_link_libraries(cpy6107_jitter_bench PRIVATE cpy6107::core cpy6107::framework)
|
|
234
|
+
cpy6107_set_warnings(cpy6107_jitter_bench)
|
|
235
|
+
add_custom_target(bench
|
|
236
|
+
COMMAND ${CPY6107_TEST_LAUNCHER} $<TARGET_FILE:cpy6107_jitter_bench>
|
|
237
|
+
DEPENDS cpy6107_jitter_bench
|
|
238
|
+
COMMENT "Measuring loop-start jitter (informational)"
|
|
239
|
+
USES_TERMINAL)
|
|
240
|
+
|
|
241
|
+
if(CPY6107_ENABLE_COVERAGE)
|
|
242
|
+
find_program(GCOVR_EXECUTABLE gcovr HINTS "${Python_ROOT_DIR}/bin" ENV PATH)
|
|
243
|
+
if(GCOVR_EXECUTABLE)
|
|
244
|
+
string(REGEX MATCH "^[0-9]+" _gcc_major "${CMAKE_CXX_COMPILER_VERSION}")
|
|
245
|
+
find_program(GCOV_EXECUTABLE NAMES gcov-${_gcc_major} gcov)
|
|
246
|
+
add_custom_target(coverage
|
|
247
|
+
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/coverage
|
|
248
|
+
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
|
|
249
|
+
COMMAND ${GCOVR_EXECUTABLE}
|
|
250
|
+
--root ${CMAKE_CURRENT_SOURCE_DIR}
|
|
251
|
+
--gcov-executable ${GCOV_EXECUTABLE}
|
|
252
|
+
--filter ${CMAKE_CURRENT_SOURCE_DIR}/src/core
|
|
253
|
+
--filter ${CMAKE_CURRENT_SOURCE_DIR}/src/framework
|
|
254
|
+
--filter ${CMAKE_CURRENT_SOURCE_DIR}/bindings
|
|
255
|
+
--txt --print-summary
|
|
256
|
+
--html-details ${CMAKE_BINARY_DIR}/coverage/index.html
|
|
257
|
+
--fail-under-line ${CPY6107_COVERAGE_MIN_LINES}
|
|
258
|
+
${CMAKE_BINARY_DIR}
|
|
259
|
+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
260
|
+
DEPENDS cpy6107_tests cpy6107_framework_tests
|
|
261
|
+
COMMENT "Running tests and checking C++ line coverage"
|
|
262
|
+
USES_TERMINAL
|
|
263
|
+
)
|
|
264
|
+
else()
|
|
265
|
+
message(WARNING "gcovr not found: 'coverage' target unavailable")
|
|
266
|
+
endif()
|
|
267
|
+
endif()
|
|
268
|
+
endif()
|
|
269
|
+
endif()
|
|
270
|
+
|
|
271
|
+
# ---- developer workflow targets: dev, format, lint, check --------------------------------------
|
|
272
|
+
|
|
273
|
+
if(PROJECT_IS_TOP_LEVEL AND NOT SKBUILD AND NOT CMAKE_CROSSCOMPILING)
|
|
274
|
+
include(DevTools)
|
|
275
|
+
endif()
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
This project is run by and for students and mentors. We want it to be a good place to learn.
|
|
4
|
+
|
|
5
|
+
* Be kind and respectful. Disagree with the idea, not the person.
|
|
6
|
+
* Be patient with beginners and with people whose first language is not yours.
|
|
7
|
+
* No harassment, discrimination, personal attacks, or sexual or violent content, in issues, pull
|
|
8
|
+
requests, discussions, or anywhere you represent the project.
|
|
9
|
+
* Keep feedback specific and constructive; assume good intent.
|
|
10
|
+
* Do not share other people's private information.
|
|
11
|
+
|
|
12
|
+
Maintainers may edit, hide or remove comments and contributions that break these rules, and may
|
|
13
|
+
block repeat offenders.
|
|
14
|
+
|
|
15
|
+
## Reporting
|
|
16
|
+
|
|
17
|
+
If you experience or see a problem, report it privately through GitHub (repository **Security** tab,
|
|
18
|
+
*Report a vulnerability*, and say it is a conduct report) or by contacting a maintainer listed in the
|
|
19
|
+
repository. Reports are kept confidential.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Contributing to cpy6107
|
|
2
|
+
|
|
3
|
+
Thanks for helping. cpy6107 is maintained by FRC Team 6107 (CyberJagzz) and is free for any team to
|
|
4
|
+
use. By contributing you agree your work is released under the project [LICENSE](LICENSE).
|
|
5
|
+
Please follow the [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
6
|
+
|
|
7
|
+
This repository was set up using github copilot, but the intention is to use AI for dev-ops, unit
|
|
8
|
+
test generation, documentation, and general automation. Try no to use it to initially write your
|
|
9
|
+
code as we are here to learn. Do feel free to use AI to help debug and improve your code once you
|
|
10
|
+
start. Understanding the C/C++ language, programming a robot, and using AI to improve your productiveness
|
|
11
|
+
and improve code quality is what this is all about.
|
|
12
|
+
|
|
13
|
+
## Reporting a bug
|
|
14
|
+
|
|
15
|
+
1. Check the [troubleshooting table](docs/GETTING-STARTED.md#6-troubleshooting) and existing issues.
|
|
16
|
+
2. Open a **Bug report** at <https://github.com/6107/cpy6107/issues/new/choose>. The template asks
|
|
17
|
+
for what we need: cpy6107 and WPILib versions, OS and glibc, Python version, how you installed,
|
|
18
|
+
a minimal robot that shows the problem, and the full output.
|
|
19
|
+
3. Security problems: do **not** open a public issue; see [SECURITY.md](SECURITY.md).
|
|
20
|
+
|
|
21
|
+
## Asking for a change or a feature
|
|
22
|
+
|
|
23
|
+
Open a **Change request** issue. Describe the problem you have (not only the solution), what you
|
|
24
|
+
do today, and what you would like instead. Changes to the public Python API are breaking while the
|
|
25
|
+
version is an alpha, so we will ask what it would cost you. We are a small development group
|
|
26
|
+
at this time and well documented requirements for a change or feature will always be welcomed.
|
|
27
|
+
|
|
28
|
+
Since we are a small group, we may not be able to address a feature until after build season. If
|
|
29
|
+
you see a change or feature that you would like to tackle, let me known. The more eyes and brains
|
|
30
|
+
on a project really help to make it better and more accepted to a larger community.
|
|
31
|
+
|
|
32
|
+
## Sending a pull request
|
|
33
|
+
|
|
34
|
+
1. Open or find an issue first for anything larger than a typo.
|
|
35
|
+
2. Fork, branch, make a focused change.
|
|
36
|
+
3. Run the whole check; it must pass:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
cmake --workflow --preset linux-ci # configure, build, lint (C++ and Python), test
|
|
40
|
+
# no glibc >= 2.41 host (WPILib a8)? use Docker:
|
|
41
|
+
docker/run.sh cmake --workflow --preset linux-ci
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`clang-format`, `clang-tidy`, `ruff`, `mypy` and both test suites are included. Details and the
|
|
45
|
+
other presets (Clang, coverage) are in [docs/INSTALL.md](docs/INSTALL.md) and [AGENTS.md](AGENTS.md).
|
|
46
|
+
4. Add or update tests for what you changed, and update the docs and `CHANGELOG.md` (user-visible
|
|
47
|
+
changes).
|
|
48
|
+
5. Open the PR; the template has the checklist. CI runs on GitHub Actions.
|
|
49
|
+
|
|
50
|
+
### Code rules (short version)
|
|
51
|
+
|
|
52
|
+
* C++23, zero warnings under `-Wall -Wextra -Wpedantic -Werror`; no `using namespace` in headers.
|
|
53
|
+
* `include/cpy6107/core` and `src/core` are plain C++: no OS headers, no WPILib, no allocation in
|
|
54
|
+
per-cycle code. Hardware and simulation code go in `hal` and `sim`.
|
|
55
|
+
* Nanobind code lives only in `bindings/`; never include `<nanobind/nanobind.h>` or `<Python.h>`
|
|
56
|
+
from `include/` or `src/`.
|
|
57
|
+
* Python names are snake_case, times are seconds.
|
|
58
|
+
* WPILib 2027 `wpi::` namespaces only.
|
|
59
|
+
|
|
60
|
+
The full rules are in `.github/instructions/` and `AGENTS.md`.
|
|
61
|
+
|
|
62
|
+
## Releases
|
|
63
|
+
|
|
64
|
+
Maintainers only; see [docs/RELEASING.md](docs/RELEASING.md).
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Jemison CyberJagzz
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cpy6107
|
|
3
|
+
Version: 2027.0.0a8.post3
|
|
4
|
+
Summary: C++23 TimedCommandRobot with a settable loop watchdog for FRC 2027 (robotpy), via nanobind
|
|
5
|
+
Keywords: frc,robotpy,wpilib,robotics,watchdog,nanobind
|
|
6
|
+
Author: Jemison CyberJagzz (FRC Team 6107)
|
|
7
|
+
License-Expression: BSD-3-Clause
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
12
|
+
Classifier: Programming Language :: C++
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Classifier: Typing :: Typed
|
|
16
|
+
Project-URL: Homepage, https://github.com/6107/cpy6107
|
|
17
|
+
Project-URL: Documentation, https://github.com/6107/cpy6107/blob/main/docs/USER-GUIDE.md
|
|
18
|
+
Project-URL: Issues, https://github.com/6107/cpy6107/issues
|
|
19
|
+
Project-URL: Changelog, https://github.com/6107/cpy6107/blob/main/CHANGELOG.md
|
|
20
|
+
Requires-Python: >=3.14
|
|
21
|
+
Requires-Dist: wpilib==2027.0.0a8
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
24
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
|
|
25
|
+
Requires-Dist: gcovr>=8.0; extra == "dev"
|
|
26
|
+
Requires-Dist: ruff>=0.7.0; extra == "dev"
|
|
27
|
+
Requires-Dist: mypy>=1.13.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pip-audit>=2.7.0; extra == "dev"
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# cpy6107
|
|
32
|
+
|
|
33
|
+
[](https://github.com/6107/cpy6107/actions/workflows/ci.yml)
|
|
34
|
+
[](https://github.com/6107/cpy6107/actions/workflows/lint.yml)
|
|
35
|
+
[](https://github.com/6107/cpy6107/actions/workflows/security.yml)
|
|
36
|
+
[](https://github.com/6107/cpy6107/actions/workflows/release.yml)
|
|
37
|
+
[](LICENSE)
|
|
38
|
+

|
|
39
|
+

|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
C/C++ specialized classes for the CyberJagzz 6107 FRC Robot focused on providing C/C++ where needed in our robotpy robots.
|
|
43
|
+
|
|
44
|
+
Feel free to use anything in this project that you find useful.
|
|
45
|
+
|
|
46
|
+
For this first release, the main deliverable is `cpy6107.TimedCommandRobot`: a C++23 timed robot for
|
|
47
|
+
robotpy 2027 whose loop watchdog timeout can be set, with hooks around every loop cycle (for logging)
|
|
48
|
+
and a separate slot for the command scheduler.
|
|
49
|
+
|
|
50
|
+
Future releases are expected to focus on other areas where:
|
|
51
|
+
- python may do a fair amount of processing before calling into wpilib (or other C/C++ libraries),
|
|
52
|
+
- more computationally intensive areas such as vision, path planning/optimization, and machine learning.
|
|
53
|
+
|
|
54
|
+
Status: **alpha**, tracks WPILib `2027.0.0a8`, Linux x86_64 (glibc >= 2.41).
|
|
55
|
+
|
|
56
|
+
- **Robot runtime target:** **SystemCore** (Raspberry Pi CM5, ARM64); not yet supported by the Python package.
|
|
57
|
+
- **Simulation targets:** Ubuntu Linux (tested); Windows 11 and macOS are planned.
|
|
58
|
+
- **Automation:** GitHub Copilot instructions (`.github/copilot-instructions.md`, `.github/instructions/`) and GitHub Actions (`.github/workflows/`).
|
|
59
|
+
|
|
60
|
+
## Documentation
|
|
61
|
+
|
|
62
|
+
| I want to... | Read |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| Use it in my team's robot | [docs/GETTING-STARTED.md](docs/GETTING-STARTED.md), then [docs/USER-GUIDE.md](docs/USER-GUIDE.md) |
|
|
65
|
+
| See a working robot | [examples/command_robot/](examples/command_robot/) |
|
|
66
|
+
| Build, lint and test it (Linux, Docker, Windows) | [docs/INSTALL.md](docs/INSTALL.md) |
|
|
67
|
+
| Report a bug or ask for a change | see [Support](#support-and-bug-reports) |
|
|
68
|
+
| Contribute code | [CONTRIBUTING.md](CONTRIBUTING.md), [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) |
|
|
69
|
+
| Report a security problem | [SECURITY.md](SECURITY.md) |
|
|
70
|
+
| Cut a release (maintainers) | [docs/RELEASING.md](docs/RELEASING.md), [CHANGELOG.md](CHANGELOG.md) |
|
|
71
|
+
| Understand the design and plans | [docs/REQUIREMENTS.md](docs/REQUIREMENTS.md), [docs/PLAN.md](docs/PLAN.md), [docs/PLAN-2.md](docs/PLAN-2.md), [docs/RESEARCH-NOTES.md](docs/RESEARCH-NOTES.md), [docs/TODO.md](docs/TODO.md) |
|
|
72
|
+
|
|
73
|
+
## Support and bug reports
|
|
74
|
+
|
|
75
|
+
* **Something broke or is confusing:** check the
|
|
76
|
+
[troubleshooting table](docs/GETTING-STARTED.md#6-troubleshooting), then
|
|
77
|
+
[open a bug report](https://github.com/6107/cpy6107/issues/new/choose). The form asks for versions,
|
|
78
|
+
OS/glibc and a minimal robot.
|
|
79
|
+
* **You need something changed or added:** open a *Change request* from the same page.
|
|
80
|
+
* **Security:** use the private report link in [SECURITY.md](SECURITY.md), not a public issue.
|
|
81
|
+
* This is a volunteer, student-run project: we answer as time allows.
|
|
82
|
+
|
|
83
|
+
## IDE Setup & Support Notes
|
|
84
|
+
|
|
85
|
+
* **Primary IDE (CLion + GitHub Copilot):** This repository is structured and verified for JetBrains CLion using `CMakePresets.json` and the GitHub Copilot plugin.
|
|
86
|
+
* **Secondary IDE (VS Code - Untested):** Seed configuration files are provided under `.vscode/` (`settings.json`, `tasks.json`, `extensions.json`) for contributors who prefer Visual Studio Code. **Note:** The `.vscode/` configurations are untested starter templates, as CLion is the initial target IDE.
|
|
87
|
+
|
|
88
|
+
## Installation & Quick Start
|
|
89
|
+
|
|
90
|
+
See [docs/INSTALL.md](docs/INSTALL.md) for full toolchain prerequisites, CLion setup, cross-compilation setup, and GitHub Copilot staged workflow instructions.
|
|
91
|
+
|
|
92
|
+
1. Create the Python 3.14 venv with the robotpy-native wheels (see `docs/INSTALL.md`).
|
|
93
|
+
2. Open the folder in **CLion** and select the `linux-debug` CMake preset (or use the command line).
|
|
94
|
+
3. Build the project and run `ctest --preset linux-debug --output-on-failure` to verify your local simulation environment.
|
|
95
|
+
4. Open **GitHub Copilot Chat** in CLion and instruct Copilot to read `docs/REQUIREMENTS.md` and `docs/PLAN-2.md`, then implement the next unchecked step.
|
|
96
|
+
|
|
97
|
+
## Repository Structure
|
|
98
|
+
|
|
99
|
+
* `.github/copilot-instructions.md`: Always-on repository instructions for GitHub Copilot (C++23, WPILib 2027 `wpi::` rules, SystemCore vs. Simulation boundaries).
|
|
100
|
+
* `.github/instructions/cpp-core.instructions.md`: Scoped Copilot rules enforcing zero OS headers and zero steady-state heap allocations in `core/`.
|
|
101
|
+
* `.github/workflows/ci.yml`: GitHub Actions CI workflow building and testing Ubuntu (GCC 14 and Clang 19), coverage, the Python package and SystemCore ARM64 cross-compilation of the core library.
|
|
102
|
+
* `.github/ISSUE_TEMPLATE/`, `.github/PULL_REQUEST_TEMPLATE.md`: issue forms and the PR checklist.
|
|
103
|
+
* `docs/INSTALL.md`: Detailed setup, prerequisites, and staged GitHub Copilot usage guide.
|
|
104
|
+
* `docs/REQUIREMENTS.md`: Functional and non-functional requirements for SystemCore runtime and multi-OS simulation.
|
|
105
|
+
* `docs/PLAN.md`: Completed initial plan (steps 1–7). `docs/PLAN-2.md`: next-phase plan. `docs/TODO.md`: background and future ideas. `docs/USER-GUIDE.md`: how to use `TimedCommandRobot` from Python.
|
|
106
|
+
* `CMakeLists.txt` & `CMakePresets.json`: C++23 build configuration supporting host simulation and ARM64 cross-compilation.
|
|
107
|
+
* `cmake/toolchains/systemcore-arm64.cmake`: CMake toolchain template for targeting SystemCore (ARM64 Cortex-A76).
|
|
108
|
+
* `.vscode/`: Untested starter configuration files for VS Code users.
|
|
109
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# cpy6107
|
|
2
|
+
|
|
3
|
+
[](https://github.com/6107/cpy6107/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/6107/cpy6107/actions/workflows/lint.yml)
|
|
5
|
+
[](https://github.com/6107/cpy6107/actions/workflows/security.yml)
|
|
6
|
+
[](https://github.com/6107/cpy6107/actions/workflows/release.yml)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
C/C++ specialized classes for the CyberJagzz 6107 FRC Robot focused on providing C/C++ where needed in our robotpy robots.
|
|
13
|
+
|
|
14
|
+
Feel free to use anything in this project that you find useful.
|
|
15
|
+
|
|
16
|
+
For this first release, the main deliverable is `cpy6107.TimedCommandRobot`: a C++23 timed robot for
|
|
17
|
+
robotpy 2027 whose loop watchdog timeout can be set, with hooks around every loop cycle (for logging)
|
|
18
|
+
and a separate slot for the command scheduler.
|
|
19
|
+
|
|
20
|
+
Future releases are expected to focus on other areas where:
|
|
21
|
+
- python may do a fair amount of processing before calling into wpilib (or other C/C++ libraries),
|
|
22
|
+
- more computationally intensive areas such as vision, path planning/optimization, and machine learning.
|
|
23
|
+
|
|
24
|
+
Status: **alpha**, tracks WPILib `2027.0.0a8`, Linux x86_64 (glibc >= 2.41).
|
|
25
|
+
|
|
26
|
+
- **Robot runtime target:** **SystemCore** (Raspberry Pi CM5, ARM64); not yet supported by the Python package.
|
|
27
|
+
- **Simulation targets:** Ubuntu Linux (tested); Windows 11 and macOS are planned.
|
|
28
|
+
- **Automation:** GitHub Copilot instructions (`.github/copilot-instructions.md`, `.github/instructions/`) and GitHub Actions (`.github/workflows/`).
|
|
29
|
+
|
|
30
|
+
## Documentation
|
|
31
|
+
|
|
32
|
+
| I want to... | Read |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| Use it in my team's robot | [docs/GETTING-STARTED.md](docs/GETTING-STARTED.md), then [docs/USER-GUIDE.md](docs/USER-GUIDE.md) |
|
|
35
|
+
| See a working robot | [examples/command_robot/](examples/command_robot/) |
|
|
36
|
+
| Build, lint and test it (Linux, Docker, Windows) | [docs/INSTALL.md](docs/INSTALL.md) |
|
|
37
|
+
| Report a bug or ask for a change | see [Support](#support-and-bug-reports) |
|
|
38
|
+
| Contribute code | [CONTRIBUTING.md](CONTRIBUTING.md), [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) |
|
|
39
|
+
| Report a security problem | [SECURITY.md](SECURITY.md) |
|
|
40
|
+
| Cut a release (maintainers) | [docs/RELEASING.md](docs/RELEASING.md), [CHANGELOG.md](CHANGELOG.md) |
|
|
41
|
+
| Understand the design and plans | [docs/REQUIREMENTS.md](docs/REQUIREMENTS.md), [docs/PLAN.md](docs/PLAN.md), [docs/PLAN-2.md](docs/PLAN-2.md), [docs/RESEARCH-NOTES.md](docs/RESEARCH-NOTES.md), [docs/TODO.md](docs/TODO.md) |
|
|
42
|
+
|
|
43
|
+
## Support and bug reports
|
|
44
|
+
|
|
45
|
+
* **Something broke or is confusing:** check the
|
|
46
|
+
[troubleshooting table](docs/GETTING-STARTED.md#6-troubleshooting), then
|
|
47
|
+
[open a bug report](https://github.com/6107/cpy6107/issues/new/choose). The form asks for versions,
|
|
48
|
+
OS/glibc and a minimal robot.
|
|
49
|
+
* **You need something changed or added:** open a *Change request* from the same page.
|
|
50
|
+
* **Security:** use the private report link in [SECURITY.md](SECURITY.md), not a public issue.
|
|
51
|
+
* This is a volunteer, student-run project: we answer as time allows.
|
|
52
|
+
|
|
53
|
+
## IDE Setup & Support Notes
|
|
54
|
+
|
|
55
|
+
* **Primary IDE (CLion + GitHub Copilot):** This repository is structured and verified for JetBrains CLion using `CMakePresets.json` and the GitHub Copilot plugin.
|
|
56
|
+
* **Secondary IDE (VS Code - Untested):** Seed configuration files are provided under `.vscode/` (`settings.json`, `tasks.json`, `extensions.json`) for contributors who prefer Visual Studio Code. **Note:** The `.vscode/` configurations are untested starter templates, as CLion is the initial target IDE.
|
|
57
|
+
|
|
58
|
+
## Installation & Quick Start
|
|
59
|
+
|
|
60
|
+
See [docs/INSTALL.md](docs/INSTALL.md) for full toolchain prerequisites, CLion setup, cross-compilation setup, and GitHub Copilot staged workflow instructions.
|
|
61
|
+
|
|
62
|
+
1. Create the Python 3.14 venv with the robotpy-native wheels (see `docs/INSTALL.md`).
|
|
63
|
+
2. Open the folder in **CLion** and select the `linux-debug` CMake preset (or use the command line).
|
|
64
|
+
3. Build the project and run `ctest --preset linux-debug --output-on-failure` to verify your local simulation environment.
|
|
65
|
+
4. Open **GitHub Copilot Chat** in CLion and instruct Copilot to read `docs/REQUIREMENTS.md` and `docs/PLAN-2.md`, then implement the next unchecked step.
|
|
66
|
+
|
|
67
|
+
## Repository Structure
|
|
68
|
+
|
|
69
|
+
* `.github/copilot-instructions.md`: Always-on repository instructions for GitHub Copilot (C++23, WPILib 2027 `wpi::` rules, SystemCore vs. Simulation boundaries).
|
|
70
|
+
* `.github/instructions/cpp-core.instructions.md`: Scoped Copilot rules enforcing zero OS headers and zero steady-state heap allocations in `core/`.
|
|
71
|
+
* `.github/workflows/ci.yml`: GitHub Actions CI workflow building and testing Ubuntu (GCC 14 and Clang 19), coverage, the Python package and SystemCore ARM64 cross-compilation of the core library.
|
|
72
|
+
* `.github/ISSUE_TEMPLATE/`, `.github/PULL_REQUEST_TEMPLATE.md`: issue forms and the PR checklist.
|
|
73
|
+
* `docs/INSTALL.md`: Detailed setup, prerequisites, and staged GitHub Copilot usage guide.
|
|
74
|
+
* `docs/REQUIREMENTS.md`: Functional and non-functional requirements for SystemCore runtime and multi-OS simulation.
|
|
75
|
+
* `docs/PLAN.md`: Completed initial plan (steps 1–7). `docs/PLAN-2.md`: next-phase plan. `docs/TODO.md`: background and future ideas. `docs/USER-GUIDE.md`: how to use `TimedCommandRobot` from Python.
|
|
76
|
+
* `CMakeLists.txt` & `CMakePresets.json`: C++23 build configuration supporting host simulation and ARM64 cross-compilation.
|
|
77
|
+
* `cmake/toolchains/systemcore-arm64.cmake`: CMake toolchain template for targeting SystemCore (ARM64 Cortex-A76).
|
|
78
|
+
* `.vscode/`: Untested starter configuration files for VS Code users.
|
|
79
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
## Supported versions
|
|
4
|
+
|
|
5
|
+
Only the latest release, which tracks one WPILib alpha at a time, receives fixes.
|
|
6
|
+
|
|
7
|
+
## Reporting a vulnerability
|
|
8
|
+
|
|
9
|
+
Please do **not** open a public issue. Use GitHub's private reporting:
|
|
10
|
+
<https://github.com/6107/cpy6107/security/advisories/new> (repository **Security** tab, *Report a
|
|
11
|
+
vulnerability*).
|
|
12
|
+
|
|
13
|
+
Include the affected version, how to reproduce, and the impact. We aim to acknowledge a report
|
|
14
|
+
within 7 days and will tell you what we plan to do and when. This is a volunteer student-run project,
|
|
15
|
+
so those times are goals, not guarantees.
|
|
16
|
+
|
|
17
|
+
## Scope
|
|
18
|
+
|
|
19
|
+
cpy6107 is robot-side library code. Examples of what to report: memory-safety problems in the C++ or
|
|
20
|
+
bindings, unsafe handling of data coming from the network or driver station, and problems in the
|
|
21
|
+
release workflow or its dependencies. Bugs in WPILib or robotpy themselves belong upstream.
|