COVESA / vss-tools

Software for working with VSS (https://github.com/COVESA/vehicle_signal_specification)
Mozilla Public License 2.0
49 stars 51 forks source link

VSS Tools

License Build Status

The overall goal of VSS Tools is to provide a set of tools that can be used to convert or verify Vehicle Signal Specifications defined by the format specified by the COVESA VSS project. VSS Tools is developed in parallel with VSS, please visit the COVESA VSS project for information on how to contribute. If any questions arise, please check out the FAQ for more information.

Available Tools

This repository contains three categories of tools:

A tool in the Contributed Tools category may be moved to the Obsolete category if it has been non-functional for at least 6 months. Tools in the Obsolete Tools category may be deleted after 12 months.

Examples on tool usage can be found in the VSS Makefile and in tool-specific documentation, if existing.

General CLI help should be used for up to date info of how to use the tools.

vspec --help # Help about global flags
vspec export --help # Shows help for the export functionality
vspec export json --help # Shows help for the json exporter
# ...

Please check here for generic infos about exporters and their arguments as well as here for design decision, architecture and limitations.

Compatibility with VSS

The COVESA VSS project repository includes vss-tools as a submodule. The vss-tools version linked by the VSS repository is the preferred vss-tools version to use for that particular version of the VSS repository. It is not guaranteed that newer or older versions of vss-tools can successfully handle that particular version of the VSS repository. The table below gives an overview of basic version support for e.g. vspec export json. Other exporters may have stricter requirements.

VSS-tools version Supported VSS versions Comments
v3.0 v3.0 - v3.1.1
v3.1 v3.0 -v4.0
v4.0 v4.0
v4.1 v4.0 -
<latest source> v4.0 -

Changes affecting compatibility

Examples on changes affecting compatibility

Contributing

Prerequisites

Poetry

We are using poetry or a package and venv handling system. Therefore a requirement to develop a tool is to install poetry on your host machine. For that you will need Python > 3 as well as pip. Check here for official installation instructions. The recommended one is the following, however installing it through pip/pipx works aswell:

curl -sSL https://install.python-poetry.org | python3 -

You can then use the following command to install all dependencies and the vss-tools package:

poetry install

The call will create an .venv directory but does not automatically activate it. You can do that in various ways:

Installing additional tools

If you intend to run testcases related to vspec2protobuf.py you need to install the protobuf compiler. Please follow official instructions for your OS. For Debian systems it would be:

sudo apt update
sudo apt install -y golang-go protobuf-compiler
protoc --version  # Ensure compiler version is 3+

Pre-commit set up

This repository is set up to use pre-commit hooks. After you clone the project, run pre-commit install to install pre-commit into your git hooks. pre-commit will now run on every commit. Every time you clone a project using pre-commit running pre-commit install should always be the first thing you do.

Building and installing with Pip

For usage of VSS-Tools with Pip (PyPI) please see README-PYPI.md