Skip to content
Snippets Groups Projects
Commit c94583a7 authored by Egor Sobolev's avatar Egor Sobolev
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #167080 failed
dist/
build/
src/sfxMonitor/_version.py
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
develop-eggs/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# Environments
.env
.venv
.devenv
env/
venv/
ENV/
env.bak/
venv.bak/
# mkdocs documentation
/site
# mypy
.mypy_cache/
# VS Code specific
.vscode/
# PyCharm specific
.idea/
# This file is intended to be used together with Karabo:
#
# http://www.karabo.eu
#
# IF YOU REQUIRE ANY LICENSING AND COPYRIGHT TERMS, PLEASE ADD THEM HERE.
# Karabo itself is licensed under the terms of the MPL 2.0 license.
variables:
USE_ISORT: "true"
USE_FLAKE: "true"
include:
- project: karabo/gitlabci
file: .python-ci.yml
ref: main
[settings]
combine_as_imports=True
include_trailing_comma=False
# 4 - Hanging Grid, standard
multi_line_output=4
line_length=79
known_first_party=karabo,sfxMonitor
src_paths=src
# SfxMonitor Device (Python)
## Testing
Every Karabo device in Python is shipped as a regular python package.
In order to make the device visible to any device-server you have to install
the package to Karabo's own Python environment.
Simply type:
``pip install -e .``
in the directory of where the ``setup.py`` file is located, or use the ``karabo``
utility script:
``karabo develop sfxMonitor``
## Running
If you want to manually start a server using this device, simply type:
``karabo-pythonserver serverId=pythonServer/1 deviceClasses=SfxMonitor``
Or just use (a properly configured):
``karabo-start``
git+https://git.xfel.eu/xfel-rtd/rtd-conf.git
slumber==0.7.1
traits==4.6.0
[build-system]
requires = ["setuptools>=64", "setuptools-scm>=6.4", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
root = "."
write_to = "src/sfxMonitor/_version.py"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
SfxMonitor = ["data/*.*"]
[project.entry-points."karabo.bound_device"]
SfxMonitor = "sfxMonitor.SfxMonitor:SfxMonitor"
[project]
dynamic = ["version"]
name = "SfxMonitor"
authors = [
{name = "esobolev"},
]
description = ""
readme = "README.md"
dependencies = [
]
#############################################################################
# Author: esobolev
#
# Created on February 23, 2025, 12:58 AM
# from template 'minimal python' of Karabo 2.21.0
#
# This file is intended to be used together with Karabo:
#
# http://www.karabo.eu
#
# IF YOU REQUIRE ANY LICENSING AND COPYRIGHT TERMS, PLEASE ADD THEM HERE.
# Karabo itself is licensed under the terms of the MPL 2.0 license.
#############################################################################
from karabo.bound import KARABO_CLASSINFO, PythonDevice
from ._version import version as deviceVersion
@KARABO_CLASSINFO("SfxMonitor", deviceVersion)
class SfxMonitor(PythonDevice):
@staticmethod
def expectedParameters(expected):
""" This static method is needed as a part of the factory/configuration
system.
@param expected - Will contain the description of the device's expected
parameters.
NOTE: parenthesis () are used for allowing to switch off interpreter
indentation rule.
"""
(
)
def __init__(self, configuration):
# always call PythonDevice constructor first!
super().__init__(configuration)
# Define the first function to be called after the constructor has
# finished
self.registerInitialFunction(self.initialization)
# If you need methods that can be callable from another device or GUI
# you may register them here:
# self.KARABO_SLOT(self.myslot1)
# self.KARABO_SLOT(myslot2)
# ...
# It works for both methods (normal case) and standalone functions.
# See documentation of KARABO_SLOT for more details.
# Initialize your member variables here...
# self._privateData = None
def initialization(self):
"""
This method will be called after the constructor.
"""
# Register methods to process pipeline data.
# Here 'def onData(self, data, meta)' is registered
# for InputChannel "input" as defined in expectedParameters.
# self.KARABO_ON_DATA("input", self.onData)
# This file is intended to be used together with Karabo:
#
# http://www.karabo.eu
#
# IF YOU REQUIRE ANY LICENSING AND COPYRIGHT TERMS, PLEASE ADD THEM HERE.
# Karabo itself is licensed under the terms of the MPL 2.0 license.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment