Skip to content

Simulation bridge event based architecture #14

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

Merged
merged 71 commits into from
Jun 26, 2025

Conversation

marcomelloni
Copy link
Collaborator

No description provided.

@prasadtalasila prasadtalasila requested a review from Copilot May 29, 2025 14:04
Copilot

This comment was marked as outdated.

Copy link
Contributor

@prasadtalasila prasadtalasila left a comment

Choose a reason for hiding this comment

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

@marcomelloni The PR seems to improve the bridge. But I have some concerns about the structuring of the code. The design of Telegraf is a good reference. The bridge has three input protocol adopters (RabbitMQ, MQTT, REST), one output protocol (RabbitMQ) adopter. If you look into the plugin design for Telegraf codebase and plugin development, it is likely to improve the bridge as well.

Thanks in advance for improving it.

@prasadtalasila
Copy link
Contributor

@marcomelloni also if you can take care of manageable sonarcube issues along the way, it does not become additional work later.

@marcomelloni
Copy link
Collaborator Author

I’ve addressed all the comments.
Regarding the SonarCloud analysis, the failure is due to detected duplicate code. However, the flagged files (config_manager, logger, and config_loader) are necessarily duplicated, as they serve similar purposes in both the Simulation Bridge and the MATLAB Agent.
If you have access to the SonarCloud settings, we could consider excluding these specific files from the duplication analysis.
Looking forward for your feedback

Copilot

This comment was marked as outdated.

@prasadtalasila
Copy link
Contributor

@marcomelloni the following error appears for the packaged simulation_bridge

(.venv) ~/simulation-bridge# poetry install simulation_bridge-0.1.0
simulation_bridge-0.1.0-py3-none-any.whl  simulation_bridge-0.1.0.tar.gz
(.venv) ~/simulation-bridge# poetry install simulation_bridge-0.1.0-py3-none-any.whl

Poetry could not find a pyproject.toml file in /root/simulation-bridge or its parents

@prasadtalasila
Copy link
Contributor

@marcomelloni the following error appears for the packaged simulation_bridge

(.venv) ~/simulation-bridge# poetry install simulation_bridge-0.1.0
simulation_bridge-0.1.0-py3-none-any.whl  simulation_bridge-0.1.0.tar.gz
(.venv) ~/simulation-bridge# poetry install simulation_bridge-0.1.0-py3-none-any.whl

Poetry could not find a pyproject.toml file in /root/simulation-bridge or its parents

Never mind. It is my mistake. I should have used pip install ....

@prasadtalasila
Copy link
Contributor

The add simulation_bridge/resources/README.md and simulation_bridge/resources/requirements.txt to install the required pip dependencies for the clients.

@prasadtalasila prasadtalasila requested a review from Copilot June 26, 2025 08:16
Copy link

@Copilot Copilot AI left a comment

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 removes the existing simulation clients, test scripts, and the previous RabbitMQ‐based bridge implementation to prepare for a new event-based architecture.

  • Removed legacy simulation client code and Matlab/Python simulation scripts under tests/simulations
  • Deleted the old Digital Twin RabbitMQ client in tests/dt
  • Cleaned out the entire src/simulation_bridge module along with its unit and integration tests and docs

Reviewed Changes

Copilot reviewed 81 out of 102 changed files in this pull request and generated no comments.

File Description
tests/simulations/simulation_client_rabbitmq.py Deleted legacy RabbitMQ simulation client
tests/simulations/python/simulator.py Deleted old Python MQTT simulator
src/simulation_bridge/simulation_bridge.py Removed previous bridge core classes and handlers
src/simulation_bridge/README.md Cleared out outdated documentation
Comments suppressed due to low confidence (3)

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
12 Security Hotspots
3.8% Duplication on New Code (required ≤ 3%)
D Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@prasadtalasila prasadtalasila merged commit 3bb3805 into main Jun 26, 2025
3 of 4 checks passed
@marcomelloni marcomelloni deleted the simulation-bridge-event-based branch June 26, 2025 18:46
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