Conversation
|
I have opted not to test the plot_ts module for two reasons,
I have omitted it from code coverage |
There was a problem hiding this comment.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
pyproject.toml:81
- [nitpick] Plot_ts.py is currently excluded from test coverage. Consider adding tests to ensure its functionality or removing it from the omit list if coverage is desired.
omit = [
"visualisation/plot_ts.py"
]
There was a problem hiding this comment.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
pyproject.toml:81
- The new plot_ts.py utility is omitted from test coverage. Consider adding tests for this file to ensure its functionality and avoid regressions.
omit = [
"visualisation/plot_ts.py"
]
visualisation/plot_ts.py:371
- Using set_array to update pcolormesh may not update the RGBA data correctly with shading='gouraud'. Consider using set_facecolor to update the quadmesh's facecolors for clarity.
pcm.set_array(apply_cmap_with_alpha(current_data, 0, max_motion, cmap=cmap))
There was a problem hiding this comment.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
pyproject.toml:82
- The new production code in visualisation/plot_ts.py is currently excluded from test coverage. Consider adding tests for this utility instead of omitting it.
"visualisation/plot_ts.py"
|
Despite saying I wouldn't, I've multi-processed this module. It provides a modest (2x) speedup on my computer. Have also added:
The multiprocessing somewhat complicated the logic. It now resembles something like the old plot-ts but it reliably works and provides time-to-completion estimates. |
The x264 codec requires an even width and height. This fix adds black pixels around the edges of the video to pad the width and height to an even dimension. See https://stackoverflow.com/a/20848224.
…file is placed correctly
|
As long as Numpydoc and Ruff are happy, I'm happy to approve |
There was a problem hiding this comment.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
pyproject.toml:82
- The new plot_ts utility is excluded from coverage. Consider either adding tests for this module or removing it from the coverage omit list if it is production code.
"visualisation/plot_ts.py"
This adds the plot-ts utility back to visualisation. I originally rewrote the ancient gmt-based plot-ts added it to workflow. Now, however, I realise it is more appropriately placed here because it is not a scientific computation. I had to rewrite it (again!) because the 3D-visualisation based on PyVista was too janky to work properly with all the cartographic features you actually want. Instead the actual video is generated using simple matplotlib animations with cartopy (rather than GMT) forming the geographic backend. Eventually I would prefer to use cartopy over GMT in the entire codebase.