Merge pull request #2 from bec-project/update/1.1
update plugin version to 1.1.1
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# It is needed to track the repo template version, and editing may break things.
|
||||
# This file will be overwritten by copier on template updates.
|
||||
|
||||
_commit: v1.0.5
|
||||
_commit: v1.1.1
|
||||
_src_path: https://github.com/bec-project/plugin_copier_template.git
|
||||
make_commit: true
|
||||
project_name: bec_testing_plugin
|
||||
|
||||
@@ -3,8 +3,12 @@ Pre-startup script for BEC client. This script is executed before the BEC client
|
||||
is started. It can be used to add additional command line arguments.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from bec_lib.service_config import ServiceConfig
|
||||
|
||||
import bec_testing_plugin
|
||||
|
||||
|
||||
def extend_command_line_args(parser):
|
||||
"""
|
||||
@@ -14,3 +18,14 @@ def extend_command_line_args(parser):
|
||||
# parser.add_argument("--session", help="Session name", type=str, default="cSAXS")
|
||||
|
||||
return parser
|
||||
|
||||
def get_config() -> ServiceConfig:
|
||||
"""
|
||||
Create and return the ServiceConfig for the plugin repository
|
||||
"""
|
||||
deployment_path = os.path.dirname(os.path.dirname(os.path.dirname(bec_testing_plugin.__file__)))
|
||||
files = os.listdir(deployment_path)
|
||||
if "bec_config.yaml" in files:
|
||||
return ServiceConfig(config_path=os.path.join(deployment_path, "bec_config.yaml"))
|
||||
else:
|
||||
return ServiceConfig(redis={"host": "localhost", "port": 6379})
|
||||
|
||||
@@ -1,11 +1,27 @@
|
||||
from bec_widgets.utils.bec_widget import BECWidget
|
||||
from qtpy.QtWidgets import QWidget
|
||||
|
||||
<<<<<<< before updating
|
||||
from bec_testing_plugin.bec_widgets.widgets.ExampleWidgetPlugin.ExampleWidgetPlugin_ui import (
|
||||
Ui_Examplewidgetplugin,
|
||||
)
|
||||
=======
|
||||
|
||||
from bec_testing_plugin.bec_widgets.widgets.ExampleWidgetPlugin.ExampleWidgetPlugin_ui import Ui_examplewidgetplugin
|
||||
>>>>>>> after updating
|
||||
|
||||
|
||||
class Examplewidgetplugin(BECWidget, QWidget, Ui_Examplewidgetplugin):
|
||||
class Examplewidgetplugin(BECWidget, QWidget, Ui_examplewidgetplugin):
|
||||
def __init__(self, parent=None, **kwargs):
|
||||
super().__init__(parent=parent, **kwargs)
|
||||
self.setupUi(self)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
from qtpy.QtWidgets import QApplication
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
widget = Examplewidgetplugin()
|
||||
widget.show()
|
||||
sys.exit(app.exec())
|
||||
@@ -5,3 +5,13 @@ from qtpy.QtWidgets import QWidget
|
||||
class Nouiwidgetplugin(BECWidget, QWidget):
|
||||
def __init__(self, parent=None, **kwargs):
|
||||
super().__init__(parent=parent, **kwargs)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
from qtpy.QtWidgets import QApplication
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
widget = Nouiwidgetplugin()
|
||||
widget.show()
|
||||
sys.exit(app.exec())
|
||||
Reference in New Issue
Block a user