feat: update/add csv conversion scripts - #19
Merged
Conversation
as previously parsing was fragile, relying on specific syntax for the 'labels' in the CSV file. Now the network topology is actually analyzed and it's then decided, if a pair of nodes has multiple networks between them and therefor need to specify the individual interface to use in the ccp file.
currently only high -> hi and low -> lo, but can easily be extended. Allows for converting the lunar communications scenario without using hashes for the docker networks.
Collaborator
Author
|
This change is part of the following stack: Change managed by git-spice. |
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
--mount-compose is broken with the default --output -: graph_to_compose() invents compose.yml for the bind mount but writes the generated YAML only to stdout. The emitted compose file therefore references a host file that was never created (or the wrong file if stdout is redirected elsewhere). Require a real output path when mounting, or bind the actual output path, and add a stdout regression.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the old csv to ccp script and add another for csv to compose files.
This allows generating scenario contact files (.ccp) and compose files (yml) from CCSDS reference scenario CSV files, making the CSV file the source of truth for both ccp and yml, making them derived artefacts.
The scripts generate the network names based on source and destination node name and sometimes the 'label'.
For that, the scripts first strip any '_ul' and '_dl' suffixes, that would only indicate a link's direction.
Then, for each connection in the form of a (src, dst) set, all net-labels are collected. If a (src, dst) set then has more than one label over all connections, it is believed that multiple, distinct networks/links should be created between those nodes.
Otherwise only one network is used for those connections.
That makes the parsing really robust and predictable, without any additional requirements for specific labels in the CSV.
Noteworthy changes:
--ignore-delayoption got removed. If a need for it arises, it can easily be added againFor further details, see individual commit messages.