Development
This page covers checks and conventions for changing BobLib itself.
Release Gate
From the BobLib repository root:
make test PYTHON=.venv/bin/pythonThat target runs Python checks and all Modelica regression checks for BobLib and the Tests/BobLibTest fixtures.
For narrower loops:
make lint
make test-python PYTHON=.venv/bin/python
make modelica-translation PYTHON=.venv/bin/python
make modelica-initialization PYTHON=.venv/bin/python
make modelica-regression PYTHON=.venv/bin/pythonPython Tests
Root Python tests live under:
Tests/The focused Python tests cover:
- package structure and Modelica smoke coverage
- selected signal-level Modelica regressions through pytest
- BobLib/BobLibTest OpenModelica smoke checks
Run:
make test-python PYTHON=.venv/bin/python
python -m pytest Tests/test_boblib_modelica.pyModelica Translation Checks
make modelica-translation runs:
Tests/modelica_translation_checks.pyIt loads Modelica 4.1.0, VehicleInterfaces 2.0.2, BobLib/package.mo, and Tests/BobLibTest/package.mo, then runs checkModel for standard entry points and fixtures.
The focused package smoke check lives in:
Tests/test_boblib_modelica.pyIt runs checkModel on BobLib standard entry points and representative fixtures, and includes a few source-level structure checks for the package.
Initialization Checks
make modelica-initialization runs:
Tests/modelica_initialization_checks.pyIt zero-time simulates BobLibTest fixtures, extracts compact numeric initialization metrics, and compares them against:
Tests/modelica_initialization_baseline.csvUse initialization baseline changes as an explicit review signal for vehicle model or fixture behavior.
Signal Regressions
make modelica-regression runs:
Tests/test_modelica_regression.py
Tests/test_boblib_modelica.pyCurrent coverage includes:
- MF52 pure-slip force and moment sanity
- bilinear aero interpolation
- CFD aero map output
- VCU bus subscription/publishing and request handling
VehicleSim,VehicleFMI, andFourPostSimsmoke translation- representative chassis, tire, aero, and powertrain fixtures
Architecture Rules
BobLib should read as though it started from VehicleInterfaces and then built BobLib physics inside those contracts.
- VehicleInterfaces extensions should live at the first level of each public root package.
- Underlying BobLib physics should start one level deeper.
- Avoid duplicate public connector systems when VehicleInterfaces already provides the contract.
- Chassis, suspension, tire, aero, powertrain, controls, records, and utilities should own their local helpers rather than sharing ambiguous top-level dumping grounds.
- Reusable mechanics and multibody helpers belong under
Utilities.Mechanics. - Modelica records are the schemas and durable vehicle data.
- Tests for BobLib live in
Tests/BobLibTest, not inside the production package.
Before Committing
Before committing vehicle architecture or template changes, check:
package.orderfiles include the records, subsystem models, templates, and tests expected for the package state- public entry points use the intended
BobLib.Experiments.Standards.*models make test PYTHON=.venv/bin/pythonpasses- OMEdit can load
BobLib/package.moif the change touches package structure or diagram annotations - BobSim can build the standard entry points if the public executable names changed
OMEdit Screenshots
The maintained GUI screenshots live in the OMEdit Workflow page and are stored under docs/public/images/omedit/. Refresh them from a clean OMEdit session when package loading, tree traversal, diagram layout, or Simulation Setup defaults change. Keep screenshots small enough for the repository and prefer PNG for crisp OMEdit UI captures.
Useful Work Areas
Useful areas of work include:
- model robustness and initialization behavior
- low-level fixture coverage for every reusable vehicle subsystem
- further VehicleInterfaces alignment and connector cleanup
- tire model validation and additional tire records
- standard workflow coverage through BobSim
- OMEdit diagram polish and screenshot documentation
License
BobLib is distributed under the GNU General Public License v3.0 (GPLv3). See the BobLib LICENSE file for details.
