From a7c86eb3b12df55ca3a995e159551346ec051bdb Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 14 Apr 2023 18:25:10 +0200 Subject: [PATCH] moved *Description classes into descs folder --- README.md | 4 ++-- grum/descs/__init__.py | 5 +++++ grum/{ => descs}/imgdesc.py | 0 grum/{ => descs}/plotdesc.py | 0 grum/exampledata.py | 2 +- grum/mainwin.py | 3 +-- tests/test_mainwin.py | 2 +- tests/test_plotdesc.py | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 grum/descs/__init__.py rename grum/{ => descs}/imgdesc.py (100%) rename grum/{ => descs}/plotdesc.py (100%) diff --git a/README.md b/README.md index e5b5c12..e64dff6 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,11 @@ Via the RPC server, new plots can be created and new data appended to existing p - `new_plot(name, cfg)` -Creates a new plot named `name` in the grum list. The configuration dict `cfg` is used as arguments for the constructor of [`PlotDescription`](https://gitlab.psi.ch/augustin_s/grum/-/blob/master/grum/plotdesc.py#L4). +Creates a new plot named `name` in the grum list. The configuration dict `cfg` is used as arguments for the constructor of [`PlotDescription`](https://gitlab.psi.ch/augustin_s/grum/-/blob/master/grum/descs/plotdesc.py#L4). - `append_data(name, point)` -Append data point to the plot named `name`. The new `point` is forwarded to [`PlotDescription.append()`](https://gitlab.psi.ch/augustin_s/grum/-/blob/master/grum/plotdesc.py#L18). +Append data point to the plot named `name`. The new `point` is forwarded to [`PlotDescription.append()`](https://gitlab.psi.ch/augustin_s/grum/-/blob/master/grum/descs/plotdesc.py#L18). ### Utility functions diff --git a/grum/descs/__init__.py b/grum/descs/__init__.py new file mode 100644 index 0000000..278a64b --- /dev/null +++ b/grum/descs/__init__.py @@ -0,0 +1,5 @@ + +from .imgdesc import ImageDescription +from .plotdesc import PlotDescription + + diff --git a/grum/imgdesc.py b/grum/descs/imgdesc.py similarity index 100% rename from grum/imgdesc.py rename to grum/descs/imgdesc.py diff --git a/grum/plotdesc.py b/grum/descs/plotdesc.py similarity index 100% rename from grum/plotdesc.py rename to grum/descs/plotdesc.py diff --git a/grum/exampledata.py b/grum/exampledata.py index 8eb609c..1925b55 100644 --- a/grum/exampledata.py +++ b/grum/exampledata.py @@ -1,6 +1,6 @@ import numpy as np -from .plotdesc import PlotDescription +from .descs import PlotDescription X = np.arange(100) / 10 diff --git a/grum/mainwin.py b/grum/mainwin.py index c0c1a93..ed43aa1 100644 --- a/grum/mainwin.py +++ b/grum/mainwin.py @@ -8,8 +8,7 @@ from .h5filedlg import open_h5_files_dialog, save_h5_file_dialog from .io import write_dict, read_dict from .mdi import MDIArea, MDISubMultiPlot, MDISubPlot, MDISubImage, MDIWindowMode from .menus import BarMenu -from .plotdesc import PlotDescription -from .imgdesc import ImageDescription +from .descs import PlotDescription, ImageDescription from .rpc import RPCServerThread from .shortcut import shortcut from .webview import WebView diff --git a/tests/test_mainwin.py b/tests/test_mainwin.py index 6a73af4..2ec4d2a 100644 --- a/tests/test_mainwin.py +++ b/tests/test_mainwin.py @@ -14,7 +14,7 @@ from grum.mainwin import MainWindow from grum.mdi import MDIArea, MDISubMultiPlot, MDISubPlot from grum.menus import BarMenu from grum.menus.rclickmenu import RClickMenu -from grum.plotdesc import PlotDescription +from grum.descs import PlotDescription from grum.rpc import RPCServerThread diff --git a/tests/test_plotdesc.py b/tests/test_plotdesc.py index 06fd68c..5cf2263 100644 --- a/tests/test_plotdesc.py +++ b/tests/test_plotdesc.py @@ -6,7 +6,7 @@ import pyqtgraph as pg from grum import theme from grum.mainwin import MainWindow from grum.mdi.mdisubplot import MDISubPlot -from grum.plotdesc import PlotDescription +from grum.descs import PlotDescription from grum.theme import pg_plot_style