mirror of
https://github.com/ivan-usov-org/bec.git
synced 2025-04-20 09:50:02 +02:00
feat: added pytest-bec-e2e plugin
This commit is contained in:
parent
2e00112447
commit
deaa2b022a
@ -41,6 +41,7 @@ stages:
|
|||||||
- Deploy
|
- Deploy
|
||||||
|
|
||||||
.install-bec-services-dev: &install-bec-services-dev
|
.install-bec-services-dev: &install-bec-services-dev
|
||||||
|
- pip install -e ./pytest_bec_e2e
|
||||||
- pip install -e ./bec_server[dev]
|
- pip install -e ./bec_server[dev]
|
||||||
- pip install -e ./bec_ipython_client[dev]
|
- pip install -e ./bec_ipython_client[dev]
|
||||||
- pip install -e ./bec_lib[dev]
|
- pip install -e ./bec_lib[dev]
|
||||||
@ -297,6 +298,7 @@ end-2-end-conda:
|
|||||||
|
|
||||||
- source ./bin/install_bec_dev.sh -t
|
- source ./bin/install_bec_dev.sh -t
|
||||||
|
|
||||||
|
- pip install ./pytest_bec_e2e
|
||||||
- cd ./bec_ipython_client
|
- cd ./bec_ipython_client
|
||||||
- pip install .[dev]
|
- pip install .[dev]
|
||||||
- pytest --start-servers -v ./tests/end-2-end/test_scans_e2e.py::test_grid_scan
|
- pytest --start-servers -v ./tests/end-2-end/test_scans_e2e.py::test_grid_scan
|
||||||
|
@ -34,14 +34,12 @@ dev = [
|
|||||||
"pytest-timeout",
|
"pytest-timeout",
|
||||||
"pytest-redis",
|
"pytest-redis",
|
||||||
"pytest-retry",
|
"pytest-retry",
|
||||||
|
"pytest-bec-e2e",
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
bec = "bec_ipython_client.main:main"
|
bec = "bec_ipython_client.main:main"
|
||||||
|
|
||||||
[project.entry-points.pytest11]
|
|
||||||
bec_lib_end2end_fixtures = "bec_ipython_client.tests.end2end_fixtures"
|
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
"Bug Tracker" = "https://gitlab.psi.ch/bec/bec/issues"
|
"Bug Tracker" = "https://gitlab.psi.ch/bec/bec/issues"
|
||||||
Homepage = "https://gitlab.psi.ch/bec/bec"
|
Homepage = "https://gitlab.psi.ch/bec/bec"
|
||||||
|
@ -89,7 +89,7 @@ fi
|
|||||||
# check if the conda environment has the correct dependencies. If not, install them.
|
# check if the conda environment has the correct dependencies. If not, install them.
|
||||||
conda activate ${conda_env_name}
|
conda activate ${conda_env_name}
|
||||||
|
|
||||||
dependencies=(bec_lib bec_ipython_client bec_server)
|
dependencies=(pytest_bec_e2e bec_lib bec_ipython_client bec_server)
|
||||||
# split virtual environment into separate environments for each package
|
# split virtual environment into separate environments for each package
|
||||||
if [ "$split_env" = true ]; then
|
if [ "$split_env" = true ]; then
|
||||||
for package in "${dependencies[@]}"
|
for package in "${dependencies[@]}"
|
||||||
|
@ -24,7 +24,11 @@ RUN git clone --branch ${OPHYD_BRANCH} https://gitlab.psi.ch/bec/ophyd_devices
|
|||||||
WORKDIR /code/bec/ophyd_devices
|
WORKDIR /code/bec/ophyd_devices
|
||||||
RUN pip install -e .
|
RUN pip install -e .
|
||||||
WORKDIR /code/bec/
|
WORKDIR /code/bec/
|
||||||
RUN pip install -e bec_server
|
RUN pip install -e pytest_bec_e2e
|
||||||
|
RUN pip install -e bec_server[dev]
|
||||||
|
RUN pip install -e bec_ipython_client[dev]
|
||||||
|
RUN pip install -e bec_lib[dev]
|
||||||
|
|
||||||
WORKDIR /code/bec/${BEC_SERVICE}
|
WORKDIR /code/bec/${BEC_SERVICE}
|
||||||
RUN pip install -e .[dev]
|
RUN pip install -e .[dev]
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@ WORKDIR /code/bec
|
|||||||
RUN git clone --branch ${OPHYD_BRANCH} https://gitlab.psi.ch/bec/ophyd_devices
|
RUN git clone --branch ${OPHYD_BRANCH} https://gitlab.psi.ch/bec/ophyd_devices
|
||||||
WORKDIR /code/bec/ophyd_devices
|
WORKDIR /code/bec/ophyd_devices
|
||||||
RUN pip install -e .
|
RUN pip install -e .
|
||||||
|
WORKDIR /code/bec/pytest_bec_e2e
|
||||||
|
RUN pip install -e .
|
||||||
WORKDIR /code/bec/${BEC_SERVICE}
|
WORKDIR /code/bec/${BEC_SERVICE}
|
||||||
RUN pip install -e .[dev]
|
RUN pip install -e .[dev]
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ declare -a dirs=(
|
|||||||
"bec_ipython_client"
|
"bec_ipython_client"
|
||||||
"bec_lib"
|
"bec_lib"
|
||||||
"bec_server"
|
"bec_server"
|
||||||
|
"pytest_bec_e2e"
|
||||||
)
|
)
|
||||||
|
|
||||||
mkdir dist
|
mkdir dist
|
||||||
|
@ -4,6 +4,7 @@ version_toml = [
|
|||||||
"./bec_server/pyproject.toml:project.version",
|
"./bec_server/pyproject.toml:project.version",
|
||||||
"./bec_lib/pyproject.toml:project.version",
|
"./bec_lib/pyproject.toml:project.version",
|
||||||
"./bec_ipython_client/pyproject.toml:project.version",
|
"./bec_ipython_client/pyproject.toml:project.version",
|
||||||
|
"./pytest_bec_e2e/pyproject.toml:project.version",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.semantic_release.commit_author]
|
[tool.semantic_release.commit_author]
|
||||||
|
35
pytest_bec_e2e/pyproject.toml
Normal file
35
pytest_bec_e2e/pyproject.toml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "pytest-bec-e2e"
|
||||||
|
version = "2.4.2"
|
||||||
|
description = "BEC pytest plugin for end-to-end tests"
|
||||||
|
requires-python = ">=3.10"
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 3 - Alpha",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Topic :: Scientific/Engineering",
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"bec_lib",
|
||||||
|
"bec_ipython_client",
|
||||||
|
"bec_server",
|
||||||
|
"pytest",
|
||||||
|
"pytest_redis",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.entry-points.pytest11]
|
||||||
|
bec_end2end_fixtures = "pytest_bec_e2e.plugin"
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
"Bug Tracker" = "https://gitlab.psi.ch/bec/bec/issues"
|
||||||
|
Homepage = "https://gitlab.psi.ch/bec/bec"
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel]
|
||||||
|
include = ["*"]
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
line-length = 100
|
||||||
|
skip-magic-trailing-comma = true
|
@ -6,7 +6,6 @@ import pathlib
|
|||||||
import platform
|
import platform
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import warnings
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from pytest_redis import factories as pytest_redis_factories
|
from pytest_redis import factories as pytest_redis_factories
|
Loading…
x
Reference in New Issue
Block a user