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

chore: cleaning up the unnecessary functions #708

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

nnaveen979
Copy link
Contributor

What

removes unnecessary function code

Why

code is not used anywhere

How

cleanup the unnecessary functions in Ripple

Test

How has this been tested? How can a reviewer test it?

Checklist

  • I have self-reviewed this PR
  • I have added tests that prove the feature works or the fix is effective

@nnaveen979 nnaveen979 requested a review from pahearn73 January 9, 2025 10:06
@nnaveen979 nnaveen979 requested review from satlead and a team January 20, 2025 05:59
@@ -566,7 +558,7 @@ impl AppLauncher {
},
runtime: Some(AppRuntime {
id: Some(callsign),
transport: Self::get_transport(bool_contract, &manifest.start_page),
transport: AppRuntimeTransport::Websocket,
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just get rid of the AppRuntimeTransport enum altogether since it's no longer needed, that will then let you also get rid of EffectiveTransport and even more code.

@@ -1062,23 +1018,10 @@ impl DelegatedLauncherHandler {
async fn end_session(&mut self, app_id: &str) -> Result<AppManagerResponse, AppError> {
debug!("end_session: entry: app_id={}", app_id);
let app = self.platform_state.app_manager_state.remove(app_id);
if let Some(app) = app {
if let Some(_app) = app {
Copy link
Contributor

Choose a reason for hiding this comment

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

This could just be if app.is_some() {.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

thunder_device_info::ThunderDeviceInfoRequestProcessor,
thunder_events::ThunderOpenEventsProcessor,
thunder_persistent_store::ThunderStorageRequestProcessor,
thunder_remote::ThunderRemoteAccessoryRequestProcessor,
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you also remove the code for the processors we no longer add on start-up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

Copy link

Code Coverage

Package Line Rate Health
core.sdk.src.extn 83%
core.main.src.firebolt.handlers 9%
openrpc_validator.src 68%
core.sdk.src.api 74%
core.launcher.src 0%
core.main.src.firebolt 3%
core.main.src.service 31%
core.main.src.broker 42%
core.main.src.service.extn 40%
core.sdk.src.api.device 77%
core.tdk.src.gateway 100%
distributor.general.src 2%
core.sdk.src.api.observability 58%
core.sdk.src.framework 76%
device.thunder_ripple_sdk.src 15%
core.sdk.src.api.distributor 84%
core.sdk.src.api.manifest 89%
device.thunder_ripple_sdk.src.processors.events 0%
core.tdk.src.utils 0%
device.mock_device.src 54%
core.main.src.processor 0%
core.sdk.src.extn.client 90%
core.main.src.bootstrap 0%
core.main.src.service.apps 48%
core.main.src.bootstrap.extn 0%
core.main.src.broker.thunder 29%
core.sdk.src.extn.ffi 80%
core.main.src.state.cap 43%
core.main.src.utils 27%
device.thunder.src.bootstrap 0%
core.sdk.src.api.firebolt 77%
device.thunder.src 0%
device.thunder_ripple_sdk.src.bootstrap 0%
core.sdk.src.utils 49%
device.thunder_ripple_sdk.src.client 74%
core.main.src.bootstrap.manifest 0%
device.thunder_ripple_sdk.src.events 4%
core.main.src.state 22%
device.thunder_ripple_sdk.src.processors 12%
core.main.src.processor.storage 0%
core.main.src 0%
core.sdk.src.api.gateway 65%
core.launcher.src.manager 7%
Summary 43% (18376 / 42568)

Minimum allowed line rate is 42%

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