Automatic PyPi deployment.

This commit is contained in:
jupfi 2024-04-18 19:45:45 +02:00
parent 303884b034
commit d2a05452f9
8 changed files with 98 additions and 15 deletions

View file

@ -12,6 +12,7 @@ class PulseProgrammerController(ModuleController):
def on_loading(self, pulse_parameter_options : dict) -> None:
"""This method is called when the module is loaded. It sets the pulse parameter options in the model.
Args:
pulse_parameter_options (dict): The pulse parameter options.
"""
@ -21,6 +22,7 @@ class PulseProgrammerController(ModuleController):
@pyqtSlot(str)
def delete_event(self, event_name : str) -> None:
"""This method deletes an event from the pulse sequence.
Args:
event_name (str): The name of the event to be deleted.
"""
@ -34,6 +36,7 @@ class PulseProgrammerController(ModuleController):
@pyqtSlot(str, str)
def change_event_name(self, old_name : str, new_name : str) -> None:
"""This method changes the name of an event.
Args:
old_name (str): The old name of the event.
new_name (str): The new name of the event.
@ -84,7 +87,7 @@ class PulseProgrammerController(ModuleController):
@pyqtSlot(str)
def on_move_event_right(self, event_name : str) -> None:
""" This method moves the event one position to the right if possible.
"""This method moves the event one position to the right if possible.
Args:
event_name (str): The name of the event to be moved.
@ -123,7 +126,7 @@ class PulseProgrammerController(ModuleController):
"""
logger.debug("Loading pulse sequence from %s", path)
sequence = None
with open(path, "r") as file:
with open(path) as file:
sequence = file.read()
sequence = json.loads(sequence)

View file

@ -1,7 +1,7 @@
import logging
from decimal import Decimal
from collections import OrderedDict
from PyQt6.QtCore import pyqtSignal, pyqtSlot
from PyQt6.QtCore import pyqtSignal
from nqrduck.module.module_model import ModuleModel
from nqrduck_spectrometer.pulsesequence import PulseSequence

View file

@ -1,9 +1,8 @@
import logging
import functools
from collections import OrderedDict
from pathlib import Path
from decimal import Decimal
from PyQt6.QtGui import QIcon, QValidator
from PyQt6.QtGui import QValidator
from PyQt6.QtWidgets import (
QMessageBox,
QGroupBox,
@ -519,7 +518,8 @@ class OptionsDialog(QDialog):
class FunctionOptionWidget(QWidget):
"""This class is a widget that can be used to set the options for a pulse parameter.
It plots the given function in time and frequency domain.
One can also select the function from a list of functions represented as buttons."""
One can also select the function from a list of functions represented as buttons.
"""
def __init__(self, function_option, event, parent=None):
super().__init__(parent)
@ -719,7 +719,8 @@ class FunctionOptionWidget(QWidget):
Args:
message (str): The message to be shown in the message box
information (str): The information to be shown in the message box"""
information (str): The information to be shown in the message box
"""
msg = QMessageBox(parent=self.parent)
msg.setIcon(QMessageBox.Icon.Warning)
msg.setText(message)
@ -777,14 +778,16 @@ class AddEventDialog(QDialog):
"""Returns the name entered by the user.
Returns:
str: The name entered by the user"""
str: The name entered by the user
"""
return self.name_input.text()
def get_duration(self) -> Decimal:
"""Returns the duration entered by the user, or a fallback value."
Returns:
Decimal: The duration value provided by the user, or 20"""
Decimal: The duration value provided by the user, or 20
"""
return Decimal(self.duration_lineedit.text() or 20)
def check_input(self) -> None: