Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.12", "3.13"]
env:
DISPLAY: ':99.0'

Expand Down
2 changes: 1 addition & 1 deletion doc/examples/Inferring grids.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"\n",
"from plottr.data import datadict as dd\n",
"from plottr.utils import num\n",
"from plottr.utils.num import _find_switches, is_invalid\n",
"from plottr.utils.num import _find_switches\n",
"from plottr.plot.mpl import ppcolormesh_from_meshgrid\n",
"\n",
"\n",
Expand Down
1 change: 0 additions & 1 deletion doc/examples/Simple Live plotting example with DDH5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"outputs": [],
"source": [
"import time\n",
"import os\n",
"import numpy as np\n",
"\n",
"from plottr.data import datadict as dd\n",
Expand Down
3 changes: 1 addition & 2 deletions doc/examples/node_with_dimension_selector_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
from typing import List, Optional
from pprint import pprint

import numpy as np

from plottr import QtCore, QtWidgets, Signal, Slot
from plottr import QtWidgets
from plottr.data import DataDict
from plottr.node.node import Node, NodeWidget, updateOption, updateGuiQuietly
from plottr.node.tools import linearFlowchart
Expand Down
7 changes: 1 addition & 6 deletions plottr/analyzer/base.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
from typing import Tuple, Any, Optional, Union, Dict, List
from typing import Tuple, Any, Union, Dict
from collections import OrderedDict
from dataclasses import dataclass
from pathlib import Path
import json

import numpy as np
from matplotlib import pyplot as plt
import lmfit


class Parameter:
Expand Down
5 changes: 2 additions & 3 deletions plottr/analyzer/fitters/experiment_functions.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Tuple, Any, Optional, Union, Dict, List
from typing import Tuple, Any, Union, Dict

import numpy as np
import lmfit
from plottr.analyzer.fitters.fitter_base import Fit, FitResult
from plottr.analyzer.fitters.fitter_base import Fit


class T1_Decay(Fit):
Expand Down
5 changes: 2 additions & 3 deletions plottr/analyzer/fitters/generic_functions.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from typing import Tuple, Any, Optional, Union, Dict, List
from typing import Tuple, Union, Dict

import numpy as np
import lmfit

from plottr.analyzer.fitters.fitter_base import Fit, FitResult
from plottr.analyzer.fitters.fitter_base import Fit


class Cosine(Fit):
Expand Down
2 changes: 1 addition & 1 deletion plottr/apps/appmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from typing import Dict, Union, Any, Callable, Tuple, Optional

from traceback import print_exception
from plottr import QtCore, QtWidgets, QtGui, Flowchart, Signal, Slot, log, qtapp, qtsleep, plottrPath
from plottr import QtCore, QtWidgets, QtGui, Flowchart, Signal, Slot, log, qtsleep, plottrPath
from plottr.gui.widgets import PlotWindow


Expand Down
3 changes: 1 addition & 2 deletions plottr/apps/autoplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
from packaging import version

from .. import QtCore, Flowchart, Signal, Slot, QtWidgets, QtGui
from .. import log as plottrlog
from ..data.datadict import DataDictBase
from ..data.datadict_storage import DDH5Loader
from ..data.qcodes_dataset import QCodesDSLoader
from ..gui import PlotWindow
from ..gui.widgets import MonitorIntervalInput, SnapshotWidget
from ..gui.widgets import MonitorIntervalInput
from ..node.data_selector import DataSelector
from ..node.dim_reducer import XYSelector
from ..node.filter.correct_offset import SubtractAverage
Expand Down
8 changes: 1 addition & 7 deletions plottr/apps/monitr.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
"""plottr.monitr -- a GUI tool for monitoring data files."""

import copy
import sys
import os
import argparse
import time
import importlib

# Uncomment the next 2 lines if the app suddenly crash with no error.
# import cgitb
Expand All @@ -17,15 +15,13 @@
import json
from enum import Enum, auto
from pathlib import Path
from multiprocessing import Process
from typing import (
List,
Optional,
Dict,
Any,
Union,
Generator,
Iterable,
Tuple,
Sequence,
cast,
Expand All @@ -35,14 +31,12 @@

from watchdog.events import FileSystemEvent, FileSystemMovedEvent

from .. import log as plottrlog
from .. import QtCore, QtWidgets, Signal, Slot, QtGui, plottrPath
from .. import config_entry as getcfg
from ..plot.mpl.autoplot import AutoPlot as MPLAutoPlot
from ..plot.pyqtgraph.autoplot import AutoPlot as PGAutoPlot
from ..data.datadict_storage import all_datadicts_from_hdf5, datadict_from_hdf5
from ..data.datadict_storage import datadict_from_hdf5
from ..data.datadict import DataDict
from ..utils.misc import unwrap_optional
from ..apps.watchdog_classes import WatcherClient
from ..gui.widgets import Collapsible
from .json_viewer import JsonModel, JsonTreeView
Expand Down
2 changes: 1 addition & 1 deletion plottr/apps/ui/Monitr_UI.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# WARNING! All changes made in this file will be lost!

from plottr import QtCore, QtGui, QtWidgets
from plottr import QtCore, QtWidgets

class Ui_MainWindow(object):
def setupUi(self, MainWindow: QtWidgets.QMainWindow) -> None:
Expand Down
4 changes: 1 addition & 3 deletions plottr/apps/ui/monitr.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import os
from enum import Enum
from typing import List, Any, Optional, Dict, Sequence, Union
from pprint import pprint
from typing import List, Optional, Dict, Sequence, Union

from plottr import QtCore, QtGui, QtWidgets, Slot, Signal
from plottr.data.datadict import DataDict
Expand Down
1 change: 0 additions & 1 deletion plottr/config/plottrcfg_main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from matplotlib.rcsetup import cycler
from plottr.plot.pyqtgraph.autoplot import AutoPlot as PGAutoPlot
from plottr.plot.mpl.autoplot import AutoPlot as MPLAutoPlot

config = {
Expand Down
5 changes: 2 additions & 3 deletions plottr/data/datadict_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@
import h5py

from qcodes.utils import NumpyJSONEncoder
from plottr import QtGui, Signal, Slot, QtWidgets, QtCore
from plottr import Signal, Slot, QtWidgets, QtCore

from ..node import (
Node, NodeWidget, updateOption, updateGuiFromNode,
emitGuiUpdate,
Node, NodeWidget, updateOption,
)

from .datadict import DataDict, is_meta_key, DataDictBase
Expand Down
4 changes: 2 additions & 2 deletions plottr/gui/data_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
UI elements for inspecting data structure and content.
"""

from typing import Union, List, Tuple, Dict, Any, Optional
from typing import List, Tuple, Dict, Any, Optional

from .. import QtCore, QtWidgets, Signal, Slot
from .. import QtWidgets, Signal, Slot
from ..data.datadict import DataDictBase


Expand Down
4 changes: 2 additions & 2 deletions plottr/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from typing import Union, List, Tuple, Optional, Sequence, Dict, Any, Type, Generic, TypeVar

from .tools import dictToTreeWidgetItems, dpiScalingFactor
from plottr import QtGui, QtCore, Flowchart, QtWidgets, Signal, Slot
from plottr.node import Node, linearFlowchart, NodeWidget, updateOption
from plottr import QtGui, Flowchart, QtWidgets, Signal, Slot
from plottr.node import Node, linearFlowchart
from plottr.node.node import updateGuiQuietly, emitGuiUpdate
from ..plot import PlotNode, PlotWidgetContainer, PlotWidget
from .. import config_entry as getcfg
Expand Down
2 changes: 1 addition & 1 deletion plottr/icons.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from plottr import QtGui, QtCore, plottrPath
from plottr import QtGui, plottrPath

gfxPath = os.path.join(plottrPath, 'resource', 'gfx')

Expand Down
2 changes: 1 addition & 1 deletion plottr/node/autonode.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Dict, Any, Callable, Optional, Type, cast

from .. import QtGui, QtWidgets
from .. import QtWidgets
from .node import Node, NodeWidget, updateOption

connectCallableType = Callable[['AutoNodeGuiTemplate', str, Dict[str, Any], bool], QtWidgets.QWidget]
Expand Down
1 change: 0 additions & 1 deletion plottr/node/data_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
from typing import List, Tuple, Dict, Any, Sequence, Optional

import numpy as np

from .node import Node, NodeWidget, updateOption
from ..data.datadict import DataDictBase, DataDict
Expand Down
2 changes: 1 addition & 1 deletion plottr/node/filter/correct_offset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Sequence, Optional, Dict
from typing import Optional, Dict

import numpy as np

Expand Down
10 changes: 3 additions & 7 deletions plottr/node/fitter.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import sys
import os
import pkgutil
import importlib
from importlib import reload, import_module
import warnings
from typing import Dict, Optional, Type, Callable, Tuple, Any, List, Union
from importlib import import_module
from typing import Dict, Optional, Type, Tuple, Any, List, Union
import inspect
from dataclasses import dataclass
import numbers
from types import ModuleType

import lmfit
from lmfit import Parameter as lmParameter, Parameters as lmParameters

from plottr import QtGui, QtCore, Slot, Signal, QtWidgets
from plottr import QtCore, Slot, Signal, QtWidgets
from plottr.analyzer import fitters
from plottr.analyzer.fitters.fitter_base import Fit, FitResult

Expand Down
2 changes: 1 addition & 1 deletion plottr/node/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from typing_extensions import TypedDict

from plottr import QtGui, Signal, Slot, QtWidgets
from plottr import Signal, Slot, QtWidgets
from .node import Node, NodeWidget, updateOption, updateGuiFromNode
from ..data import datadict as dd
from ..data.datadict import DataDict, MeshgridDataDict, DataDictBase, GriddingError
Expand Down
2 changes: 1 addition & 1 deletion plottr/node/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from .. import NodeBase
from .. import QtGui, QtCore, Signal, Slot, QtWidgets
from ..data.datadict import DataDictBase, MeshgridDataDict
from ..data.datadict import DataDictBase
from .. import log

__author__ = 'Wolfgang Pfaff'
Expand Down
1 change: 0 additions & 1 deletion plottr/plot/mpl/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import io
from typing import Tuple, Optional, List, Dict

from numpy import rint
from matplotlib import rcParams
from matplotlib.axes import Axes
from matplotlib.figure import Figure
Expand Down
2 changes: 1 addition & 1 deletion plottr/plot/pyqtgraph/plots.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Convenience tools for generating ``pyqtgraph`` plots that can
be used in plottr's automatic plotting framework."""

from typing import Optional, Tuple, NoReturn
from typing import Optional, Tuple

import numpy as np
import pyqtgraph as pg
Expand Down
2 changes: 1 addition & 1 deletion plottr/utils/num.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Tools for numerical operations.
"""
from typing import List, Optional, Sequence, Tuple, Union
from typing import List, Optional, Tuple, Union

import numpy as np
import pandas as pd
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
]
license = {text = "MIT"}
requires-python = ">=3.10"
requires-python = ">=3.12"
dependencies = [
"pandas>=0.22",
"xarray",
Expand Down
1 change: 0 additions & 1 deletion test/apps/autoplot_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from plottr import log as plottrlog
from plottr.apps.autoplot import autoplot
from plottr.data.datadict import DataDictBase, DataDict
from plottr.plot.mpl.autoplot import AutoPlot as MPLAutoPlot
from plottr.plot.pyqtgraph.autoplot import AutoPlot as PGAutoPlot
from plottr.utils import testdata

Expand Down
4 changes: 2 additions & 2 deletions test/apps/fitter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import numpy as np
import lmfit

from plottr import QtGui, QtWidgets
from plottr.data.datadict import DataDictBase, MeshgridDataDict
from plottr import QtWidgets
from plottr.data.datadict import MeshgridDataDict
from plottr.gui.widgets import makeFlowchartWithPlotWindow
from plottr.node.dim_reducer import XYSelector
from plottr.node.fitter import FittingNode, FittingOptions
Expand Down
4 changes: 0 additions & 4 deletions test/apps/test_histograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
from typing import Tuple

import numpy as np
from matplotlib import pyplot as plt
from xhistogram.core import histogram

from plottr.data.datadict import datadict_to_meshgrid
from plottr.node.tools import linearFlowchart
from plottr import Flowchart, QtCore
from plottr.data import DataDict
from plottr.apps.autoplot import AutoPlotMainWindow
Expand Down
1 change: 0 additions & 1 deletion test/gui/data_display_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Testing scripts for GUI elements for data display.
"""

from plottr import QtWidgets
from plottr.gui.tools import widgetDialog
from plottr.gui.data_display import DataSelectionWidget
from plottr.utils import testdata
Expand Down
2 changes: 1 addition & 1 deletion test/gui/data_selector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from plottr import QtGui, QtWidgets
from plottr import QtWidgets
from plottr.gui.tools import widgetDialog
from plottr.node.data_selector import DataSelector
from plottr.node.tools import linearFlowchart
Expand Down
4 changes: 1 addition & 3 deletions test/gui/dimension_selection_widgets.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import argparse
from typing import Tuple

from plottr import QtWidgets
from plottr.data.datadict import str2dd
from plottr.gui.widgets import AxisSelector, DependentSelector, DimensionSelector, \
from plottr.gui.widgets import DimensionSelector, \
MultiDimensionSelector
from plottr.gui.tools import widgetDialog

Expand Down
1 change: 0 additions & 1 deletion test/gui/grid_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Testing Widgets for the gridding node.
"""

from plottr import QtGui
from plottr.data.datadict import datadict_to_meshgrid
from plottr.gui.tools import widgetDialog
from plottr.node.grid import GridOptionWidget, ShapeSpecificationWidget, DataGridder, GridOption
Expand Down
2 changes: 1 addition & 1 deletion test/gui/pyqtgraph_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np
import pyqtgraph as pg

from plottr import QtWidgets, QtGui, QtCore
from plottr import QtWidgets, QtCore
from plottr.gui.tools import widgetDialog

pg.setConfigOption('background', 'w')
Expand Down
2 changes: 1 addition & 1 deletion test/gui/simple_2d_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from plottr import QtWidgets
from plottr import log
from plottr.data.datadict import DataDict, datadict_to_meshgrid
from plottr.data.datadict import datadict_to_meshgrid
from plottr.utils import testdata
from plottr.gui import PlotWindow
from plottr.plot.mpl import AutoPlot
Expand Down
Loading