0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 11:11:49 +02:00

docs: review developer section; add introduction

This commit is contained in:
2024-08-08 22:54:30 +02:00
parent a4a0bac3c1
commit 2af5c94913
6 changed files with 50 additions and 28 deletions

View File

@ -1,7 +1,9 @@
(developer)=
# Developer
Welcome to the BEC Widgets developer guide! This section is intended for developers who want to contribute to the development of BEC Widgets.
Welcome to the BEC Widgets developer guide! BEC Widgets is a framework for building graphical user interfaces (GUIs) for [BEC](https://bec.readthedocs.io/en/latest/), a Python package for beamline experiment control.
This guide targets readers who want to develop new widgets or extend existing ones. If your goal is to use BEC Widgets to build GUIs for your experiments, please refer to the [user guide](#user).
```{toctree}
---
@ -9,8 +11,8 @@ maxdepth: 2
hidden: true
---
getting_started/getting_started.md
widgets/widgets.md
introduction/introduction.md
widget_development/widget_development.md
api_reference/api_reference.md
```
@ -21,26 +23,28 @@ api_reference/api_reference.md
:gutter: 5
```{grid-item-card}
:link: developer.getting_started
:link: developer.introduction
:link-type: ref
:img-top: /assets/rocket_launch_48dp.svg
:text-align: center
## Getting Started
## Introduction
Learn how to install BEC Widgets and get started with the framework.
An introduction into the single-resposibility principle and the modular design of BEC Widgets.
```
```{grid-item-card}
:link: developer.widgets
:link: developer.widget_development
:link-type: ref
:img-top: /assets/apps_48dp.svg
:text-align: center
## Widgets
## Widget Development
Learn about the building blocks of larger applications: widgets.
Learn how to develop a new modular widget for BEC Widgets.
```
````
````{grid} 2

View File

@ -1,12 +0,0 @@
(developer.getting_started)=
# Getting Started
This section provides valuable information for developers who want to contribute to the development of BEC Widgets. The guide will help you set up the development environment, understand the modular development concept of BEC Widgets, and contribute to the project.
```{toctree}
---
maxdepth: 2
hidden: false
---
development/
```

View File

@ -0,0 +1,14 @@
(developer.concepts)=
# Concepts
This section provides an overview of the core concepts of BEC Widgets, which are based on the single-responsibility principle and modular design.
## Moduler Design
We develop widgets with the single-responsibility principle in mind, meaning each widget is designed for a specific task. Our goal is to keep widgets simple, using them primarily for visualization or to initiate actions within BEC. Following these ideas, widgets should be designed to be reusable in various applications, making them versatile building blocks for larger GUIs.
We offer up to three different options for composing larger GUIs from these modular widgets: BECDesigner, DockArea widget, or scripting from the command line interface. More information about these options can be found in the user sections on [applications](user.applications).
## Client-Server Architecture
BEC Widgets is built on top of the [BEC](https://bec.readthedocs.io/en/latest/) package, which provides the backend for beamline experiment control. BEC Widgets is a client of BEC, meaning it can interact with the backend through a client-server architecture. To make full usage of the available features of BEC, we recommend to check the documentation about [data access](https://bec.readthedocs.io/en/latest/developer/data_access/data_access.html) in which the messaging and event system of BEC is described.
In the context of BEC Widgets, the [`BECDispatcher`](/api_reference/_autosummary/bec_widgets.utils.bec_dispatcher.BECDispatcher) connects to this messaging and event system, allowing you to link your Qt [`Slots`](https://www.pythonguis.com/tutorials/pyside6-signals-slots-events/) to messages and event received from BEC.

View File

@ -1,5 +1,5 @@
(developer.development)=
# Development
(developer.contributing)=
# Contributing
If you like to contribute to the development of BEC Widgets, you can follow the steps below to set up your development environment.
BEC Widgets works in conjunction with [BEC](https://bec.readthedocs.io/en/latest/).
@ -10,6 +10,7 @@ If you already have a BEC environment set up, you can install BEC Widgets in edi
**Prerequisites**
1. **Python Version:** BEC Widgets requires Python version 3.10 or higher. Verify your Python version to ensure compatibility.
2. **BEC Installation:** BEC Widgets works in conjunction with BEC. While BEC is a dependency and will be installed automatically, you can find more information about BEC and its installation process in the [BEC documentation](https://beamline-experiment-control.readthedocs.io/en/latest/).
3. **Qt Distributions:** BEC Widgets supports [PySide6](https://doc.qt.io/qtforpython-6/quickstart.html) and [PyQt6](https://www.riverbankcomputing.com/static/Docs/PyQt6/introduction.html). We use [qtpy](https://pypi.org/project/QtPy/) to abstract the underlying QT distribution.
**Clone the Repository**:
```bash
@ -20,8 +21,8 @@ cd bec_widgets
Please install the package in editable mode into your BEC Python environemnt.
```bash
pip install -e '.[dev,pyqt6]'
pip install -e '.[dev,pyside6]'
```
This installs the package together with [PyQT6](https://www.riverbankcomputing.com/static/Docs/PyQt6/introduction.html).
This installs the package together with [PySide6](https://doc.qt.io/qtforpython-6/quickstart.html).

View File

@ -0,0 +1,15 @@
(developer.introduction)=
# Introduction
BEC Widgets is a framework providing modular components that can be integrated into various larger GUI applications. Each widget serves a specific purpose adhering to the single-responsibility principle as detailed in our [concepts section](developer.concepts), and offers a straightforward, user-friendly interface.
These widgets provide data visualisation tools and experimental control interfaces by triggering actions within BEC.
If you're interested in contributing to BEC Widgets, please refer to our [contributing guide](developer.contributing), which provides instructions for setting up your development environment and creating your own widgets.
```{toctree}
---
maxdepth: 2
hidden: false
---
concepts/
contributing/
```

View File

@ -1,5 +1,5 @@
(developer.widgets)=
# Widgets
(developer.widget_development)=
# Widget development
This section provides an introduction to the building blocks of BEC Widgets: widgets. Widgets are the basic components of the graphical user interface (GUI) and are used to create larger applications. We will cover key topics such as how to develop new widgets or how to customise existing widgets. For details on the already available widgets and their usage, please refer to user section about [widgets](#user.widgets)
```{toctree}