From 7651da34d37451f5a3fd5744ad9d74a943d89d44 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson <oscar.gustafsson@gmail.com> Date: Fri, 27 Jan 2023 20:20:30 +0100 Subject: [PATCH] Update requirements and documentation --- README.md | 30 ++++++++++++++++++++++-------- requirements.txt | 1 + requirements_doc.txt | 3 +++ requirements_test.txt | 6 ++++++ 4 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 requirements.txt create mode 100644 requirements_doc.txt create mode 100644 requirements_test.txt diff --git a/README.md b/README.md index e0452838..2185be07 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ The following packages are required in order to build the library: - pybind11 - pyside2 - qtpy - - scipy - setuptools + - setuptools_scm To build a binary distribution, the following additional packages are required: @@ -36,13 +36,20 @@ To build a binary distribution, the following additional packages are required: To run the test suite, the following additional packages are required: -- Python: +- Python (install with `pip install -r requirements_test.txt`): - pytest + - pytest-qt + - pytest-mpl - pytest-cov (for testing with coverage) + - pytest-xvfb (for testing without showing windows on Linux) + - pytest-xdist (for parallel testing) To generate the documentation, the following additional packages are required: -- doxygen +- Python (install with `pip install -r requirements_doc.txt`): + - sphinx + - furo + - numpydoc ### Using CMake directly @@ -147,18 +154,25 @@ pytest #### Test with coverage ``` -pytest --cov=b_asic --cov-report html test +pytest --cov=b_asic --cov-report=html test +``` + +#### Test including plots + +``` +pytest --mpl ``` + ### Generating documentation -In `B-ASIC`: +In `B-ASIC/docs_sphinx`: ``` -doxygen +make html ``` -The output gets written to `B-ASIC/doc`. +The output gets written to `B-ASIC/docs_sphinx/_build`. ## Usage @@ -167,7 +181,7 @@ How to build and use the library as a user. ### Installation ``` -pip install b_asic +pip install . ``` ### Importing diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..cba8d886 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +setuptools_scm diff --git a/requirements_doc.txt b/requirements_doc.txt new file mode 100644 index 00000000..bd3577ef --- /dev/null +++ b/requirements_doc.txt @@ -0,0 +1,3 @@ +sphinx +furo +numpydoc diff --git a/requirements_test.txt b/requirements_test.txt new file mode 100644 index 00000000..64543e50 --- /dev/null +++ b/requirements_test.txt @@ -0,0 +1,6 @@ +pytest +pytest-cov +pytest-qt +pytest-mpl +pytest-xvfb +pytest-xdist -- GitLab