Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating CHANGELOG and minor chnage in UUID handling #406

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 81 additions & 64 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,74 @@ It includes changes that are included in released version, but also changes plan
*This document only contain changes introduced in VSS-Tools 3.0 or later!*


## Planned changes for VSS-Tools 6.0

## VSS-Tools 3.0

[Complete release notes including VSS-Tools changes](https://github.com/COVESA/vehicle_signal_specification/releases/tag/v3.0)
### Change in UUID handling.

### Overlay Support
As the tool [vspec2id](docs/id.md) has been added the VSS-project has agreed that there no longer is a need to support
the legacy uuid functionality.

Overlays introduced to allow customization of VSS. See [documentation](https://covesa.github.io/vehicle_signal_specification/rule_set/overlay/).
See [vss-tools documentation](https://github.com/COVESA/vss-tools/blob/master/docs/vspec.md) on how to include overlays when transforming VSS.
* The parameters `--uuid`/`--no-uuid` are now removed.

## VSS-Tools 3.1 (Latest Release)

[Complete release notes including VSS-Tools changes](https://github.com/COVESA/vehicle_signal_specification/releases/tag/v3.1)
## VSS-Tools 5.0

### Struct Support
### Major restructure of repository structure and CLI

Support for defining signals with struct type added.
For VSS 3.1 as experimental feature only supported by JSON exporter.
The vss-tools repository content structure and CLI has changed significantly
For more information see [vspec documentation](docs/vspec.md)

### Change in UUID handling.

As of today most tools in this repository add UUIDs to generated output by default. An parameter `--no-uuid` exists to suppress output of UUIDs.
It has been decided in VSS-project to change default behavior so that default is to not generate UUIDs.
The change will be gradually introduced over multiple releases.
As the tool [vspec2id](docs/id.md) has been added the VSS-project has agreed that there no longer is a need to support
the legacy uuid functionality.

For VSS-Tools 3.1 the following behavior is implemented:
* The parameter `--uuid` is now deprecated and a warning is given if used.

* Generation of UUIDs is still default.
* A new parameter `--uuid` has been introduced to explicitly request that UUIDs shall be generated.
* If neither `--uuid` nor `--no-uuid` is used a warning will be given informing that default behavior will change in the future.
* If both `--uuid` and `--no-uuid` is used an error will be given.
*No warning given any longer if `--no-uuid` is used due to refactored cli interface*

### The tools vspec2c and vspec2ocf are now obsolete
### Tools installed as binaries without `.py` extension

The tools vspec2c and vspec2ocf in the contrib folder has been moved to the obsolete folder.
The background is that they have been broken for a long period and no one has volunteered to fix them.
The project has been switched to poetry and all tools are available in your PATH once vss-tools is installed via pip.

### Support for specifying unit files
### Logging arguments

General args have been extended with logging arguments `--log-level` and `--log-file`.

## SAMM Exporter added
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ###


See [documentation](https://github.com/COVESA/vss-tools/blob/master/docs/samm.md)

## APIGEAR Exporter added

See [documentation](https://github.com/COVESA/vss-tools/blob/master/docs/apigear.md)

## VSS-Tools 4.2

No significant changes in vss-tools


## VSS-Tools 4.1

### Struct support in vspec2ddsidl

The vspec2ddsidl tool now supports structs

### Jsonschema tool added

A new tool vspec2jsonschema has been added

### Id generator tool added

A new tool vspec2id has been added. It can be used to generate and maintain unique identifiers for signals.

### Unit files and quantity files

A new syntax has been introduced for unit files. The old syntax is still supported.
Domains have now been renamed to Quantities.
In addition to this a quantity file format has been defined, and the tool will inform
if units refer to a quantity that has not been defined an information message will be printed.

Add new parameter `-u` has been introduced, see [documentation](https://github.com/COVESA/vss-tools/blob/master/docs/vspec.md#handling-of-units).
Use of default unit file deprecated.
At the same time a unit file has been added to [VSS](https://github.com/COVESA/vehicle_signal_specification/blob/master/spec/units.yaml),
allowing VSS tooling to control their own units rather than relying on units in VSS-tools.
Default behavior for units have changed, if there is a file `units.yaml` in the same directory as the `*.vspec`
file it will be used, only if not existing `config.yaml` in vss-tools will be used.

## VSS-Tools 4.0

Expand Down Expand Up @@ -88,53 +110,48 @@ From now on, if new units are needed for the VSS catalog they shall be added to
[VSS catalog file](https://github.com/COVESA/vehicle_signal_specification/blob/master/spec/units.yaml).


## Implemented changes, to be released as part of VSS-Tools 5.0

### Major restructure of repository structure and CLI

The vss-tools repository content structure and CLI has changed significantly
For more information see [vspec documentation](docs/vspec.md)

### Struct support in vspec2ddsidl

The vspec2ddsidl tool now supports structs

### Jsonschema tool added

A new tool vspec2jsonschema has been added

### Id generator tool added
## VSS-Tools 3.1

A new tool vspec2id has been added. It can be used to generate and maintain unique identifiers for signals.
[Complete release notes including VSS-Tools changes](https://github.com/COVESA/vehicle_signal_specification/releases/tag/v3.1)

### Unit files and quantity files
### Struct Support

A new syntax has been introduced for unit files. The old syntax is still supported.
Domains have now been renamed to Quantities.
In addition to this a quantity file format has been defined, and the tool will inform
if units refer to a quantity that has not been defined an information message will be printed.
Support for defining signals with struct type added.
For VSS 3.1 as experimental feature only supported by JSON exporter.
For more information see [vspec documentation](docs/vspec.md)

### Change in UUID handling.

As the tool [vspec2id](docs/id.md) has been added the VSS-project has agreed that there no longer is a need to support
the legacy uuid functionality.
As of today most tools in this repository add UUIDs to generated output by default. An parameter `--no-uuid` exists to suppress output of UUIDs.
It has been decided in VSS-project to change default behavior so that default is to not generate UUIDs.
The change will be gradually introduced over multiple releases.

* The parameter `--no-uuid` is now removed, and an error is given if `--no-uuid` is used.
* The parameter `--uuid` is now deprecated.
For VSS-Tools 3.1 the following behavior is implemented:

## Planned changes for VSS-Tools 6.0
* Generation of UUIDs is still default.
* A new parameter `--uuid` has been introduced to explicitly request that UUIDs shall be generated.
* If neither `--uuid` nor `--no-uuid` is used a warning will be given informing that default behavior will change in the future.
* If both `--uuid` and `--no-uuid` is used an error will be given.

### Change in UUID handling.
### The tools vspec2c and vspec2ocf are now obsolete

As the tool [vspec2id](docs/id.md) has been added the VSS-project has agreed that there no longer is a need to support
the legacy uuid functionality.
The tools vspec2c and vspec2ocf in the contrib folder has been moved to the obsolete folder.
The background is that they have been broken for a long period and no one has volunteered to fix them.

### Support for specifying unit files

* The parameter `--uuid` is now removed.
Add new parameter `-u` has been introduced, see [documentation](https://github.com/COVESA/vss-tools/blob/master/docs/vspec.md#handling-of-units).
Use of default unit file deprecated.
At the same time a unit file has been added to [VSS](https://github.com/COVESA/vehicle_signal_specification/blob/master/spec/units.yaml),
allowing VSS tooling to control their own units rather than relying on units in VSS-tools.
Default behavior for units have changed, if there is a file `units.yaml` in the same directory as the `*.vspec`
file it will be used, only if not existing `config.yaml` in vss-tools will be used.

### Tools installed as binaries without `.py` extension
## VSS-Tools 3.0

The project has been switched to poetry and all tools are available in your PATH once vss-tools is installed via pip.
[Complete release notes including VSS-Tools changes](https://github.com/COVESA/vehicle_signal_specification/releases/tag/v3.0)

### Logging arguments
### Overlay Support

General args have been extended with logging arguments `--log-level` and `--log-file`.
Overlays introduced to allow customization of VSS. See [documentation](https://covesa.github.io/vehicle_signal_specification/rule_set/overlay/).
See [vss-tools documentation](https://github.com/COVESA/vss-tools/blob/master/docs/vspec.md) on how to include overlays when transforming VSS.
1 change: 1 addition & 0 deletions src/vss_tools/vspec/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def get_trees(
root.expand_instances()

if uuid:
log.warning("UUID support is deprecated and will be removed in VSS-tools 6.0")
root.add_uuids()

try:
Expand Down
6 changes: 5 additions & 1 deletion tests/vspec/test_types_with_uuid/test_uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ def run_exporter(exporter, argument, compare_suffix, tmp_path):
vspec = HERE / "test.vspec"
out = tmp_path / f"out.{exporter}"
cmd = f"vspec export {exporter}{argument} -u {TEST_UNITS} -q {TEST_QUANT} --vspec {vspec} --output {out}"
subprocess.run(cmd.split(), check=True)
process = subprocess.run(cmd.split(), check=True)
expected = HERE / f"expected_{compare_suffix}.{exporter}"
assert filecmp.cmp(out, expected)
if argument == "--uuid":
assert "UUID support is deprecated" in process.stderr


def test_uuid(tmp_path):
Expand All @@ -31,6 +33,7 @@ def test_uuid(tmp_path):
exporters = ["json", "ddsidl", "csv", "yaml", "franca"]
for exporter in exporters:
run_exporter(exporter, " --uuid", "uuid", tmp_path)
run_exporter(exporter, " --no-uuid", "no_uuid", tmp_path)
run_exporter(exporter, "", "no_uuid", tmp_path)


Expand All @@ -46,6 +49,7 @@ def run_error_test(tool, argument, arg_error_expected: bool, tmp_path):
assert process.returncode == 0


# At the moment you do not get warning if using --no-uuid
def test_obsolete_arg(tmp_path):
"""
Check that obsolete argument --no-uuid results in error
Expand Down