Minor changes to meet ruff 0.15 standards and fix some preview issues#1185
Open
oerc0122 wants to merge 1 commit into
Open
Minor changes to meet ruff 0.15 standards and fix some preview issues#1185oerc0122 wants to merge 1 commit into
oerc0122 wants to merge 1 commit into
Conversation
oerc0122
force-pushed
the
ruff-0.15-prev
branch
2 times, most recently
from
February 20, 2026 15:31
76832ad to
5703fe7
Compare
Collaborator
|
As far as I can tell, the vector shell plots (in the q vector widget) don't work in this branch. That is, I can show the vectors preview showing the shell population, but the other tab with vector distribution within the shell throws an exception: |
Collaborator
|
I also think that the play button in the trajectory view doesn't work after the changes. |
oerc0122
force-pushed
the
ruff-0.15-prev
branch
2 times, most recently
from
May 22, 2026 08:25
ea66129 to
dfba4cd
Compare
ChiCheng45
reviewed
Jun 2, 2026
ChiCheng45
left a comment
Collaborator
There was a problem hiding this comment.
The GUI fails to load with the following error.
2026-06-02 17:28:51,101 - ERROR - process[41404] - main 36 - EXCEPTION:
<class 'TypeError'>
PlotWidget.change_slider_coupling[bool].emit(): argument 1 has unexpected type 'method'
<traceback object at 0x00000201C9FD65C0>
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\...\AppData\Local\miniconda3\envs\MDANSE3\Scripts\mdanse_gui.exe\__main__.py", line 5, in <module>
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Scripts\mdanse_gui.py", line 24, in main
startGUI(sys.argv[1:])
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\main.py", line 106, in startGUI
root = TabbedWindow(
^^^^^^^^^^^^^
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\TabbedWindow.py", line 136, in __init__
self.makeBasicLayout()
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\TabbedWindow.py", line 200, in makeBasicLayout
self.createPlotHolder()
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\TabbedWindow.py", line 562, in createPlotHolder
plot_tab = PlotTab.gui_instance(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\PlotTab.py", line 103, in gui_instance
visualiser=PlotHolder(),
^^^^^^^^^^^^
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\Visualisers\PlotHolder.py", line 49, in __init__
self._current_id = self.new_plot("Preview")
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\Visualisers\PlotHolder.py", line 70, in new_plot
plotter = PlotWidget(self)
^^^^^^^^^^^^^^^^
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\Visualisers\PlotWidget.py", line 220, in __init__
self.make_canvas()
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\Visualisers\PlotWidget.py", line 426, in make_canvas
self.set_plotter(self.plot_selector.currentText())
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\Visualisers\PlotWidget.py", line 250, in set_plotter
self.change_slider_coupling.emit(self._plotter.sliders_coupled)
TypeError: PlotWidget.change_slider_coupling[bool].emit(): argument 1 has unexpected type 'method'
oerc0122
force-pushed
the
ruff-0.15-prev
branch
2 times, most recently
from
June 3, 2026 13:06
abe037c to
82b3994
Compare
ChiCheng45
reviewed
Jul 3, 2026
Comment on lines
18
to
+27
| import abc | ||
| import ctypes | ||
| import datetime | ||
| import getpass | ||
| import inspect | ||
| import os | ||
| import platform | ||
| import re | ||
| import subprocess | ||
| from abc import ABC, abstractmethod |
Collaborator
There was a problem hiding this comment.
Any reason for the unused imports?
ChiCheng45
reviewed
Jul 3, 2026
|
|
||
| self._original_input = value | ||
| if value is None or value == "": | ||
| if not value: |
Collaborator
ChiCheng45
reviewed
Jul 3, 2026
| IntegerConfigurator.__init__(self, name, **kwargs) | ||
|
|
||
| def configure(self, value): | ||
| def configure(self, value: str): |
Collaborator
There was a problem hiding this comment.
I think this can be str or int.
ChiCheng45
reviewed
Jul 6, 2026
Comment on lines
-64
to
+68
| if operation == "average": | ||
| return NormOperations.AVERAGE | ||
| if operation == "sum": | ||
| return NormOperations.SUM | ||
| return NormOperations.NOT_IMPLEMENTED | ||
| return NormOperations[operation] |
Collaborator
There was a problem hiding this comment.
I get the following errors when I load up MDANSE_GUI. The GUI seems to work fine, though.
Traceback (most recent call last):
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\Visualisers\PlotWidget.py", line 254, in set_plotter
self.plot_data()
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\Visualisers\PlotWidget.py", line 345, in plot_data
self._normaliser.collect_values()
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Widgets\NormalisationWidget.py", line 144, in collect_values
"operation": str_to_enum(self.combo_sum_average.currentText()),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\...\PycharmProjects\MDANSE\MDANSE_GUI\Src\MDANSE_GUI\Tabs\Plotters\Plotter.py", line 68, in str_to_enum
return NormOperations[operation]
~~~~~~~~~~~~~~^^^^^^^^^^^
File "C:\Users\...\AppData\Local\miniconda3\envs\MDANSE3\Lib\enum.py", line 792, in __getitem__
return cls._member_map_[name]
~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'average'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description of work
Miscellaneous changes to meet Ruff 0.l5 specs and fix some of the issues raised by the
preview=TrueFixes
N/A
To test
Tests should pass.