diff --git a/README.md b/README.md index 9ade7136..284543e3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ BEC Widgets is a GUI framework designed for interaction with [BEC (Beamline Expe Use the package manager [pip](https://pip.pypa.io/en/stable/) to install BEC Widgets: ```bash -pip install bec_widgets +pip install bec_widgets PyQt6 ``` For development purposes, you can clone the repository and install the package locally in editable mode: @@ -14,10 +14,11 @@ For development purposes, you can clone the repository and install the package l ```bash git clone https://gitlab.psi.ch/bec/bec-widgets cd bec_widgets -pip install -e .[dev] +pip install -e .[dev,pyqt6] ``` -BEC Widgets currently supports both PyQt5 and PyQt6. By default, PyQt6 is installed. +BEC Widgets currently supports both PyQt5 and PyQt6, however, no default distribution is specified. As a result, users must install one of the supported +Python Qt distributions manually. To select a specific Python Qt distribution, install the package with an additional tag: @@ -31,7 +32,7 @@ pip install bec_widgets[pyqt5] ``` ## Documentation -Documentation of BEC Widgets can be found [here](https://bec-widgets.readthedocs.io/en/latest/). The documentation of the BEC can be found [here](https://beamline-experiment-control.readthedocs.io/en/latest/). +Documentation of BEC Widgets can be found [here](https://bec-widgets.readthedocs.io/en/latest/). The documentation of the BEC can be found [here](https://bec.readthedocs.io/en/latest/). ## Contributing diff --git a/docs/conf.py b/docs/conf.py index 5fe62696..21eead99 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,6 +9,8 @@ import os import pathlib +import tomli + project = "BEC Widgets" copyright = "2023, Paul Scherrer Institute" author = "Paul Scherrer Institute" @@ -16,18 +18,15 @@ author = "Paul Scherrer Institute" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -current_path = pathlib.Path(__file__).parent.parent.resolve() +current_path = pathlib.Path(__file__).parent.parent.parent.resolve() +version_path = f"{current_path}/pyproject.toml" def get_version(): """load the version from the version file""" - version_file = os.path.join(current_path, "setup.py") - with open(version_file, "r", encoding="utf-8") as file: - res = file.readline() - while not res.startswith("__version__"): - res = file.readline() - version = res.split("=")[1] - return version.strip().strip('"') + with open(version_path, "r", encoding="utf-8") as file: + res = tomli.loads(file.read()) + return res["project"]["version"] release = get_version() diff --git a/docs/developer/developer.md b/docs/developer/developer.md index 37a4f323..11e28be6 100644 --- a/docs/developer/developer.md +++ b/docs/developer/developer.md @@ -20,7 +20,7 @@ cd bec_widgets Installing the package in editable mode allows you to make changes to the code and test them in real-time. ```bash -pip install -e .[dev] +pip install -e .[dev,pyqt6] ``` diff --git a/docs/requirements.txt b/docs/requirements.txt index 7aae9ae7..404ca0ea 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,3 +7,4 @@ sphinx-copybutton myst-parser sphinx-design bec-widgets +tomli \ No newline at end of file