Closed interim17 closed 3 months ago
Status | Category | Percentage | Covered / Total |
---|---|---|---|
π΄ | Statements | 40.37% | 2048/5073 |
π΄ | Branches | 43.02% | 845/1964 |
π΄ | Functions | 36.79% | 418/1136 |
π΄ | Lines | 40.59% | 1961/4831 |
Status of coverage: π’ - ok, π‘ - slightly more than threshold, π΄ - under the threshold
website branch
fix/conversion-filename-bug
points at these changes to receive file that results from autoconversionTime Estimate or Size
small-ish
Problem
The handling of autoconverted files was built in the viewer with the example viewer in mind, but now that we're integrating with the website repo, we need to make some minor changes to the viewer.
The way autoconverted files are currently handled in the viewer is that the viewer requests a file to be converted and immediately requests frame 0. However, in the website, we want to clear any previous trajectory in between these two steps, allowing users to resume interacting with the previous simulation if they cancel the autoconversion request before octopus has replied with the converted data.
Solution
convertAndLoadTrajectory()
toconvertTrajectory()
, and have that only handle sending the conversion request. The clearing of any previous trajectory and loading of frame zero can be done after, usingchangeFile()
changeFile()
to include the option to not create a new remote simulator instance. Overall, ifthis.simulator
is a remote simulator and the connectionParams indicate that the newly requested file also uses a remote simulator, we don't need to create a fresh remote simulator instance, we can keep using the existing one, but we don't. For non-autoconversion simulations, creating a fresh instance doesn't cause any issues, so it doesn't matter. For autoconversion, we will have already created a remote simulator instance for requesting the conversion, and we don't want to miss any responses from that by creating a new instance with a new websocket connection, so we need to skip creating a simulator. Right now, I'm only skipping this step for this autoconversion case, although we could expand and use this across remote simulator cases in the futurewith @ascibisz
Type of change