From fdefe399d95c44d729e3b300598a885057f8d4c8 Mon Sep 17 00:00:00 2001 From: RobertoRoos Date: Fri, 25 Oct 2024 10:48:30 +0200 Subject: [PATCH] Added an install group for building documentation + Added extra groups to contributing guide --- docs/dev/contribute.rst | 13 +++++++++---- setup.cfg | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/dev/contribute.rst b/docs/dev/contribute.rst index 7e88ab9263..5d08b0669d 100644 --- a/docs/dev/contribute.rst +++ b/docs/dev/contribute.rst @@ -37,15 +37,20 @@ If you had already installed PyMeasure using :code:`pip`, make sure to uninstall pip uninstall pymeasure -Install PyMeasure in the editable mode. +Install PyMeasure in the editable mode and select optional extras. .. code-block:: bash cd /path/for/code/pymeasure - pip install -e . + pip install -e .[tests,docs] -This will allow you to edit the files of PyMeasure and see the changes reflected. Make sure to reset your notebook kernel or Python console when doing so. Now you have your own copy of the development version of PyMeasure installed! -Depending on your Python installation you may get an error messages saying that the file setup.py is missing or similar. Updating pip may solve the problem +The ``-e`` will allow you to edit the files of PyMeasure and see the changes reflected. +The square brackets include extra groups that allow you to run tests and build the documentation locally. +Make sure to reset your notebook kernel or Python console when doing so. +Now you have your own copy of the development version of PyMeasure installed! + +Depending on your Python installation you may get an error messages saying that the file setup.py is missing or similar. +Updating pip may solve the problem. .. code-block:: bash diff --git a/setup.cfg b/setup.cfg index 614b0165d8..eca38a41f7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,6 +47,9 @@ tests = pytest-cov >= 4.1.0 pytest-qt >= 2.4.0 # install pyqt or pyside manually as desired pyvisa-sim >= 0.4.0 +docs = + sphinx >= 5.0.0 + sphinx_rtd_theme >= 1.1.0 [flake8] exclude = .git,__pycache__,docs/conf.py,build,dist