diff --git a/docs/_static/css/style.css b/docs/_static/css/style.css index eecbe3e..4c3c5b5 100644 --- a/docs/_static/css/style.css +++ b/docs/_static/css/style.css @@ -1,3 +1,15 @@ -.rst-content .sphinx-tabs-panel div[class^=highlight] { +.rst-content .sd-tab-content div[class^=highlight] { margin-bottom: 0 !important; } + +:root { + --sd-color-primary: #101f70; + --sd-color-primary-highlight: #2130a2; + --sd-color-primary-text: #ffffff; + --sd-color-secondary: #0b144d; + --sd-color-secondary-highlight: #1a2a84; + --sd-color-tabs-underline-active: #101f70; + --sd-color-tabs-label-active: #101f70; + --sd-color-tabs-underline-hover: #2130a2; + --sd-color-tabs-label-hover: #2130a2; +} diff --git a/docs/conf.py b/docs/conf.py index 447d679..9ee34df 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -34,7 +34,7 @@ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx_markdown_tables', - 'sphinx_tabs.tabs', + 'sphinx_design', 'sphinx_copybutton', 'sphinx_search.extension', 'myst_parser', diff --git a/docs/configuration/authentication/terms-of-use-middleware.md b/docs/configuration/authentication/terms-of-use-middleware.md index d3e8e56..dea8431 100644 --- a/docs/configuration/authentication/terms-of-use-middleware.md +++ b/docs/configuration/authentication/terms-of-use-middleware.md @@ -4,7 +4,7 @@ This feature was introduced in RDMO 2.3. ``` -A custom middleware can be enabled to force users to aknowlege the Terms of Use (TOS) of the instance (which themselves are configured as [part of the theme](/themes/index.html#terms-of-use). +A custom middleware can be enabled to force users to aknowlege the Terms of Use (TOS) of the instance (which themselves are configured as {ref}`part of the theme `). To enable the middleware use the following in your `config/settings/local.py`: diff --git a/docs/configuration/databases.md b/docs/configuration/databases.md index 1945263..b6c0500 100644 --- a/docs/configuration/databases.md +++ b/docs/configuration/databases.md @@ -9,18 +9,22 @@ PostgreSQL can be installed using: ```{eval-rst} -.. tabs:: +.. tab-set:: - .. code-tab:: bash Debian/Ubuntu + .. tab-item:: Debian/Ubuntu - sudo apt install postgresql + .. code-block:: bash - .. code-tab:: bash RHEL/CentOS + sudo apt install postgresql - sudo yum install postgresql-server postgresql-contrib - sudo postgresql-setup initdb - sudo systemctl start postgresql - sudo systemctl enable postgresql + .. tab-item:: RHEL/CentOS + + .. code-block:: bash + + sudo yum install postgresql-server postgresql-contrib + sudo postgresql-setup initdb + sudo systemctl start postgresql + sudo systemctl enable postgresql ``` To use PostgreSQL as your database backend install `psycopg2`, via the `rdmo` dependencies, in your virtual environment: @@ -62,20 +66,24 @@ MySQL (or community-developed fork MariaDB) can be installed using: ```{eval-rst} -.. tabs:: +.. tab-set:: + + .. tab-item:: Debian/Ubuntu + + .. code-block:: bash - .. code-tab:: bash Debian/Ubuntu + sudo apt install mysql-client mysql-server libmysqlclient-dev # for MySQL + sudo apt install mariadb-client mariadb-server libmariadbclient-dev # for MariaDB - sudo apt install mysql-client mysql-server libmysqlclient-dev # for MySQL - sudo apt install mariadb-client mariadb-server libmariadbclient-dev # for MariaDB + .. tab-item:: RHEL/CentOS - .. code-tab:: bash RHEL/CentOS + .. code-block:: bash - sudo yum install -y mysql mysql-server mysql-devel # for MySQL - sudo yum install -y mariadb mariadb-server mariadb-devel # for MariaDB - sudo systemctl enable mariadb - sudo systemctl start mariadb - sudo mysql_secure_installation + sudo yum install -y mysql mysql-server mysql-devel # for MySQL + sudo yum install -y mariadb mariadb-server mariadb-devel # for MariaDB + sudo systemctl enable mariadb + sudo systemctl start mariadb + sudo mysql_secure_installation ``` To use MySQL as your database backend install `mysqlclient`, via the `rdmo` dependencies, in your virtual environment: diff --git a/docs/development/setup.md b/docs/development/setup.md index edd004f..3ddee47 100644 --- a/docs/development/setup.md +++ b/docs/development/setup.md @@ -48,28 +48,34 @@ You should now have two directories in `rdmorganiser`: Change into `rdmo-app` and create a Python virtual environment: ```{eval-rst} -.. tabs:: +.. tab-set:: - .. code-tab:: bash Linux/MacOS + .. tab-item:: Linux/MacOS - cd rdmo-app - python3 -m venv env - source env/bin/activate - pip install --upgrade pip setuptools + .. code-block:: bash - .. code-tab:: bash Windows Bash + cd rdmo-app + python3 -m venv env + source env/bin/activate + pip install --upgrade pip setuptools - cd rdmo-app - python3 -m venv env - source env/Scripts/activate - pip install --upgrade pip setuptools + .. tab-item:: Windows Bash - .. code-tab:: powershell Windows Powershell + .. code-block:: bash - cd rdmo-app - python3 -m venv env - call env\Scripts\activate.bat - pip install --upgrade pip setuptools + cd rdmo-app + python3 -m venv env + source env/Scripts/activate + pip install --upgrade pip setuptools + + .. tab-item:: Windows Powershell + + .. code-block:: powershell + + cd rdmo-app + python3 -m venv env + call env\Scripts\activate.bat + pip install --upgrade pip setuptools ``` Install `rdmo` in _editable_ mode incl. dev-dependencies: @@ -133,41 +139,49 @@ python manage.py setup_groups # optional: create groups with different The testing data can be imported using: ```{eval-rst} -.. tabs:: +.. tab-set:: - .. code-tab:: bash Linux/MacOS/Windows + .. tab-item:: Linux/MacOS/Windows - python manage.py loaddata ../rdmo/testing/fixtures/* + .. code-block:: bash - .. code-tab:: powershell Windows Powershell + python manage.py loaddata ../rdmo/testing/fixtures/* - python manage.py loaddata ..\rdmo\testing\fixtures\accounts.json ^ - ..\rdmo\testing\fixtures\conditions.json ^ - ..\rdmo\testing\fixtures\domain.json ^ - ..\rdmo\testing\fixtures\groups.json ^ - ..\rdmo\testing\fixtures\options.json ^ - ..\rdmo\testing\fixtures\overlays.json ^ - ..\rdmo\testing\fixtures\projects.json ^ - ..\rdmo\testing\fixtures\questions.json ^ - ..\rdmo\testing\fixtures\sites.json ^ - ..\rdmo\testing\fixtures\tasks.json ^ - ..\rdmo\testing\fixtures\users.json ^ - ..\rdmo\testing\fixtures\views.json + .. tab-item:: Windows Powershell + + .. code-block:: powershell + + python manage.py loaddata ..\rdmo\testing\fixtures\accounts.json ^ + ..\rdmo\testing\fixtures\conditions.json ^ + ..\rdmo\testing\fixtures\domain.json ^ + ..\rdmo\testing\fixtures\groups.json ^ + ..\rdmo\testing\fixtures\options.json ^ + ..\rdmo\testing\fixtures\overlays.json ^ + ..\rdmo\testing\fixtures\projects.json ^ + ..\rdmo\testing\fixtures\questions.json ^ + ..\rdmo\testing\fixtures\sites.json ^ + ..\rdmo\testing\fixtures\tasks.json ^ + ..\rdmo\testing\fixtures\users.json ^ + ..\rdmo\testing\fixtures\views.json ``` The test upload files are initialized using: ```{eval-rst} -.. tabs:: +.. tab-set:: + + .. tab-item:: Linux/MacOS/Windows - .. code-tab:: bash Linux/MacOS/Windows + .. code-block:: bash - cp -r ../rdmo/testing/media media_root + cp -r ../rdmo/testing/media media_root - .. code-tab:: powershell Windows Powershell PowerShell + .. tab-item:: Windows Powershell - xcopy ..\rdmo\testing\media media_root /e/s + .. code-block:: powershell + + xcopy ..\rdmo\testing\media media_root /e/s ``` Starting from RDMO `2.0.0` we use [webpack](https://webpack.js.org/) to bundle the new React based front-end. For this [nodejs](https://nodejs.org) needs to be available. The preferred way is to use [nvm.sh](https://github.com/nvm-sh/nvm). On (regular) Windows, Node JS needs to be installed like the other [prerequisites](../installation/prerequisites) and the `nvm` part can be skipped here. @@ -258,31 +272,37 @@ In order to run the test suite, the `rdmo` repo itself can be setup in a similar ```{eval-rst} -.. tabs:: +.. tab-set:: + + .. tab-item:: Linux/MacOS + + .. code-block:: bash - .. code-tab:: bash Linux/MacOS + deactivate # if you are already in an env + cd path/to/rdmorganiser/rdmo + python3 -m venv env + source env/bin/activate + pip install --upgrade pip setuptools - deactivate # if you are already in an env - cd path/to/rdmorganiser/rdmo - python3 -m venv env - source env/bin/activate - pip install --upgrade pip setuptools + .. tab-item:: Windows Bash - .. code-tab:: bash Windows Bash + .. code-block:: bash - deactivate # if you are already in an env - cd path/to/rdmorganiser/rdmo - python3 -m venv env - source env/Scripts/activate - pip install --upgrade pip setuptools + deactivate # if you are already in an env + cd path/to/rdmorganiser/rdmo + python3 -m venv env + source env/Scripts/activate + pip install --upgrade pip setuptools - .. code-tab:: powershell Windows Powershell PowerShell + .. tab-item:: Windows Powershell - deactivate # if you are already in an env - cd path\to\rdmorganiser\rdmo - python3 -m venv env - env\Scripts\Activate.ps1 - .\env\Scripts\python.exe -m pip install -U pip setuptools + .. code-block:: powershell + + deactivate # if you are already in an env + cd path\to\rdmorganiser\rdmo + python3 -m venv env + env\Scripts\Activate.ps1 + .\env\Scripts\python.exe -m pip install -U pip setuptools ``` Again install `rdmo` in editable mode and install the database prerequisites: @@ -320,15 +340,19 @@ In order to include plugins into the development setup simply clone the plugin r ```{eval-rst} -.. tabs:: +.. tab-set:: + + .. tab-item:: HTTPS + + .. code-block:: bash - .. code-tab:: bash HTTPS + git clone https://github.com/rdmorganiser/rdmo-plugins - git clone https://github.com/rdmorganiser/rdmo-plugins + .. tab-item:: SSH - .. code-tab:: bash SSH + .. code-block:: bash - git clone git@github.com:rdmorganiser/rdmo-plugins + git clone git@github.com:rdmorganiser/rdmo-plugins ``` Then the plugin can be added to the `env` for `rdmo-app` or `rdmo` also in _editable_ mode using: diff --git a/docs/installation/packages.md b/docs/installation/packages.md index 54d59fe..47969c7 100644 --- a/docs/installation/packages.md +++ b/docs/installation/packages.md @@ -7,28 +7,34 @@ Change to the `rdmo-app` directory and create a [Virtual Environment](https://do ```{eval-rst} -.. tabs:: +.. tab-set:: - .. code-tab:: bash Linux/MacOS + .. tab-item:: Linux/MacOS - cd rdmo-app - python3 -m venv env - source env/bin/activate - pip install --upgrade pip setuptools + .. code-block:: bash - .. code-tab:: bash Windows Bash + cd rdmo-app + python3 -m venv env + source env/bin/activate + pip install --upgrade pip setuptools - cd rdmo-app - python3 -m venv env - source env/Scripts/activate - pip install --upgrade pip setuptools + .. tab-item:: Windows Bash - .. code-tab:: powershell Windows Powershell + .. code-block:: bash - cd rdmo-app - python3 -m venv env - env\Scripts\Activate.ps1 - .\env\Scripts\python.exe -m pip install -U pip setuptools + cd rdmo-app + python3 -m venv env + source env/Scripts/activate + pip install --upgrade pip setuptools + + .. tab-item:: Windows Powershell + + .. code-block:: powershell + + cd rdmo-app + python3 -m venv env + env\Scripts\Activate.ps1 + .\env\Scripts\python.exe -m pip install -U pip setuptools ``` After the virtual environment is activated and `pip` was upgraded, the `rdmo` package can be installed using `pip`: diff --git a/docs/installation/prerequisites.md b/docs/installation/prerequisites.md index 2d234a1..35abdc1 100644 --- a/docs/installation/prerequisites.md +++ b/docs/installation/prerequisites.md @@ -7,26 +7,30 @@ Installing the prerequisites for RDMO differs on the different operating systems We recommend to install the prerequisites using the packaging system of your distribution. Use the following commands for Debian/Ubuntu or RHEL/CentOS. ```{eval-rst} -.. tabs:: +.. tab-set:: - .. code-tab:: bash Debian/Ubuntu + .. tab-item:: Debian/Ubuntu - sudo apt install build-essential libxml2-dev libxslt-dev zlib1g-dev \ - python3-dev python3-pip python3-venv \ - git pandoc + .. code-block:: bash - # optional, for pdf output - sudo apt install texlive texlive-xetex lmodern librsvg2-bin + sudo apt install build-essential libxml2-dev libxslt-dev zlib1g-dev \ + python3-dev python3-pip python3-venv \ + git pandoc - .. code-tab:: bash RHEL/CentOS + # optional, for pdf output + sudo apt install texlive texlive-xetex lmodern librsvg2-bin - sudo yum install gcc gcc-c++ libxml2-devel libxslt-devel \ - python34-devel python34-pip python34-virtualenv \ - git pandoc + .. tab-item:: RHEL/CentOS - # optional, for pdf output - sudo yum install texlive texlive-xetex texlive-mathspec texlive-euenc \ - texlive-xetex-def texlive-xltxtra librsvg2-tools + .. code-block:: bash + + sudo yum install gcc gcc-c++ libxml2-devel libxslt-devel \ + python34-devel python34-pip python34-virtualenv \ + git pandoc + + # optional, for pdf output + sudo yum install texlive texlive-xetex texlive-mathspec texlive-euenc \ + texlive-xetex-def texlive-xltxtra librsvg2-tools ``` On RHEL/CentOS SELinux is enabled by default. This can result in unexpected errors, depending on where you store the RDMO source code on the system. Some guidance on how to configure SELinux is given at [here](../advanced/index.md#selinux). diff --git a/docs/installation/setup.md b/docs/installation/setup.md index 5c392e8..686c185 100644 --- a/docs/installation/setup.md +++ b/docs/installation/setup.md @@ -7,15 +7,19 @@ To set up the application, create a new file `config/settings/local.py` in your You can use `config/settings/sample.local.py` as template, i.e.: ```{eval-rst} -.. tabs:: +.. tab-set:: - .. code-tab:: bash Linux/MacOS/Windows + .. tab-item:: Linux/MacOS/Windows - cp config/settings/sample.local.py config/settings/local.py + .. code-block:: bash - .. code-tab:: powershell Windows Powershell + cp config/settings/sample.local.py config/settings/local.py - copy config\settings\sample.local.py config\settings\local.py + .. tab-item:: Windows Powershell + + .. code-block:: powershell + + copy config\settings\sample.local.py config\settings\local.py ``` Most of the settings of your RDMO instance are specified in this file. The different settings are explained in detail [later in the documentation](../configuration/index). For a minimal configuration, you need to set `DEBUG = True` to see verbose error messages and serve static files, and `SECRET_KEY` to a long random string, which you will keep secret. Your database connection is configured using the `DATABASES` variable. Database configuration is covered [here in the documentation](../configuration/databases) and has to be configured first. If no `DATABASE` setting is given `sqlite3` will be used as database backend. diff --git a/docs/management/catalog-development.md b/docs/management/catalog-development.md index 444c80e..2525390 100644 --- a/docs/management/catalog-development.md +++ b/docs/management/catalog-development.md @@ -425,14 +425,14 @@ Create a first *Dataset* by clicking on the `+Dataset` button (this will generat ![](../_static/img/how-to-guide/select_dataset.PNG) > *Add a new dataset to your anwsers* -The [*Page*](#pages) should now display our [*Question set*](#question-sets) for the creators and the single [*Question*](#questions) regarding storage volume. The title you gave the dataset should now be displayed in a tab, and you can add more tabs (for more datasets) by clicking on the `+Dataset` tab. Recall: this is why we ticked the `is collection` box in the [*Page* form](#creating-a-page-as-a-collection). +The [*Page*](#pages) should now display our [*Question set*](#question-sets) for the creators and the single [*Question*](#questions) regarding storage volume. The title you gave the dataset should now be displayed in a tab, and you can add more tabs (for more datasets) by clicking on the `+Dataset` tab. Recall: this is why we ticked the `is collection` box in the [*Page* form](#creating-pages-as-a-collection). You can fill in the first creator's data. Note that there should be a button to `+ Add Creator`. Press it and see if an additional field for a second creator appears. ![](../_static/img/how-to-guide/ds_creator.PNG) > *Add a new Creator* -Finally, you should see a radio button menu. The available options are defined in the [*Optionset*](#option-sets) that we linked when [setting up the question](#add-elements-to-our-page-questions). If we wanted different options, e.g. different data volumes, we would have to create a new [*Optionset*](#option-sets). +Finally, you should see a radio button menu. The available options are defined in the [*Optionset*](#option-sets) that we linked when [setting up the question](#adding-questions-to-pages). If we wanted different options, e.g. different data volumes, we would have to create a new [*Optionset*](#option-sets). ## How to add Options to your RDMO @@ -515,7 +515,7 @@ Click "Save" at the bottom. Finally, we need to use the option in a Question. If you already know how to add *Questions* to a *Catalog* try it yourself. -If you do not know how to do this: Go through the [Creating a new Catalog](#creating-a-new-catalog) tutorial, except in the [Add a *Question* to our *Page*](#add-elements-to-our-page-questions) step, you can add your new *Question set* instead of the one suggested there. The question text won't fit exactly, but you will see your *Question set* in action. +If you do not know how to do this: Go through the [Creating a new Catalog](#creating-a-new-catalog) tutorial, except in the [Add a *Question* to our *Page*](#adding-questions-to-pages) step, you can add your new *Question set* instead of the one suggested there. The question text won't fit exactly, but you will see your *Question set* in action. ## Understanding Attributes @@ -689,9 +689,9 @@ If you add multiple [*Conditions*](#conditions) to a [*Question*](#questions), a ## Adding Tasks to your RDMO -Using tasks you can add an additional layer to your RDMO [*Catalog*](#catalogs). Tasks are visible directly on the project page and can help users remember important data management tasks. Users can open a task to view its detailed description and see the related question in the interview. +Using tasks you can add an additional layer to your RDMO [*Catalog*](#catalog). Tasks are visible directly on the project page and can help users remember important data management tasks. Users can open a task to view its detailed description and see the related question in the interview. -Each task is linked to a [*Condition*](#conditions) and to specific [*Catalogs*](#catalogs). When the condition is met, the task is displayed and users can interact with it and change its status (open, in progress, closed). This can be used, for example, to display a "Contact your Data Protection Officer" task when a user indicates in the interview that personal data will be collected during the research project. In addition, you can also use tasks for other purposes, e.g. to show recommendations, when a user selects certain options. +Each task is linked to a [*Condition*](#conditions) and to specific [*Catalogs*](#catalog). When the condition is met, the task is displayed and users can interact with it and change its status (open, in progress, closed). This can be used, for example, to display a "Contact your Data Protection Officer" task when a user indicates in the interview that personal data will be collected during the research project. In addition, you can also use tasks for other purposes, e.g. to show recommendations, when a user selects certain options. For each task you can define a time frame based on the project’s start and end dates. Tasks can then be displayed relative to these dates, for example one or two months after the project starts or ends. @@ -875,4 +875,4 @@ If you have any issues by reading and understanding or any wishes what also shou | Sabine Schönau | [schoenau@ub.rwth-aachen.de](mailto:schoenau@ub.rwth-aachen.de) | | Janine Straka | [janine.straka@uni-potsdam.de](mailto:janine.straka@uni-potsdam.de) | | Kerstin Wedlich-Zachodin | [Kerstin.Wedlich@kit.edu](mailto:Kerstin.Wedlich@kit.edu) | -| Jürgen Windeck | [Juergen.Windeck@tu-darmstadt.de](mailto:Juergen.Windeck@tu-darmstadt.de) | \ No newline at end of file +| Jürgen Windeck | [Juergen.Windeck@tu-darmstadt.de](mailto:Juergen.Windeck@tu-darmstadt.de) | diff --git a/docs/themes/index.md b/docs/themes/index.md index b709948..c8469ff 100644 --- a/docs/themes/index.md +++ b/docs/themes/index.md @@ -68,6 +68,7 @@ Some files you might want to override are: and can be copied to `rdmo_theme/templates/core/home_text_en.html` and `rdmo_theme/templates/core/home_text_de.html` and be used to customize text on the home page. +(terms-of-use)= ### Terms of Use The content displayed in the Terms of Use dialogue can be customized by putting templates to the appropriate locations. Two different files resembling the available languages can be used and should be located at `rdmo_theme/templates/account/terms_of_use_de.html` and `rdmo_theme/templates/account/terms_of_use_en.html`. Set the variable `ACCOUNT_TERMS_OF_USE` to `True` in your `config/settings/local.py`. diff --git a/requirements.txt b/requirements.txt index 0be61e6..8cb0340 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ sphinx sphinx-autobuild sphinx_rtd_theme sphinx-markdown-tables -sphinx_tabs +sphinx-design sphinx_copybutton readthedocs-sphinx-search myst-parser