diff --git a/.github/workflows/buildcheck.yml b/.github/workflows/buildcheck.yml index 989461e85..96468d470 100644 --- a/.github/workflows/buildcheck.yml +++ b/.github/workflows/buildcheck.yml @@ -15,53 +15,30 @@ jobs: with: submodules: true - - name: Install pyenv - run: | - # Needed for using exact python version, which is - # required in `Pipfile`. - # Make sure it is aligned with vss-tools/Pipfile - curl https://pyenv.run | bash - export PATH="$HOME/.pyenv/bin:$PATH" - pyenv install 3.10.6 - - name: Install vss-tools dependencies run: | python -V python -m pip --quiet --no-input install --upgrade pip - python -m pip --quiet --no-input install --upgrade pipenv wheel - pipenv --version - pipenv run python --version + python -m pip --quiet --no-input install --upgrade wheel cd vss-tools + pip install -e . + pip install pytest + # idlc currently used both during python test and later in this script + pip install cyclonedds sudo apt install -y protobuf-compiler - pipenv install echo done! - pipenv run python setup.py install - env: - PIPENV_VENV_IN_PROJECT: 1 - name: Test mandatory targets run: | - pipenv install - pipenv run make mandatory_targets - env: - PIPENV_PIPFILE: ./vss-tools/Pipfile - PIPENV_VENV_IN_PROJECT: 1 + make mandatory_targets - name: Test that ddsidl is correct run: | - # Ignore vss-tools Pipfile for this use-case - pipenv install --ignore-pipfile cyclonedds - pipenv run idlc *.idl - env: - PIPENV_VENV_IN_PROJECT: 1 + idlc vss_rel_*.idl - name: Test optional targets. NOTE - always succeeds run: | - pipenv install - pipenv run make -k optional_targets || true - env: - PIPENV_PIPFILE: ./vss-tools/Pipfile - PIPENV_VENV_IN_PROJECT: 1 + make -k optional_targets || true - name: Install hugo env: diff --git a/BUILD.md b/BUILD.md index d64969c14..bd9604abf 100644 --- a/BUILD.md +++ b/BUILD.md @@ -45,16 +45,14 @@ An example to generate CSV from the *.vspec files in your current branch is: ``` user@debian:~/vehicle_signal_specification$ make csv -./vss-tools/vspec2csv.py -I ./spec --uuid -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$(cat VERSION).csv -INFO Output to csv format -INFO Known extended attributes: -INFO Added 56 units from ./spec/units.yaml -INFO Loading vspec from ./spec/VehicleSignalSpecification.vspec... -INFO Calling exporter... -INFO Generating CSV output... -INFO All done. +vspec export csv -u ./spec/units.yaml --strict -s ./spec/VehicleSignalSpecification.vspec -o vss_rel_$(cat VERSION).csv +[11:12:40] INFO Added 30 quantities from /home/erik/vehicle_signal_specification/spec/quantities.yaml + INFO Added 63 units from spec/units.yaml + INFO Loading vspec from spec/VehicleSignalSpecification.vspec... +[11:12:41] INFO Check type usage + INFO Generating CSV output... user@debian:~/vehicle_signal_specification$ ls *.csv -vss_rel_4.1-dev.csv +vss_rel_5.0-dev.csv ``` ### Make sure that your changes pass CI checks diff --git a/CHANGELOG.md b/CHANGELOG.md index 0593c8c77..1a5ef17c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -228,7 +228,11 @@ What to do if you as of today use signals from the OBD file: * If you really need the signals in this file and cannot replace them, then consider using the overlay file in the `overlays` directory from VSS 6.0 onwards. -### Update tool dependency +### Updated tool dependency + +#### CLI updates + +The vss-tools CLI has been refactored. Makefile in this repository updated. #### Overlay Support diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 18c3d0df9..cac409c54 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ There are two main methods to propose changes or extensions to VSS: - If you already have prepared changes or extension that you think would be interesting for COVESA to include in VSS then you can create a [Pull Request (PR)](https://github.com/COVESA/vehicle_signal_specification/pulls). -All contributions must follow the [COVESA contribution guidelines](https://www.covesa.global/contribute). +All contributions must follow the [COVESA contribution guidelines](https://covesa.global/contribute). The VSS project has regular meetings on Tuesdays at 16.00 CET and CEST in the summer (see [COVESA VSS Wiki](https://wiki.covesa.global/display/WIK4/VSS+-+Vehicle+Signal+Specification)). In the meetings Pull Requests (PRs) and Issues are discussed and, if a Pull Request is accepted, a decision to merge the PR will be made. @@ -53,7 +53,7 @@ This section includes general guidelines and recommendations for anyone interest ### All contributions must follow COVESA contribution guidelines -COVESA has defined [contribution guidelines](https://www.covesa.global/contribute). +COVESA has defined [contribution guidelines](https://covesa.global/contribute). Every contribution (commit) must carry the following sign-off line with your real name and email address: diff --git a/Makefile b/Makefile index b77ca4893..fb80abb27 100644 --- a/Makefile +++ b/Makefile @@ -20,53 +20,56 @@ optional_targets: clean protobuf ttl TOOLSDIR?=./vss-tools COMMON_ARGS=-u ./spec/units.yaml --strict +COMMON_VSPEC_ARG=-s ./spec/VehicleSignalSpecification.vspec json: - ${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).json + vspec export json ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).json json-noexpand: - ${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} --no-expand ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_noexpand.json + vspec export json ${COMMON_ARGS} --no-expand ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_noexpand.json jsonschema: - ${TOOLSDIR}/vspec2jsonschema.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).jsonschema + vspec export jsonschema ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).jsonschema franca: - ${TOOLSDIR}/vspec2franca.py --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).fidl + vspec export franca --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).fidl yaml: - ${TOOLSDIR}/vspec2yaml.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).yaml + vspec export yaml ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).yaml csv: - ${TOOLSDIR}/vspec2csv.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).csv + vspec export csv ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).csv ddsidl: - ${TOOLSDIR}/vspec2ddsidl.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).idl + vspec export ddsidl ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).idl # Verifies that supported overlay combinations are syntactically correct. overlays: - ${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/profiles/motorbike.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_motorbike.json - ${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/extensions/dual_wiper_systems.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_dualwiper.json - ${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/extensions/OBD.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_obd.json + vspec export json ${COMMON_ARGS} -l overlays/profiles/motorbike.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_motorbike.json + vspec export json ${COMMON_ARGS} -l overlays/extensions/dual_wiper_systems.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_dualwiper.json + vspec export json ${COMMON_ARGS} -l overlays/extensions/OBD.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_obd.json -tests: +prepare_binary: + cd ${TOOLSDIR}/binary && $(MAKE) + +tests: prepare_binary PYTHONPATH=${TOOLSDIR} pytest -binary: - cd ${TOOLSDIR}/binary && $(MAKE) - ${TOOLSDIR}/vspec2binary.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).binary +binary: prepare_binary + vspec export binary ${COMMON_ARGS} ${COMMON_VSPEC_ARG} --bintool-dll ${TOOLSDIR}/binary/binarytool.so -o vss_rel_$$(cat VERSION).binary protobuf: - ${TOOLSDIR}/vspec2protobuf.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).proto + vspec export protobuf ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).proto graphql: - ${TOOLSDIR}/vspec2graphql.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).graphql.ts + vspec export graphql ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).graphql.ts # vspec2ttl does not use common generator framework ttl: ${TOOLSDIR}/contrib/vspec2ttl/vspec2ttl.py -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).ttl id: - ${TOOLSDIR}/vspec2id.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).vspec + vspec export id ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).vspec clean: cd ${TOOLSDIR}/binary && $(MAKE) clean diff --git a/docs-gen/content/_index.md b/docs-gen/content/_index.md index e6fef7ecc..5b1e2c9e3 100644 --- a/docs-gen/content/_index.md +++ b/docs-gen/content/_index.md @@ -3,7 +3,7 @@ title: "Vehicle Signal Specification" --- # Vehicle Signal Specification -The Vehicle Signal Specification (VSS) is an initiative by [COVESA](https://www.covesa.global/) to define a syntax and a catalog for vehicle signals. +The Vehicle Signal Specification (VSS) is an initiative by [COVESA](https://covesa.global/) to define a syntax and a catalog for vehicle signals. The source code and releases can be found in the [VSS github repository](https://github.com/COVESA/vehicle_signal_specification). Some tools for parsing and converting VSS files can be found in the [VSS-tools github repository](https://github.com/COVESA/vss-tools). diff --git a/docs-gen/content/governance/_index.md b/docs-gen/content/governance/_index.md index 65525b2b3..960e85a7f 100644 --- a/docs-gen/content/governance/_index.md +++ b/docs-gen/content/governance/_index.md @@ -6,7 +6,7 @@ chapter: false # Governance -The Vehicle Signal Specification (VSS) project is an initiative by [COVESA](https://www.covesa.global/) to define a syntax and a catalog for vehicle signals. +The Vehicle Signal Specification (VSS) project is an initiative by [COVESA](https://covesa.global/) to define a syntax and a catalog for vehicle signals. The artifacts maintained by the VSS project consist of: @@ -22,7 +22,7 @@ Anyone may propose changes to VSS. It is up to the VSS project to decide if the The VSS project does not have any developers or maintainers paid by COVESA. Instead, the VSS project relies on voluntary contributions, typically from member organizations. The maintainers are expected to review incoming pull requests. -All contributions must follow the [COVESA contribution guidelines](https://www.covesa.global/contribute). +All contributions must follow the [COVESA contribution guidelines](https://covesa.global/contribute). In general, pull requests shall be opened for at least a week before being merged to give time for COVESA members to review the pull request and provide comments. In case of larger changes or changes that affect backward compatibility pull requests are typically opened for a longer period, to allow for a through review. diff --git a/docs-gen/content/rule_set/data_entry/data_types_struct.md b/docs-gen/content/rule_set/data_entry/data_types_struct.md index f320993d5..26973065a 100644 --- a/docs-gen/content/rule_set/data_entry/data_types_struct.md +++ b/docs-gen/content/rule_set/data_entry/data_types_struct.md @@ -89,7 +89,7 @@ It is possible to specify that multiple datatype files shall be used, but all da This means if the first file defines `A.B`, then the seconds file can define `A.C`, but not `X.Y` as that would result in two roots (`A` and `X`). -For current vss-tools support for structs see [documentation](https://github.com/COVESA/vss-tools/blob/master/docs/vspec2x.md) in the vss-tools repository. +For current vss-tools support for structs see [documentation](https://github.com/COVESA/vss-tools/blob/master/docs/vspec.md) in the vss-tools repository. ## Naming Restrictions diff --git a/vss-tools b/vss-tools index 39be8c3dc..50b294947 160000 --- a/vss-tools +++ b/vss-tools @@ -1 +1 @@ -Subproject commit 39be8c3dc3bf60a4ae02756dba7468b2b48b654d +Subproject commit 50b2949476849d1a050c4ec58108416642e4d0c0