Skip to content

feat: update/add csv conversion scripts - #14

Closed
axodentally wants to merge 10 commits into
esa:mainfrom
axodentally:feat/update-csv-conversion-scripts
Closed

feat: update/add csv conversion scripts#14
axodentally wants to merge 10 commits into
esa:mainfrom
axodentally:feat/update-csv-conversion-scripts

Conversation

@axodentally

Copy link
Copy Markdown
Collaborator

Update the old csv to cpp script and add another for csv to compose files.

This allows generating the scenario contact files (.ccp) and compose files (.yml) from CCSDS reference scenario CSV files.

The --ignore-delay option got dropped, when a need for it arises it can easliy be reimplemented.

@axodentally

axodentally commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator Author

This change is part of the following stack:

Change managed by git-spice.

@axodentally
axodentally requested a review from Copilot June 10, 2026 15:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the CSV conversion tooling by replacing the legacy contacts CSV → CCP script and introducing a new CSV → docker-compose generator, enabling generation of both scenario contact plan files (.ccp) and container topologies (docker-compose.yml) from CCSDS reference scenario CSV inputs.

Changes:

  • Added csv_to_ccp.py to generate formatted .ccp output (including optional prefix stripping and time speedup).
  • Added csv_to_compose.py to generate docker-compose.yml (plus optional GraphML export) from the same CSV inputs.
  • Removed the older contacts-csv2ccp.py script.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
tools/helpers/csv_to_compose.py New CSV → docker-compose generator (with optional GraphML export)
tools/helpers/csv_to_ccp.py New CSV → CCP generator with formatted output and symmetric-link merging
tools/helpers/contacts-csv2ccp.py Removed legacy CSV → CCP script

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/helpers/csv_to_compose.py Outdated
Comment thread tools/helpers/csv_to_compose.py
Comment thread tools/helpers/csv_to_compose.py Outdated
Comment thread tools/helpers/csv_to_ccp.py Outdated
Comment thread tools/helpers/csv_to_ccp.py Outdated
@axodentally axodentally mentioned this pull request Jun 11, 2026
4 tasks
Comment thread tools/helpers/csv_to_compose.py Outdated
mapping: dict[str, Any] = {}
if args.mapping is not None:
with open(args.mapping) as f:
mapping = json.load(f)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

TODO:

  • Test if the mapping actually works like it should
  • update CLI argument documentation about what this 'mapping' is => link to nodes.json file from CCSDS reference

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.
@axodentally
axodentally force-pushed the feat/update-csv-conversion-scripts branch from 6e6f30f to d49192c Compare July 15, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants