Skip to main content

frclib-6107

CI Code Quality

Python helper library focused on the CyberJagzz FRC Team 6107 robot requirements

Table of Contents

Background and Intended Direction

During the initial FRC python effort for the 2026 Rebuilt build-season, several useful utilities were identified along with much common functionality between some subsystems. On top of this, the pykit module had a few bugs identified and the source for pykit was brought into the Team's product code to allow for quick fixes during competition.

All of this work was performed under the lib_6107 subdirectory of our 2026 Rebuilt project, and now that build season is over, it sure would be nice to pull this into a loadable module, clean up and document the interfaces, and get some decent coverage under some sort of unit tests.

If this is successful, the hope is that the main robot-loadable source for 2026 and our future robots is greatly reduced.

Another key focus is to speed the periodic code by at least 25%. The current loop is taking about 23 mS, and we need this under 20. While the new controller for 2027 will probably be significantly faster, saving time to run new functionality (vision w/ dynamic collision avoidance) will most likely take this time up.

Key Interfaces

Below are the main areas (often subdirectories) contained in this project.

commands

drivetrain

vision

pykit

subsystems

gyro

pykit

rpm

vision

util

Fast uv one-liners commands

Unit Tests:

uv sync                                                    # install dev dependencies first, if needed
uv run pytest                                              # tests only, no coverage
uv run pytest --cov=src/lib_6107                           # tests with coverage report
uv run pytest tests/pykit/test_logtracer.py --cov=src/lib_6107.pykit.logtracer   # one file
uv run pytest -n0 --cov=src/lib_6107                       # disable xdist parallelism, which can make coverage more reliable

Security via 'bandit':

uv sync                                                    # install dev dependencies first, if needed
uv run bandit -r src/lib_6107

Planned Releases and Improvements

The first 'beta' release will be 2026.1.0.0 and will primarily be a move of the current 2026-Rebuilt project into an installable module. Following that release, the start of several improvements based on the prioritized list below. Note that priorities may change without notice.

The format of the version number is YYYY.MAJOR.MINOR.patch. While the YYYY.MAJOR.MINOR portion is all zeros, expect that this code is really very pre-alpha. Once it stabalizes and has a good portion of what I want, will begin to bump the MINOR version up. Once it is beta or better quality, I will increment the MAJOR version. At that point, the patch number will be used for bug fixes and minor improvements and the MINOR version will be used to indicate new functionality. The MAJOR version will be used to indicate a significant change in the module that may require changes to the robot code that uses this module.

Improvement Task Description
bandit-part-2 [automation] Support bandit via GitHub actions
build-part-2 [automation] Support automated release via GitHub actions
-
telemetry Add subsystems for the RoboRio, SystemCore, PDH so that we can do temperature and other telemetry logging
-
performance [performance] Review existing code so far and address and areas for increasing code efficiency. Create items for the improvement
fault handling [fault handling] Review existing code so far and address and areas for increasing code stability and recovery.C reate items for the improvement
-
CTRE/REV Provide customized/customizable subsystem support for CTRE and Rev Robotics based subsystems
-
-
pykit meta Support subsystem metadata. Auto-save firmware versions, model numbers, vendor info, and other status we can scrap from devices and their APIs.
pykit asyncio [performance] Support asyncio in pykit to improve performance
canbus logging [performance] Support Canbus logging to pykit (option to disable via logged chooser)
-
vision sim 1 Support vision simulation (PhotonVision)
-
example Create an example project that can be used by other to examine how to use this module.
Also may be able to use it in some automated unit-tests.
-
vision sim 2 Support vision simulation (Limelight)
-
unit-test-50% Reach at least 50% or better unit-test coverage.
unit-test-70% Reach at least 70% or better unit-test coverage
unit-test-80% Reach at least 80% or better unit-test coverage
-
tools Generate a list of possible tools to improve or automate some of the steps we go through
-
log exporter [tools] Auto-log export into a database (mongodb?)
Include additional match/circumstance type metadata and have settable via UI.
otel [tools] [performance] OpenTelemetry support investigation
elastic [example] In the 'example' robot project.
Include an elastic JSON layout file that shows how some of the module NT4 data can be displayed/manipulated.
-
-

**Completed Tasks **

Complete Release Task Description
2026.0.0.1 lib_2026 move Successful move into an installable module. Little or no added functionality
--- ----------
2026.0.0.2 lint-part-1 [automation] Support lint via Makefile
2026.0.0.2 bandit-part-1 [automation] Support bandit via Makefile
2026.0.0.2 period Support an easy way to set/manipulate the period with the default being the 20 mS standard value
--- ----------
2026.0.0.3 constants Do constants better so initial value are in lib_6107 but easy to override by developers
2026.0.0.3 robot base Base class for the robot that is responsible for at least the initial logging setup and determining if this is a replay
2026.0.0.3 simulation base A base class for simulation (physics.py)
2026.0.0.6 subsystem base Base subsystem class that supports pykit, simulation, and sysId overridable methods
2026.0.0.7 drivesubsystem A base subsystem for a drivetrain (focus on swerve initially)
2026.0.0.7 build-part-1 [automation] Support automated release via Makefile
2026.0.0.7 lint-part-2 [automation] Support ruff via GitHub actions
2026.0.0.7 2027 [guidance] Review what is changing in 2027 with new systemcore and create a plan to get rid of any deprecated items (Dashboard, ...)
2026.0.0.7 github copilot Investigate what github copilot may help us with
2026.0.0.7 pykit unit-test [fault handling] Get to >70% unit test coverage of pykit logging functionality
Focus on performance measurements. Keep track of results
2026.0.0.7 ut-part-1 [automation] Support unit-tests via makefile
2026.0.0.7 ut-part-2 [automation] Support unit-tests via GitHub actions
2026.0.0.7 unit-test-10% Reach at least 10% or better unit-test coverage
2026.0.0.7 unit-test-30% Reach at least 30% or better unit-test coverage. Supports github action/workflow. AT 47% coverage
2026.0.0.7 pykit slots [performance] Support @DataClass(slots=True) for pykit logging if it can help with performance

NOTICE

As with many FRC projects, the code in this module draws from many other repositories belonging to different teams. As I begin to extract code and move it into this repo, I hope to provide credit below. If I miss anyone, my apologies, it is not intentional.

Also, we use: - both Rev and CTRE motors - pathplanner - pykit - PhotonVision (and maybe Limelight soon)

So those modules will be downloaded if you install this module as well. Maybe a little code bloat, but it should not be much of an impact in 2027 where this is being targeted.

Westwood Robotics - 1757

  • The original work on pykit and of course their robots tha provide good examples of how to use pykit

Team 714

  • Gene Panov's (Team 714) CommandRevSwerve project and so many good videos of how to use robotpy...
  • Misc vision videos by other team members

Metadata

Release files for lib-6107 2026.0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lib-6107 2026.0.0.7
File Size Uploaded Provenance Actions
lib_6107-2026.0.0.7.tar.gz 244.9 kB Without provenance Details for lib_6107-2026.0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lib-6107 2026.0.0.7
File Interpreter ABI Platform Actions
lib_6107-2026.0.0.7-py3-none-any.whl Python 3 none any Details for lib_6107-2026.0.0.7-py3-none-any.whl

Total release size: 554.0 kB

Release files / lib_6107-2026.0.0.7.tar.gz

Download URL lib_6107-2026.0.0.7.tar.gz
Size 244.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ed50190a2cc3bf2b3619832afbe1a85d160b4b7a932211173e9f5c29abb4496c
BLAKE2b-256 checksum
How to use checksums
28d17138d526879f2c269a574dcfdaa0b8bc9433c1b0b27633f9c1ab2e0df334
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / lib_6107-2026.0.0.7-py3-none-any.whl

Download URL lib_6107-2026.0.0.7-py3-none-any.whl
Size 309.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e44bb471d17627ad8eb33a8a34424841330d604af745c49798dcacd09089c44b
BLAKE2b-256 checksum
How to use checksums
14263c0b0477113d28d3bf0e6be94f372182398cac97d4f65b812de4fa2db167
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for lib-6107 2026.0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page