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

feat: moved to pyproject.toml; closes #162

This commit is contained in:
2024-05-09 10:10:18 +02:00
parent c33ce05951
commit c86ce302a9
4 changed files with 60 additions and 80 deletions

View File

@ -52,7 +52,7 @@ pylint:
needs: []
before_script:
- pip install pylint pylint-exit anybadge
- pip install -e .[dev]
- pip install -e .[dev,pyqt6]
script:
- mkdir ./pylint
- pylint ./bec_widgets --output-format=text --output=./pylint/pylint.log | tee ./pylint/pylint.log || pylint-exit $?
@ -111,7 +111,7 @@ tests:
- apt-get update
- apt-get install -y libgl1-mesa-glx libegl1-mesa x11-utils libxkbcommon-x11-0 libdbus-1-3
- pip install -e ./bec/bec_lib[dev]
- pip install -e .[dev]
- pip install -e .[dev,pyqt6]
- coverage run --source=./bec_widgets -m pytest -v --junitxml=report.xml --random-order --full-trace ./tests/unit_tests
- coverage report
- coverage xml
@ -164,7 +164,7 @@ end-2-end-conda:
- pip install -e ./bec_lib[dev]
- pip install -e ./bec_ipython_client[dev]
- cd ../
- pip install -e .[dev]
- pip install -e .[dev,pyqt6]
- cd ./tests/end-2-end
- pytest --start-servers --flush-redis --random-order

57
pyproject.toml Normal file
View File

@ -0,0 +1,57 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "bec_widgets"
version = "0.52.1"
description = "BEC Widgets"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
]
dependencies = [
"pydantic",
"qtconsole",
"jedi",
"qtpy",
"pyqtgraph",
"bec_lib",
"zmq",
"h5py",
"pyqtdarktheme",
"black",
]
[project.optional-dependencies]
dev = [
"pytest",
"pytest-random-order",
"pytest-timeout",
"coverage",
"pytest-qt",
"isort",
"fakeredis",
]
pyqt5 = ["PyQt5>=5.9"]
pyqt6 = ["PyQt6>=6.7"]
[project.urls]
"Bug Tracker" = "https://gitlab.psi.ch/bec/bec_widgets/issues"
Homepage = "https://gitlab.psi.ch/bec/bec_widgets"
[tool.hatch.build.targets.wheel]
include = ["*"]
[tool.black]
line-length = 100
skip-magic-trailing-comma = true
[tool.isort]
profile = "black"
line_length = 100
multi_line_output = 3
include_trailing_comma = true

View File

@ -1,21 +0,0 @@
[metadata]
name = bec_widgets
description = BEC Widgets
long_description = file: README.md
long_description_content_type = text/markdown
url = https://gitlab.psi.ch/bec/bec-widgets
project_urls =
Bug Tracker = https://gitlab.psi.ch/bec/bec-widgets/issues
classifiers =
Programming Language :: Python :: 3
Development Status :: 3 - Alpha
Topic :: Scientific/Engineering
[options]
package_dir =
= .
packages = find:
python_requires = >=3.10
[options.packages.find]
where = .

View File

@ -1,56 +0,0 @@
# pylint: disable= missing-module-docstring
from setuptools import find_packages, setup
__version__ = "0.52.1"
# Default to PyQt6 if no other Qt binding is installed
QT_DEPENDENCY = "PyQt6>=6.7"
# pylint: disable=unused-import
try:
import PyQt5
except ImportError:
pass
else:
QT_DEPENDENCY = "PyQt5>=5.9"
if __name__ == "__main__":
setup(
install_requires=[
"pydantic",
"qtconsole",
QT_DEPENDENCY,
"jedi",
"qtpy",
"pyqtgraph",
"bec_lib",
"zmq",
"h5py",
"pyqtdarktheme",
"black",
],
extras_require={
"dev": [
"pytest",
"pytest-random-order",
"pytest-timeout",
"coverage",
"pytest-qt",
"black",
"isort",
"fakeredis",
],
"pyqt5": ["PyQt5>=5.9"],
"pyqt6": ["PyQt6>=6.7"],
},
version=__version__,
packages=find_packages(),
include_package_data=True,
package_data={
"": [
"*.ui",
"*.yaml",
"*.png",
]
},
)