From ca91fe96586bd39b54c95161f4200ddacb16beaa Mon Sep 17 00:00:00 2001 From: paugier Date: Thu, 15 Feb 2024 13:11:51 +0100 Subject: [PATCH] Black --- doc/examples/piv_as_real/args.py | 1 + doc/examples/piv_as_real/params_piv.py | 1 + src/fluidimage/calcul/interpolate/griddata.py | 1 + src/fluidimage/calcul/smooth_clean.py | 1 + src/fluidimage/calibration/calib_cv.py | 1 + src/fluidimage/calibration/test_calib_cv.py | 4 +- src/fluidimage/data_objects/tomo.py | 1 - src/fluidimage/executors/__init__.py | 1 + src/fluidimage/gui/launcher/mainwindow.py | 107 +++++++++++++----- src/fluidimage/postproc/piv.py | 1 - src/fluidimage/preproc/base.py | 1 + src/fluidimage/reconstruct/tomo/__init__.py | 1 + src/fluidimage/topologies/bos.py | 1 + src/fluidimage/topologies/launcher.py | 1 + src/fluidimage/topologies/piv.py | 1 + src/fluidimage/topologies/preproc.py | 1 + src/fluidimage/topologies/surface_tracking.py | 1 + src/fluidimage/works/__init__.py | 1 + src/fluidimage/works/preproc.py | 1 + src/fluidimage/works/surface_tracking.py | 1 + 20 files changed, 97 insertions(+), 32 deletions(-) diff --git a/doc/examples/piv_as_real/args.py b/doc/examples/piv_as_real/args.py index 988f2da8..2be206cf 100644 --- a/doc/examples/piv_as_real/args.py +++ b/doc/examples/piv_as_real/args.py @@ -4,6 +4,7 @@ It is used in other scripts in this directory. """ + import argparse diff --git a/doc/examples/piv_as_real/params_piv.py b/doc/examples/piv_as_real/params_piv.py index 25db0893..8eec513f 100644 --- a/doc/examples/piv_as_real/params_piv.py +++ b/doc/examples/piv_as_real/params_piv.py @@ -8,6 +8,7 @@ ./try_piv.py & """ + from glob import glob from fluidimage.topologies.piv import TopologyPIV diff --git a/src/fluidimage/calcul/interpolate/griddata.py b/src/fluidimage/calcul/interpolate/griddata.py index 627350bf..b3bce17b 100644 --- a/src/fluidimage/calcul/interpolate/griddata.py +++ b/src/fluidimage/calcul/interpolate/griddata.py @@ -3,6 +3,7 @@ """ + import numpy as np from matplotlib import mlab from scipy import interpolate diff --git a/src/fluidimage/calcul/smooth_clean.py b/src/fluidimage/calcul/smooth_clean.py index 3c7f94f8..9f0c866c 100644 --- a/src/fluidimage/calcul/smooth_clean.py +++ b/src/fluidimage/calcul/smooth_clean.py @@ -3,6 +3,7 @@ """ + import numpy as np from scipy.interpolate import interp2d from scipy.ndimage import convolve diff --git a/src/fluidimage/calibration/calib_cv.py b/src/fluidimage/calibration/calib_cv.py index 7ebd06ea..7d27536f 100644 --- a/src/fluidimage/calibration/calib_cv.py +++ b/src/fluidimage/calibration/calib_cv.py @@ -14,6 +14,7 @@ :private-members: """ + import os import matplotlib.pyplot as plt diff --git a/src/fluidimage/calibration/test_calib_cv.py b/src/fluidimage/calibration/test_calib_cv.py index 2a86428b..ff315cea 100644 --- a/src/fluidimage/calibration/test_calib_cv.py +++ b/src/fluidimage/calibration/test_calib_cv.py @@ -23,7 +23,9 @@ def construct_image_points(path, origin): params = SimpleCircleGrid.create_default_params() circle_grid = SimpleCircleGrid(params) - centers = circle_grid.detect_grid(image, origin, nx=7, ny=7, ds=50, debug=True) + centers = circle_grid.detect_grid( + image, origin, nx=7, ny=7, ds=50, debug=True + ) return centers diff --git a/src/fluidimage/data_objects/tomo.py b/src/fluidimage/data_objects/tomo.py index ccf32a54..92274a24 100644 --- a/src/fluidimage/data_objects/tomo.py +++ b/src/fluidimage/data_objects/tomo.py @@ -15,7 +15,6 @@ """ - import os import shutil diff --git a/src/fluidimage/executors/__init__.py b/src/fluidimage/executors/__init__.py index 46de83bf..f91497ed 100644 --- a/src/fluidimage/executors/__init__.py +++ b/src/fluidimage/executors/__init__.py @@ -24,6 +24,7 @@ servers """ + import os import trio diff --git a/src/fluidimage/gui/launcher/mainwindow.py b/src/fluidimage/gui/launcher/mainwindow.py index 88b70ffe..346199fd 100644 --- a/src/fluidimage/gui/launcher/mainwindow.py +++ b/src/fluidimage/gui/launcher/mainwindow.py @@ -8,45 +8,79 @@ ## WARNING! All changes made in this file will be lost when recompiling UI file! ################################################################################ -from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, - QMetaObject, QObject, QPoint, QRect, - QSize, QTime, QUrl, Qt) -from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient, - QCursor, QFont, QFontDatabase, QGradient, - QIcon, QImage, QKeySequence, QLinearGradient, - QPainter, QPalette, QPixmap, QRadialGradient, - QTransform) -from PySide6.QtWidgets import (QApplication, QMainWindow, QMenu, QMenuBar, - QSizePolicy, QStatusBar, QVBoxLayout, QWidget) +from PySide6.QtCore import ( + QCoreApplication, + QDate, + QDateTime, + QLocale, + QMetaObject, + QObject, + QPoint, + QRect, + QSize, + QTime, + QUrl, + Qt, +) +from PySide6.QtGui import ( + QAction, + QBrush, + QColor, + QConicalGradient, + QCursor, + QFont, + QFontDatabase, + QGradient, + QIcon, + QImage, + QKeySequence, + QLinearGradient, + QPainter, + QPalette, + QPixmap, + QRadialGradient, + QTransform, +) +from PySide6.QtWidgets import ( + QApplication, + QMainWindow, + QMenu, + QMenuBar, + QSizePolicy, + QStatusBar, + QVBoxLayout, + QWidget, +) + class Ui_MainWindow(object): def setupUi(self, MainWindow): if not MainWindow.objectName(): - MainWindow.setObjectName(u"MainWindow") + MainWindow.setObjectName("MainWindow") MainWindow.resize(775, 901) self.actionOpen = QAction(MainWindow) - self.actionOpen.setObjectName(u"actionOpen") + self.actionOpen.setObjectName("actionOpen") self.actionTopologyPIV = QAction(MainWindow) - self.actionTopologyPIV.setObjectName(u"actionTopologyPIV") + self.actionTopologyPIV.setObjectName("actionTopologyPIV") self.actionTopologyPreproc = QAction(MainWindow) - self.actionTopologyPreproc.setObjectName(u"actionTopologyPreproc") + self.actionTopologyPreproc.setObjectName("actionTopologyPreproc") self.centralwidget = QWidget(MainWindow) - self.centralwidget.setObjectName(u"centralwidget") + self.centralwidget.setObjectName("centralwidget") self.verticalLayout_2 = QVBoxLayout(self.centralwidget) - self.verticalLayout_2.setObjectName(u"verticalLayout_2") + self.verticalLayout_2.setObjectName("verticalLayout_2") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QMenuBar(MainWindow) - self.menubar.setObjectName(u"menubar") + self.menubar.setObjectName("menubar") self.menubar.setGeometry(QRect(0, 0, 775, 24)) self.menuFile = QMenu(self.menubar) - self.menuFile.setObjectName(u"menuFile") + self.menuFile.setObjectName("menuFile") self.menuTopologies = QMenu(self.menubar) - self.menuTopologies.setObjectName(u"menuTopologies") + self.menuTopologies.setObjectName("menuTopologies") self.menuComputations = QMenu(self.menubar) - self.menuComputations.setObjectName(u"menuComputations") + self.menuComputations.setObjectName("menuComputations") MainWindow.setMenuBar(self.menubar) self.statusbar = QStatusBar(MainWindow) - self.statusbar.setObjectName(u"statusbar") + self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.menubar.addAction(self.menuFile.menuAction()) @@ -57,15 +91,30 @@ def setupUi(self, MainWindow): self.retranslateUi(MainWindow) QMetaObject.connectSlotsByName(MainWindow) + # setupUi def retranslateUi(self, MainWindow): - MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None)) - self.actionOpen.setText(QCoreApplication.translate("MainWindow", u"Open", None)) - self.actionTopologyPIV.setText(QCoreApplication.translate("MainWindow", u"TopologyPIV", None)) - self.actionTopologyPreproc.setText(QCoreApplication.translate("MainWindow", u"TopologyPreproc", None)) - self.menuFile.setTitle(QCoreApplication.translate("MainWindow", u"File", None)) - self.menuTopologies.setTitle(QCoreApplication.translate("MainWindow", u"Topologies", None)) - self.menuComputations.setTitle(QCoreApplication.translate("MainWindow", u"Computations", None)) - # retranslateUi + MainWindow.setWindowTitle( + QCoreApplication.translate("MainWindow", "MainWindow", None) + ) + self.actionOpen.setText( + QCoreApplication.translate("MainWindow", "Open", None) + ) + self.actionTopologyPIV.setText( + QCoreApplication.translate("MainWindow", "TopologyPIV", None) + ) + self.actionTopologyPreproc.setText( + QCoreApplication.translate("MainWindow", "TopologyPreproc", None) + ) + self.menuFile.setTitle( + QCoreApplication.translate("MainWindow", "File", None) + ) + self.menuTopologies.setTitle( + QCoreApplication.translate("MainWindow", "Topologies", None) + ) + self.menuComputations.setTitle( + QCoreApplication.translate("MainWindow", "Computations", None) + ) + # retranslateUi diff --git a/src/fluidimage/postproc/piv.py b/src/fluidimage/postproc/piv.py index 0890bdba..659fe647 100644 --- a/src/fluidimage/postproc/piv.py +++ b/src/fluidimage/postproc/piv.py @@ -15,7 +15,6 @@ """ - import h5py diff --git a/src/fluidimage/preproc/base.py b/src/fluidimage/preproc/base.py index 23d06109..ad80f635 100644 --- a/src/fluidimage/preproc/base.py +++ b/src/fluidimage/preproc/base.py @@ -10,6 +10,7 @@ :private-members: """ + import os import sys diff --git a/src/fluidimage/reconstruct/tomo/__init__.py b/src/fluidimage/reconstruct/tomo/__init__.py index 3bb1ea4f..e6ff3da0 100644 --- a/src/fluidimage/reconstruct/tomo/__init__.py +++ b/src/fluidimage/reconstruct/tomo/__init__.py @@ -14,4 +14,5 @@ """ + from .mlos import TomoMLOSCV diff --git a/src/fluidimage/topologies/bos.py b/src/fluidimage/topologies/bos.py index f9eef1eb..7cb03a10 100644 --- a/src/fluidimage/topologies/bos.py +++ b/src/fluidimage/topologies/bos.py @@ -6,6 +6,7 @@ :private-members: """ + import json import sys from pathlib import Path diff --git a/src/fluidimage/topologies/launcher.py b/src/fluidimage/topologies/launcher.py index ea072f42..782d68cf 100644 --- a/src/fluidimage/topologies/launcher.py +++ b/src/fluidimage/topologies/launcher.py @@ -15,6 +15,7 @@ :private-members: """ + import inspect import json diff --git a/src/fluidimage/topologies/piv.py b/src/fluidimage/topologies/piv.py index d75873bd..a8f445f7 100644 --- a/src/fluidimage/topologies/piv.py +++ b/src/fluidimage/topologies/piv.py @@ -6,6 +6,7 @@ :private-members: """ + import copy import json import sys diff --git a/src/fluidimage/topologies/preproc.py b/src/fluidimage/topologies/preproc.py index 77ab16e3..414df84b 100644 --- a/src/fluidimage/topologies/preproc.py +++ b/src/fluidimage/topologies/preproc.py @@ -6,6 +6,7 @@ :private-members: """ + import copy import json import os diff --git a/src/fluidimage/topologies/surface_tracking.py b/src/fluidimage/topologies/surface_tracking.py index 6f3b9bba..1ab6d74c 100644 --- a/src/fluidimage/topologies/surface_tracking.py +++ b/src/fluidimage/topologies/surface_tracking.py @@ -14,6 +14,7 @@ - example integrated in the documentation """ + import json import sys from pathlib import Path diff --git a/src/fluidimage/works/__init__.py b/src/fluidimage/works/__init__.py index 22146d42..23f6b8d6 100644 --- a/src/fluidimage/works/__init__.py +++ b/src/fluidimage/works/__init__.py @@ -18,6 +18,7 @@ optical_flow """ + from .. import imread diff --git a/src/fluidimage/works/preproc.py b/src/fluidimage/works/preproc.py index dee735fe..6db025f3 100644 --- a/src/fluidimage/works/preproc.py +++ b/src/fluidimage/works/preproc.py @@ -10,6 +10,7 @@ :private-members: """ + import sys import numpy as np diff --git a/src/fluidimage/works/surface_tracking.py b/src/fluidimage/works/surface_tracking.py index 37f71973..699fc5f4 100644 --- a/src/fluidimage/works/surface_tracking.py +++ b/src/fluidimage/works/surface_tracking.py @@ -6,6 +6,7 @@ :private-members: """ + ############################################################################### # !/usr/bin/env python # # -*- coding: utf-8 -*- #