Skip to content

remove simularium controller params #466

@interim17

Description

@interim17

What needs to happen?

The controller can be initialized with params, which we don't do in production. We initialize blank and then call changeFile. We have been using the params to test the controller, but there is a way to get the DummyController running in testing without that code path. Are there other reasons to keep this option of initializing the controller with params? I am trying to add more thorough testing for changeFile, convertTrajectory, startSmoldynSim, etc.

It would be simpler to remove it! But I want to understand the history/thinking behind having these params as an option.

Related todos address refining the params for createSimulatorConnection1 which is work I am doing now as part of making prefetching more testable/reliable.

From the README:

const simulariumController = new SimulariumController({
    trajectoryPlaybackFile: "ATPsynthase_9.h5",
    netConnectionSettings: netConnectionSettings,
});

In practice we do this:

const simulariumController = new SimulariumController()
controller.changeFile({
    fileName: "ATPsynthase_9.h5",
    netConnectionSettings: netConnectionSettings,
})

Related TODO comments from controller:

// TODO: refine this as part of the public API for initializing the
// controller (also see SimulatorConnectionParams below)
interface SimulariumControllerParams {
    remoteSimulator?: RemoteSimulator;
    netConnectionSettings?: NetConnectionParams;
    trajectoryPlaybackFile?: string;
}
 // might only be used in unit testing
        // TODO: change test so controller isn't initialized with a remoteSimulator
            // TODO: probably remove this? We're never initalizing the controller
            // with any settings on the website.

Why should we do this?

When does this need to get done?

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceCode cleanup/refactoring, test coverage, etc.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions