diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b33da657a56f302a939c62e3341155f5f7f4fb5..f37ae53dae489808bbff21517ac42ccd89ae83f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,8 +9,7 @@ before_script: - apt-get install -y libxcb-cursor-dev - python -m pip install --upgrade pip - python --version - - pip install -r requirements.txt - - pip install $QT_API + - pip install .[$QT_API] - git fetch --tags # - export CXXFLAGS='--coverage' # Install without dependencies to make sure that requirements.txt is up-to-date @@ -18,7 +17,7 @@ before_script: - pip show b_asic - export QT_API=$QT_API # Install test dependencies - - pip install -r requirements_test.txt + - pip install .[test] - export PYTEST_QT_API=$QT_API .run-test: @@ -90,7 +89,7 @@ run-doc-test: image: python:3.10 stage: test script: - - pip install -r requirements_doc.txt + - pip install .[doc] - sphinx-build -b html docs_sphinx public # Run linting on doc-strings - pip install black velin @@ -110,7 +109,7 @@ pages: image: python:3.10 script: - apt-get install --yes optipng - - pip install -r requirements_doc.txt + - pip install .[doc] - sphinx-build -b html docs_sphinx public artifacts: paths: diff --git a/pyproject.toml b/pyproject.toml index bffec3c704e29ea49dca272c30a53871d7e4d777..4250e3beae1e5e5f1c7ac86110d494a2f962867d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,22 @@ dynamic = ["version", "authors"] [project.optional-dependencies] pyqt6 = ["pyqt6"] pyside6 = ["pyside6"] +test = [ + "pytest", + "pytest-cov", + "pytest-qt", + "pytest-timeout", + "pytest-xvfb", + "pytest-xdist", +] +doc = [ + "sphinx", + "furo", + "numpydoc", + "sphinx-gallery", + "mplsignal", + "sphinx-copybutton", +] [tool.setuptools] zip-safe = false diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 5fc3bae5b83499ff0df0c2d065c9e05b1aa7e4c4..0000000000000000000000000000000000000000 --- a/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -numpy -qtpy -graphviz>=0.19 -matplotlib>=3.7 -setuptools_scm[toml]>=6.2 -networkx>=3 -qtawesome diff --git a/requirements_doc.txt b/requirements_doc.txt deleted file mode 100644 index 4474f4925f060ee814b5b14cb4af552c7d6b0f8c..0000000000000000000000000000000000000000 --- a/requirements_doc.txt +++ /dev/null @@ -1,6 +0,0 @@ -sphinx -furo -numpydoc -sphinx-gallery -mplsignal -sphinx-copybutton diff --git a/requirements_test.txt b/requirements_test.txt deleted file mode 100644 index 0227dfd78bf4ebc0abed394895fc457fe6175bfe..0000000000000000000000000000000000000000 --- a/requirements_test.txt +++ /dev/null @@ -1,6 +0,0 @@ -pytest -pytest-cov -pytest-qt -pytest-timeout -pytest-xvfb -pytest-xdist