mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-13 19:21:50 +02:00
docs: refactor developer section, add widget tutorial
This commit is contained in:
@ -1,18 +1,46 @@
|
|||||||
(developer)=
|
(developer)=
|
||||||
# Development
|
# Developer
|
||||||
|
|
||||||
To contribute to the development of BEC Widgets, start by setting up the development environment:
|
Welcome to the BEC Widgets developer guide! This section is intended for developers who want to contribute to the development of BEC Widgets.
|
||||||
|
|
||||||
1. **Clone the Repository**:
|
```{toctree}
|
||||||
```bash
|
---
|
||||||
git clone https://gitlab.psi.ch/bec/bec_widgets
|
maxdepth: 2
|
||||||
cd bec_widgets
|
hidden: true
|
||||||
```
|
---
|
||||||
2. **Install in Editable Mode**:
|
|
||||||
|
|
||||||
Installing the package in editable mode allows you to make changes to the code and test them in real-time.
|
getting_started/getting_started.md
|
||||||
```bash
|
widgets/widgets.md
|
||||||
pip install -e .[dev,pyqt6]
|
api_reference/api_reference.md
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
````{grid} 2
|
||||||
|
:gutter: 5
|
||||||
|
|
||||||
|
```{grid-item-card}
|
||||||
|
:link: user.getting_started
|
||||||
|
:link-type: ref
|
||||||
|
:img-top: /assets/rocket_launch_48dp.svg
|
||||||
|
:text-align: center
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
Learn how to install BEC Widgets and get started with the framework.
|
||||||
|
```
|
||||||
|
|
||||||
|
```{grid-item-card}
|
||||||
|
:link: user.widgets
|
||||||
|
:link-type: ref
|
||||||
|
:img-top: /assets/apps_48dp.svg
|
||||||
|
:text-align: center
|
||||||
|
|
||||||
|
## Widgets
|
||||||
|
|
||||||
|
Learn about the building blocks of larger applications: widgets.
|
||||||
|
```
|
||||||
|
````
|
||||||
|
|
||||||
|
|
||||||
|
27
docs/developer/getting_started/development.md
Normal file
27
docs/developer/getting_started/development.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
(developer.development)=
|
||||||
|
# Development
|
||||||
|
|
||||||
|
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/).
|
||||||
|
Therefore, we recommend that you install BEC first following the [developer instructions](https://bec.readthedocs.io/en/latest/developer/getting_started/install_developer_env.html) and include BEC Widgets.
|
||||||
|
|
||||||
|
If you already have a BEC environment set up, you can install BEC Widgets in editable mode into your BEC Python environment.
|
||||||
|
|
||||||
|
**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/).
|
||||||
|
|
||||||
|
**Clone the Repository**:
|
||||||
|
```bash
|
||||||
|
git clone https://gitlab.psi.ch/bec/bec_widgets
|
||||||
|
cd bec_widgets
|
||||||
|
```
|
||||||
|
**Install in Editable Mode**:
|
||||||
|
|
||||||
|
Please install the package in editable mode into your BEC Python environemnt.
|
||||||
|
```bash
|
||||||
|
pip install -e '.[dev,pyqt6]'
|
||||||
|
```
|
||||||
|
This installs the package together with [PyQT6](https://www.riverbankcomputing.com/static/Docs/PyQt6/introduction.html).
|
||||||
|
|
||||||
|
|
12
docs/developer/getting_started/getting_started.md
Normal file
12
docs/developer/getting_started/getting_started.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
(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/
|
||||||
|
```
|
12
docs/developer/widgets/widgets.md
Normal file
12
docs/developer/widgets/widgets.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
(developer.widgets)=
|
||||||
|
# Widgets
|
||||||
|
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}
|
||||||
|
---
|
||||||
|
maxdepth: 2
|
||||||
|
hidden: false
|
||||||
|
---
|
||||||
|
|
||||||
|
how_to_develop_a_widget/
|
||||||
|
```
|
@ -9,7 +9,7 @@ Before installing BEC Widgets, please ensure the following requirements are met:
|
|||||||
|
|
||||||
**Standard Installation**
|
**Standard Installation**
|
||||||
|
|
||||||
To install BEC Widgets using the pip package manager, execute the following command in your terminal for getting the default PyQT6 version in your python environment:
|
To install BEC Widgets using the pip package manager, execute the following command in your terminal for getting the default PyQT6 version into your python environment for BEC:
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
(user.widgets.text_box)=
|
(user.widgets.text_box)=
|
||||||
# [Text Box Widget](/api_reference/_autosummary/bec_widgets.cli.client.TextBoxWidget)
|
# [Text Box Widget](/api_reference/_autosummary/bec_widgets.cli.client.TextBox)
|
||||||
**Purpose:**
|
**Purpose:**
|
||||||
|
|
||||||
The Text Box Widget is a widget that allows you to display text within the BEC GUI. The widget can be used to display plain text or HTML text.
|
The Text Box Widget is a widget that allows you to display text within the BEC GUI. The widget can be used to display plain text or HTML text.
|
||||||
|
Reference in New Issue
Block a user