Skip to content

Commit

Permalink
Sort imports and apply black on everything
Browse files Browse the repository at this point in the history
  • Loading branch information
cbespin committed Dec 16, 2024
1 parent 5a94e0e commit aba20c2
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 25 deletions.
7 changes: 4 additions & 3 deletions aidatlu/TLUPyProducer.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#! /usr/bin/env python3
# load binary lib/pyeudaq.so
import pyeudaq
from pyeudaq import EUDAQ_INFO, EUDAQ_ERROR
import time
from main.tlu import AidaTLU

import pyeudaq
import uhal
from main.tlu import AidaTLU
from pyeudaq import EUDAQ_ERROR, EUDAQ_INFO

"""
Example Producer from EUDAQ
Expand Down
1 change: 0 additions & 1 deletion aidatlu/aidatlu_run.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import uhal

from main.tlu import AidaTLU


Expand Down
2 changes: 1 addition & 1 deletion aidatlu/hardware/clock_controller.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from aidatlu import logger
from aidatlu.hardware.i2c import I2CCore
from aidatlu.hardware.ioexpander_controller import IOControl
from aidatlu import logger


class ClockControl:
Expand Down
2 changes: 1 addition & 1 deletion aidatlu/hardware/dac_controller.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from aidatlu.hardware.i2c import I2CCore
from aidatlu import logger
from aidatlu.hardware.i2c import I2CCore


class DacControl:
Expand Down
1 change: 1 addition & 0 deletions aidatlu/hardware/i2c.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import time
from math import ceil

from aidatlu import logger

i2c_addr = {
Expand Down
2 changes: 1 addition & 1 deletion aidatlu/hardware/trigger_controller.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from aidatlu import logger
from aidatlu.hardware.i2c import I2CCore
from aidatlu.hardware.utils import _pack_bits
from aidatlu import logger


class TriggerLogic:
Expand Down
1 change: 1 addition & 0 deletions aidatlu/logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging

import coloredlogs

FORMAT = "%(asctime)s [%(name)-18s] - %(levelname)-7s %(message)s"
Expand Down
3 changes: 2 additions & 1 deletion aidatlu/main/config_parser.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import yaml

from aidatlu import logger


class TLUConfigure():
class TLUConfigure:
def __init__(self, TLU, io_control, config_path) -> None:
self.log = logger.setup_main_logger(__class__.__name__)

Expand Down
3 changes: 2 additions & 1 deletion aidatlu/main/tlu.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import tables as tb
import uhal
import zmq

from aidatlu import logger
from aidatlu.hardware.clock_controller import ClockControl
from aidatlu.hardware.dac_controller import DacControl
Expand All @@ -19,7 +20,7 @@
from aidatlu.main.data_parser import DataParser


class AidaTLU():
class AidaTLU:
def __init__(self, hw, config_path, clock_config_path) -> None:
self.log = logger.setup_main_logger(__class__.__name__)

Expand Down
5 changes: 2 additions & 3 deletions aidatlu/online_monitor/tlu_receiver.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import pyqtgraph as pg
from PyQt5 import QtWidgets
from pyqtgraph.dockarea import Dock, DockArea

from online_monitor.receiver.receiver import Receiver
from online_monitor.utils import utils
from PyQt5 import QtWidgets
from pyqtgraph.dockarea import Dock, DockArea


class AIDATLUReciever(Receiver):
Expand Down
17 changes: 9 additions & 8 deletions aidatlu/test/hardware_test.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
from aidatlu.main.tlu import AidaTLU
from aidatlu.hardware.i2c import I2CCore
from aidatlu.hardware.ioexpander_controller import IOControl
from aidatlu.hardware.dac_controller import DacControl
import time

import numpy as np
import uhal

from aidatlu.hardware.clock_controller import ClockControl
from aidatlu.hardware.dac_controller import DacControl
from aidatlu.hardware.dut_controller import DUTLogic
from aidatlu.hardware.i2c import I2CCore
from aidatlu.hardware.ioexpander_controller import IOControl
from aidatlu.hardware.trigger_controller import TriggerLogic
from aidatlu.main.config_parser import TLUConfigure

import uhal
import time
import numpy as np
from aidatlu.main.tlu import AidaTLU


class Test_IOCControl:
Expand Down
4 changes: 2 additions & 2 deletions aidatlu/test/software_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import numpy as np
import tables as tb

from aidatlu.main.config_parser import TLUConfigure
from aidatlu.main.data_parser import DataParser

BASE_PATH = Path(__file__).parent


def test_interpretation():
"""Test data interpretation and compare to reference file
"""
"""Test data interpretation and compare to reference file"""

data_parser = DataParser()
data_parser.interpret_data(
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
author = "Rasmus Partzsch"
release = version

import sys
import os
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from setuptools import setup
from setuptools import find_packages
from setuptools import find_packages, setup

author = "Christian Bespin, Rasmus Partzsch"
author_email = "[email protected], [email protected]"
Expand Down

0 comments on commit aba20c2

Please sign in to comment.